mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
expose more dlna profile properties
This commit is contained in:
parent
093ee4c866
commit
ee5eefb01e
6 changed files with 188 additions and 38 deletions
|
@ -1216,3 +1216,7 @@ a.itemTag:hover {
|
||||||
right: 300px;
|
right: 300px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nowPlayingPage .btnCommand {
|
||||||
|
font-size: 19px;
|
||||||
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 85px;
|
bottom: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mediaPlayer .volumeSliderContainer {
|
#mediaPlayer .volumeSliderContainer {
|
||||||
|
|
|
@ -146,7 +146,40 @@
|
||||||
<h2>${HeaderServerSettings}</h2>
|
<h2>${HeaderServerSettings}</h2>
|
||||||
<div>
|
<div>
|
||||||
<p>These values control how Media Browser will present itself to the device.</p>
|
<p>These values control how Media Browser will present itself to the device.</p>
|
||||||
|
<br />
|
||||||
<ul data-role="listview" class="ulForm">
|
<ul data-role="listview" class="ulForm">
|
||||||
|
<li>
|
||||||
|
<label for="txtInfoFriendlyName">Friendly name</label>
|
||||||
|
<input type="text" id="txtInfoFriendlyName" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtInfoManufacturer">Manufacturer</label>
|
||||||
|
<input type="text" id="txtInfoManufacturer" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtInfoManufacturerUrl">Manufacturer url</label>
|
||||||
|
<input type="text" id="txtInfoManufacturerUrl" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtInfoModelName">Model name</label>
|
||||||
|
<input type="text" id="txtInfoModelName" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtInfoModelNumber">Model number</label>
|
||||||
|
<input type="text" id="txtInfoModelNumber" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtInfoModelDesription">Model description</label>
|
||||||
|
<input type="text" id="txtInfoModelDesription" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtInfoModelUrl">Model url</label>
|
||||||
|
<input type="text" id="txtInfoModelUrl" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtInfoSerialNumber">Serial number</label>
|
||||||
|
<input type="text" id="txtInfoSerialNumber" data-mini="true" />
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label for="txtXDlnaCap">X-Dlna cap:</label>
|
<label for="txtXDlnaCap">X-Dlna cap:</label>
|
||||||
<input type="text" id="txtXDlnaCap" data-mini="true" />
|
<input type="text" id="txtXDlnaCap" data-mini="true" />
|
||||||
|
|
|
@ -15,38 +15,56 @@
|
||||||
<label for="radioNavigation">${TabNavigation}</label>
|
<label for="radioNavigation">${TabNavigation}</label>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div class="tabNowPlaying tabContent"></div>
|
|
||||||
|
|
||||||
<div class="tabNavigation tabContent" style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
|
<div class="tabNowPlaying tabContent">
|
||||||
|
|
||||||
|
<div data-role="controlgroup" data-type="horizontal">
|
||||||
|
<button data-icon="previous-track" data-inline="true" data-iconpos="notext" title="${ButtonHome}" class="btnPreviousTrack btnPlayStateCommand" data-command="GoHome">${ButtonHome}</button>
|
||||||
|
<button data-icon="pause" data-inline="true" data-iconpos="notext" title="${ButtonHome}" class="btnPause btnPlayStateCommand" data-command="GoHome">${ButtonHome}</button>
|
||||||
|
<button data-icon="play" data-inline="true" data-iconpos="notext" title="${ButtonHome}" class="btnPlay btnPlayStateCommand" data-command="GoHome">${ButtonHome}</button>
|
||||||
|
<button data-icon="stop" data-inline="true" data-iconpos="notext" title="${ButtonHome}" class="btnStop btnPlayStateCommand" data-command="GoHome">${ButtonHome}</button>
|
||||||
|
<button data-icon="next-track" data-inline="true" data-iconpos="notext" title="${ButtonSearch}" class="btnNextTrack btnPlayStateCommand" data-command="GoToSearch">${ButtonSearch}</button>
|
||||||
|
</div>
|
||||||
|
<div data-role="controlgroup" data-type="horizontal">
|
||||||
|
<button data-icon="audiocd" data-inline="true" data-iconpos="notext" title="${ButtonSearch}" class="btnAudioTracks btnPlayStateCommand" data-command="GoToSearch">${ButtonSearch}</button>
|
||||||
|
<button data-icon="subtitles" data-inline="true" data-iconpos="notext" title="${ButtonSearch}" class="btnSubtitles btnPlayStateCommand" data-command="GoToSearch">${ButtonSearch}</button>
|
||||||
|
<button data-icon="video" data-inline="true" data-iconpos="notext" title="${ButtonSearch}" class="btnChapters btnPlayStateCommand" data-command="GoToSearch">${ButtonSearch}</button>
|
||||||
|
<button data-icon="expand" data-inline="true" data-iconpos="notext" title="${ButtonSearch}" class="btnToggleFullscreen btnPlayStateCommand" data-command="ToggleFullscreen">${ButtonSearch}</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div data-role="controlgroup" data-type="horizontal">
|
|
||||||
<button data-icon="arrow-u" data-inline="true" data-iconpos="notext" title="${ButtonArrowUp}" class="btnArrowUp btnCommand" data-command="MoveUp">${ButtonArrowUp}</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div data-role="controlgroup" data-type="horizontal">
|
|
||||||
<button data-icon="arrow-l" data-inline="true" data-iconpos="notext" title="${ButtonArrowLeft}" class="btnArrowLeft btnCommand" data-command="MoveLeft">${ButtonArrowLeft}</button>
|
<div class="tabNavigation tabContent">
|
||||||
<button data-icon="check" data-inline="true" data-iconpos="notext" title="${ButtonOk}" class="btnOk btnCommand" data-command="Select">${ButtonOk}</button>
|
|
||||||
<button data-icon="arrow-r" data-inline="true" data-iconpos="notext" title="${ButtonArrowRight}" class="btnArrowRight btnCommand" data-command="MoveRight">${ButtonArrowRight}</button>
|
<div data-role="controlgroup" data-type="horizontal">
|
||||||
</div>
|
<button data-icon="arrow-u" data-inline="true" data-iconpos="notext" title="${ButtonArrowUp}" class="btnArrowUp btnCommand" data-command="MoveUp">${ButtonArrowUp}</button>
|
||||||
<div data-role="controlgroup" data-type="horizontal">
|
</div>
|
||||||
<button data-icon="arrow-d" data-inline="true" data-iconpos="notext" title="${ButtonArrowDown}" class="btnArrowDown btnCommand" data-command="MoveDown">${ButtonArrowDown}</button>
|
<div data-role="controlgroup" data-type="horizontal">
|
||||||
</div>
|
<button data-icon="arrow-l" data-inline="true" data-iconpos="notext" title="${ButtonArrowLeft}" class="btnArrowLeft btnCommand" data-command="MoveLeft">${ButtonArrowLeft}</button>
|
||||||
<div data-role="controlgroup" data-type="horizontal">
|
<button data-icon="check" data-inline="true" data-iconpos="notext" title="${ButtonOk}" class="btnOk btnCommand" data-command="Select">${ButtonOk}</button>
|
||||||
<button data-icon="back" data-inline="true" data-iconpos="notext" title="${ButtonBack}" class="btnBack btnCommand" data-command="Back">${ButtonBack}</button>
|
<button data-icon="arrow-r" data-inline="true" data-iconpos="notext" title="${ButtonArrowRight}" class="btnArrowRight btnCommand" data-command="MoveRight">${ButtonArrowRight}</button>
|
||||||
<button data-icon="info" data-inline="true" data-iconpos="notext" title="${ButtonInfo}" class="btnInfo btnCommand" data-command="ToggleContextMenu">${ButtonInfo}</button>
|
</div>
|
||||||
</div>
|
<div data-role="controlgroup" data-type="horizontal">
|
||||||
<br />
|
<button data-icon="arrow-d" data-inline="true" data-iconpos="notext" title="${ButtonArrowDown}" class="btnArrowDown btnCommand" data-command="MoveDown">${ButtonArrowDown}</button>
|
||||||
<div data-role="controlgroup" data-type="horizontal">
|
</div>
|
||||||
<button data-icon="home" data-inline="true" data-iconpos="notext" title="${ButtonHome}" class="btnGoHome btnCommand" data-command="GoHome">${ButtonHome}</button>
|
<div data-role="controlgroup" data-type="horizontal">
|
||||||
<button data-inline="true" data-iconpos="right" title="${ButtonPageUp}" data-icon="plus" class="btnPageUp btnCommand ui-nodisc-icon" data-command="PageUp">${PageButtonAbbreviation}</button>
|
<button data-icon="back" data-inline="true" data-iconpos="notext" title="${ButtonBack}" class="btnBack btnCommand" data-command="Back">${ButtonBack}</button>
|
||||||
<button data-inline="true" data-iconpos="right" title="${ButtonLetterUp}" data-icon="plus" class="btnLetterUp btnCommand ui-nodisc-icon" data-command="NextLetter">${LetterButtonAbbreviation}</button>
|
<button data-icon="info" data-inline="true" data-iconpos="notext" title="${ButtonInfo}" class="btnInfo btnCommand" data-command="ToggleContextMenu">${ButtonInfo}</button>
|
||||||
<button data-icon="search" data-inline="true" data-iconpos="notext" title="${ButtonSearch}" class="btnShowSearch btnCommand" data-command="GoToSearch">${ButtonSearch}</button>
|
</div>
|
||||||
</div>
|
<br />
|
||||||
<div data-role="controlgroup" data-type="horizontal">
|
<div data-role="controlgroup" data-type="horizontal">
|
||||||
<button data-icon="gear" data-inline="true" data-iconpos="notext" title="${ButtonSettings}" class="bthShowSettings btnCommand" data-command="GoToSettings">${ButtonSettings}</button>
|
<button data-icon="home" data-inline="true" data-iconpos="notext" title="${ButtonHome}" class="btnGoHome btnCommand" data-command="GoHome">${ButtonHome}</button>
|
||||||
<button data-inline="true" data-iconpos="right" title="${ButtonPageDown}" data-icon="minus" class="btnPageDown btnCommand ui-nodisc-icon" data-command="PageDown">${PageButtonAbbreviation}</button>
|
<button data-inline="true" data-iconpos="right" title="${ButtonPageUp}" data-icon="plus" class="btnPageUp btnCommand ui-nodisc-icon" data-command="PageUp">${PageButtonAbbreviation}</button>
|
||||||
<button data-inline="true" data-iconpos="right" title="${ButtonLetterDown}" data-icon="minus" class="btnLetterDown btnCommand ui-nodisc-icon" data-command="PreviousLetter">${LetterButtonAbbreviation}</button>
|
<button data-inline="true" data-iconpos="right" title="${ButtonLetterUp}" data-icon="plus" class="btnLetterUp btnCommand ui-nodisc-icon" data-command="NextLetter">${LetterButtonAbbreviation}</button>
|
||||||
<button data-icon="camera" data-inline="true" data-iconpos="notext" title="${ButtonTakeScreenshot}" class="btnScreenshot btnCommand" data-command="TakeScreenshot">${ButtonTakeScreenshot}</button>
|
<button data-icon="search" data-inline="true" data-iconpos="notext" title="${ButtonSearch}" class="btnShowSearch btnCommand" data-command="GoToSearch">${ButtonSearch}</button>
|
||||||
|
</div>
|
||||||
|
<div data-role="controlgroup" data-type="horizontal">
|
||||||
|
<button data-icon="gear" data-inline="true" data-iconpos="notext" title="${ButtonSettings}" class="bthShowSettings btnCommand" data-command="GoToSettings">${ButtonSettings}</button>
|
||||||
|
<button data-inline="true" data-iconpos="right" title="${ButtonPageDown}" data-icon="minus" class="btnPageDown btnCommand ui-nodisc-icon" data-command="PageDown">${PageButtonAbbreviation}</button>
|
||||||
|
<button data-inline="true" data-iconpos="right" title="${ButtonLetterDown}" data-icon="minus" class="btnLetterDown btnCommand ui-nodisc-icon" data-command="PreviousLetter">${LetterButtonAbbreviation}</button>
|
||||||
|
<button data-icon="camera" data-inline="true" data-iconpos="notext" title="${ButtonTakeScreenshot}" class="btnScreenshot btnCommand" data-command="TakeScreenshot">${ButtonTakeScreenshot}</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,6 +45,15 @@
|
||||||
|
|
||||||
var idInfo = profile.Identification || {};
|
var idInfo = profile.Identification || {};
|
||||||
|
|
||||||
|
$('#txtInfoFriendlyName', page).val(profile.FriendlyName || '');
|
||||||
|
$('#txtInfoModelName', page).val(profile.ModelName || '');
|
||||||
|
$('#txtInfoModelNumber', page).val(profile.ModelNumber || '');
|
||||||
|
$('#txtInfoModelDescription', page).val(profile.ModelDescription || '');
|
||||||
|
$('#txtInfoModelUrl', page).val(profile.ModelUrl || '');
|
||||||
|
$('#txtInfoManufacturer', page).val(profile.Manufacturer || '');
|
||||||
|
$('#txtInfoManufacturerUrl', page).val(profile.ManufacturerUrl || '');
|
||||||
|
$('#txtInfoSerialNumber', page).val(profile.SerialNumber || '');
|
||||||
|
|
||||||
$('#txtIdFriendlyName', page).val(idInfo.FriendlyName || '');
|
$('#txtIdFriendlyName', page).val(idInfo.FriendlyName || '');
|
||||||
$('#txtIdModelName', page).val(idInfo.ModelName || '');
|
$('#txtIdModelName', page).val(idInfo.ModelName || '');
|
||||||
$('#txtIdModelNumber', page).val(idInfo.ModelNumber || '');
|
$('#txtIdModelNumber', page).val(idInfo.ModelNumber || '');
|
||||||
|
@ -656,6 +665,15 @@
|
||||||
|
|
||||||
profile.Identification = profile.Identification || {};
|
profile.Identification = profile.Identification || {};
|
||||||
|
|
||||||
|
profile.FriendlyName = $('#txtInfoFriendlyName', page).val();
|
||||||
|
profile.ModelName = $('#txtInfoModelName', page).val();
|
||||||
|
profile.ModelNumber = $('#txtInfoModelNumber', page).val();
|
||||||
|
profile.ModelDescription = $('#txtInfoModelDescription', page).val();
|
||||||
|
profile.ModelUrl = $('#txtInfoModelUrl', page).val();
|
||||||
|
profile.Manufacturer = $('#txtInfoManufacturer', page).val();
|
||||||
|
profile.ManufacturerUrl = $('#txtInfoManufacturerUrl', page).val();
|
||||||
|
profile.SerialNumber = $('#txtInfoSerialNumber', page).val();
|
||||||
|
|
||||||
profile.Identification.FriendlyName = $('#txtIdFriendlyName', page).val();
|
profile.Identification.FriendlyName = $('#txtIdFriendlyName', page).val();
|
||||||
profile.Identification.ModelName = $('#txtIdModelName', page).val();
|
profile.Identification.ModelName = $('#txtIdModelName', page).val();
|
||||||
profile.Identification.ModelNumber = $('#txtIdModelNumber', page).val();
|
profile.Identification.ModelNumber = $('#txtIdModelNumber', page).val();
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
(function (window, document, $, setTimeout, clearTimeout) {
|
(function (window, document, $, setTimeout, clearTimeout) {
|
||||||
|
|
||||||
var currentPlayer;
|
var currentPlayer;
|
||||||
|
var lastPlayerState;
|
||||||
|
|
||||||
function bindEvents(page) {
|
function bindEvents(page) {
|
||||||
|
|
||||||
|
@ -12,12 +13,37 @@
|
||||||
elem.show();
|
elem.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnCommand', page).on('click', function () {
|
$('.btnCommand,.btnToggleFullscreen', page).on('click', function () {
|
||||||
|
|
||||||
currentPlayer.sendCommand({
|
currentPlayer.sendCommand({
|
||||||
Name: this.getAttribute('data-command')
|
Name: this.getAttribute('data-command')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.btnStop', page).on('click', function () {
|
||||||
|
|
||||||
|
currentPlayer.stop();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnPlay', page).on('click', function () {
|
||||||
|
|
||||||
|
currentPlayer.unpause();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnPause', page).on('click', function () {
|
||||||
|
|
||||||
|
currentPlayer.pause();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnNextTrack', page).on('click', function () {
|
||||||
|
|
||||||
|
currentPlayer.nextTrack();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnPreviousTrack', page).on('click', function () {
|
||||||
|
|
||||||
|
currentPlayer.previousTrack();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackStart(e, state) {
|
function onPlaybackStart(e, state) {
|
||||||
|
@ -34,10 +60,59 @@
|
||||||
var player = this;
|
var player = this;
|
||||||
|
|
||||||
player.endPlayerUpdates();
|
player.endPlayerUpdates();
|
||||||
|
|
||||||
|
onStateChanged.call(player, e, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStateChanged(e, state) {
|
function onStateChanged(e, state) {
|
||||||
|
|
||||||
|
updatePlayerState($.mobile.activePage, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
function showButton(button) {
|
||||||
|
button.removeClass('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideButton(button) {
|
||||||
|
button.addClass('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatePlayerState(page, state) {
|
||||||
|
|
||||||
|
lastPlayerState = state;
|
||||||
|
|
||||||
|
var item = state.NowPlayingItem;
|
||||||
|
|
||||||
|
var playerInfo = MediaController.getPlayerInfo();
|
||||||
|
|
||||||
|
var supportedCommands = playerInfo.supportedCommands;
|
||||||
|
|
||||||
|
$('.btnToggleFullscreen', page).buttonEnabled(item && item.MediaType == 'Video' && supportedCommands.indexOf('ToggleFullscreen') != -1);
|
||||||
|
|
||||||
|
$('.btnAudioTracks', page).buttonEnabled(item != null);
|
||||||
|
$('.btnSubtitles', page).buttonEnabled(item != null);
|
||||||
|
$('.btnChapters', page).buttonEnabled(item != null);
|
||||||
|
|
||||||
|
$('.btnStop', page).buttonEnabled(item != null);
|
||||||
|
$('.btnNextTrack', page).buttonEnabled(item != null);
|
||||||
|
$('.btnPreviousTrack', page).buttonEnabled(item != null);
|
||||||
|
|
||||||
|
var btnPause = $('.btnPause', page).buttonEnabled(item != null);
|
||||||
|
var btnPlay = $('.btnPlay', page).buttonEnabled(item != null);
|
||||||
|
|
||||||
|
var playState = state.PlayState || {};
|
||||||
|
|
||||||
|
if (playState.IsPaused) {
|
||||||
|
|
||||||
|
hideButton(btnPause);
|
||||||
|
showButton(btnPlay);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
showButton(btnPause);
|
||||||
|
hideButton(btnPlay);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSupportedCommands(page, commands) {
|
function updateSupportedCommands(page, commands) {
|
||||||
|
@ -93,13 +168,6 @@
|
||||||
|
|
||||||
bindEvents(page);
|
bindEvents(page);
|
||||||
|
|
||||||
}).on('pageshow', "#nowPlayingPage", function () {
|
|
||||||
|
|
||||||
var page = this;
|
|
||||||
|
|
||||||
$('.radioTabButton', page).checked(false).checkboxradio('refresh');
|
|
||||||
$('.radioTabButton:first', page).checked(true).checkboxradio('refresh').trigger('change');
|
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
$(MediaController).on('playerchange.nowplayingpage', function () {
|
$(MediaController).on('playerchange.nowplayingpage', function () {
|
||||||
|
@ -111,11 +179,20 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}).on('pageshow', "#nowPlayingPage", function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
$('.radioTabButton', page).checked(false).checkboxradio('refresh');
|
||||||
|
$('.radioTabButton:first', page).checked(true).checkboxradio('refresh').trigger('change');
|
||||||
|
|
||||||
}).on('pagehide', "#nowPlayingPage", function () {
|
}).on('pagehide', "#nowPlayingPage", function () {
|
||||||
|
|
||||||
releaseCurrentPlayer();
|
releaseCurrentPlayer();
|
||||||
|
|
||||||
$(MediaController).off('playerchange.nowplayingpage');
|
$(MediaController).off('playerchange.nowplayingpage');
|
||||||
|
|
||||||
|
lastPlayerState = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
})(window, document, jQuery, setTimeout, clearTimeout);
|
})(window, document, jQuery, setTimeout, clearTimeout);
|
Loading…
Add table
Add a link
Reference in a new issue