mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
expose more dlna profile properties
This commit is contained in:
parent
093ee4c866
commit
ee5eefb01e
@ -1216,3 +1216,7 @@ a.itemTag:hover {
|
||||
right: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
.nowPlayingPage .btnCommand {
|
||||
font-size: 19px;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@
|
||||
text-align: left;
|
||||
margin-left: 0;
|
||||
right: 0;
|
||||
bottom: 85px;
|
||||
bottom: 70px;
|
||||
}
|
||||
|
||||
#mediaPlayer .volumeSliderContainer {
|
||||
|
@ -146,7 +146,40 @@
|
||||
<h2>${HeaderServerSettings}</h2>
|
||||
<div>
|
||||
<p>These values control how Media Browser will present itself to the device.</p>
|
||||
<br />
|
||||
<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>
|
||||
<label for="txtXDlnaCap">X-Dlna cap:</label>
|
||||
<input type="text" id="txtXDlnaCap" data-mini="true" />
|
||||
|
@ -16,9 +16,26 @@
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="tabNowPlaying tabContent"></div>
|
||||
<div style="text-align: center;">
|
||||
<div class="tabNowPlaying tabContent">
|
||||
|
||||
<div class="tabNavigation tabContent" style="text-align: center;">
|
||||
<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>
|
||||
|
||||
<div class="tabNavigation tabContent">
|
||||
|
||||
<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>
|
||||
@ -51,5 +68,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -45,6 +45,15 @@
|
||||
|
||||
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 || '');
|
||||
$('#txtIdModelName', page).val(idInfo.ModelName || '');
|
||||
$('#txtIdModelNumber', page).val(idInfo.ModelNumber || '');
|
||||
@ -656,6 +665,15 @@
|
||||
|
||||
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.ModelName = $('#txtIdModelName', page).val();
|
||||
profile.Identification.ModelNumber = $('#txtIdModelNumber', page).val();
|
||||
|
@ -1,6 +1,7 @@
|
||||
(function (window, document, $, setTimeout, clearTimeout) {
|
||||
|
||||
var currentPlayer;
|
||||
var lastPlayerState;
|
||||
|
||||
function bindEvents(page) {
|
||||
|
||||
@ -12,12 +13,37 @@
|
||||
elem.show();
|
||||
});
|
||||
|
||||
$('.btnCommand', page).on('click', function () {
|
||||
$('.btnCommand,.btnToggleFullscreen', page).on('click', function () {
|
||||
|
||||
currentPlayer.sendCommand({
|
||||
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) {
|
||||
@ -34,10 +60,59 @@
|
||||
var player = this;
|
||||
|
||||
player.endPlayerUpdates();
|
||||
|
||||
onStateChanged.call(player, 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) {
|
||||
@ -93,13 +168,6 @@
|
||||
|
||||
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 () {
|
||||
|
||||
$(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 () {
|
||||
|
||||
releaseCurrentPlayer();
|
||||
|
||||
$(MediaController).off('playerchange.nowplayingpage');
|
||||
|
||||
lastPlayerState = null;
|
||||
});
|
||||
|
||||
})(window, document, jQuery, setTimeout, clearTimeout);
|
Loading…
Reference in New Issue
Block a user