1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

dlna fixes

This commit is contained in:
Luke Pulverenti 2014-04-19 13:43:12 -04:00
parent ec163807cf
commit 99aed936db
7 changed files with 113 additions and 57 deletions

View file

@ -2,18 +2,8 @@
width: 250px; width: 250px;
} }
.searchPanel + .ui-panel-dismiss { .searchPanelModelOpen {
right: 250px; right: 250px!important;
}
@media all and (min-width: 600px) {
.searchPanel {
width: 300px;
}
.searchPanel + .ui-panel-dismiss {
right: 300px;
}
} }
.searchHints { .searchHints {

View file

@ -953,6 +953,20 @@ progress {
box-shadow: 0 0 20px 1px #38c; box-shadow: 0 0 20px 1px #38c;
} }
.sessionNowPlayingTime {
color: #fff;
position: absolute;
right: 10px;
bottom: 15px;
}
.sessionNowPlayingStreamInfo {
color: #fff;
position: absolute;
left: 10px;
top: 10px;
}
@media all and (max-width: 1000px) { @media all and (max-width: 1000px) {
.activeSession { .activeSession {

View file

@ -280,7 +280,11 @@
html += '</div>'; html += '</div>';
html += '<div class="posterItemOverlayTarget"></div>'; html += '<div class="posterItemOverlayTarget">';
html += '<div class="sessionNowPlayingStreamInfo">' + DashboardPage.getSessionNowPlayingStreamInfo(connection) + '</div>';
html += '<div class="sessionNowPlayingTime">' + DashboardPage.getSessionNowPlayingTime(connection) + '</div>';
html += '</div>';
html += '</div>'; html += '</div>';
@ -291,6 +295,50 @@
$('.deadSession', parentElement).remove(); $('.deadSession', parentElement).remove();
}, },
getSessionNowPlayingStreamInfo: function (session) {
var html = '';
html += '<div>';
if (session.PlayState.PlayMethod == 'Transcode') {
html += 'Transcoding';
}
else if (session.PlayState.PlayMethod == 'DirectStream') {
html += 'Direct Streaming';
}
else if (session.PlayState.PlayMethod == 'DirectPlay') {
html += 'Direct Playing';
}
html += '</div>';
return html;
},
getSessionNowPlayingTime: function (session) {
var html = '';
if (session.PlayState.PositionTicks) {
html += Dashboard.getDisplayTime(session.PlayState.PositionTicks);
} else {
html += '--:--:--';
}
html += ' / ';
var nowPlayingItem = session.NowPlayingItem;
if (nowPlayingItem && nowPlayingItem.RunTimeTicks) {
html += Dashboard.getDisplayTime(nowPlayingItem.RunTimeTicks);
} else {
html += '--:--:--';
}
return html;
},
getAppSecondaryText: function (session) { getAppSecondaryText: function (session) {
return session.ApplicationVersion; return session.ApplicationVersion;
@ -405,6 +453,9 @@
row.removeClass('playingSession'); row.removeClass('playingSession');
} }
$('.sessionNowPlayingStreamInfo', row).html(DashboardPage.getSessionNowPlayingStreamInfo(session));
$('.sessionNowPlayingTime', row).html(DashboardPage.getSessionNowPlayingTime(session));
$('.sessionUserName', row).html(DashboardPage.getUsersHtml(session)); $('.sessionUserName', row).html(DashboardPage.getUsersHtml(session));
$('.sessionAppSecondaryText', row).html(DashboardPage.getAppSecondaryText(session)); $('.sessionAppSecondaryText', row).html(DashboardPage.getAppSecondaryText(session));

View file

@ -73,7 +73,7 @@
})[0]; })[0];
typeName = typeName ? typeName.name : "General or mixed content"; typeName = typeName ? typeName.name : "Mixed movies & tv";
html += '<p style="padding-left:.5em;">Folder type: <b>' + typeName + '</b></p>'; html += '<p style="padding-left:.5em;">Folder type: <b>' + typeName + '</b></p>';

View file

@ -62,9 +62,6 @@
if (currentPlayer) { if (currentPlayer) {
currentPlayer.unMute(); currentPlayer.unMute();
$(this).hide();
$('.muteButton', elem).show();
} }
}); });
@ -72,9 +69,6 @@
if (currentPlayer) { if (currentPlayer) {
currentPlayer.mute(); currentPlayer.mute();
$(this).hide();
$('.unmuteButton', elem).show();
} }
}); });
@ -89,9 +83,6 @@
if (currentPlayer) { if (currentPlayer) {
currentPlayer.pause(); currentPlayer.pause();
$(this).hide();
$('.unpauseButton', elem).show();
} }
}); });
@ -99,9 +90,6 @@
if (currentPlayer) { if (currentPlayer) {
currentPlayer.unpause(); currentPlayer.unpause();
$(this).hide();
$('.pauseButton', elem).show();
} }
}); });
@ -164,6 +152,14 @@
return elem; return elem;
} }
function showButton(button) {
button.removeClass('hide');
}
function hideButton(button) {
button.addClass('hide');
}
function updatePlayerState(state) { function updatePlayerState(state) {
if (state.itemName) { if (state.itemName) {
@ -203,24 +199,24 @@
if (state.isMuted) { if (state.isMuted) {
muteButton.hide(); hideButton(muteButton);
unmuteButton.show(); showButton(unmuteButton);
} else { } else {
muteButton.show(); showButton(muteButton);
unmuteButton.hide(); hideButton(unmuteButton);
} }
if (state.isPaused) { if (state.isPaused) {
pauseButton.hide(); hideButton(pauseButton);
unpauseButton.show(); showButton(unpauseButton);
} else { } else {
pauseButton.show(); showButton(pauseButton);
unpauseButton.hide(); hideButton(unpauseButton);
} }
if (!isVolumeSliderActive) { if (!isVolumeSliderActive) {
@ -320,6 +316,8 @@
function onPlaybackStart(e, state) { function onPlaybackStart(e, state) {
console.log('nowplaying event: ' + e.type);
var player = this; var player = this;
player.beginPlayerUpdates(); player.beginPlayerUpdates();
@ -343,6 +341,7 @@
function onPlaybackStopped(e, state) { function onPlaybackStopped(e, state) {
console.log('nowplaying event: ' + e.type);
var player = this; var player = this;
player.endPlayerUpdates(); player.endPlayerUpdates();
@ -352,6 +351,7 @@
function onStateChanged(e, state) { function onStateChanged(e, state) {
//console.log('nowplaying event: ' + e.type);
var player = this; var player = this;
if (player.isDefaultPlayer && state.mediaType == 'Video') { if (player.isDefaultPlayer && state.mediaType == 'Video') {
@ -385,7 +385,7 @@
player.beginPlayerUpdates(); player.beginPlayerUpdates();
} }
onStateChanged.call(player, null, state); onStateChanged.call(player, {type: 'init'}, state);
}); });
$(player).on('playbackstart.nowplayingbar', onPlaybackStart) $(player).on('playbackstart.nowplayingbar', onPlaybackStart)

View file

@ -230,7 +230,7 @@
$(page).append(html); $(page).append(html);
panel = $('#searchPanel', page).panel({}).trigger('create'); panel = $('#searchPanel', page).panel({}).panel('option', 'classes.modalOpen', 'searchPanelModelOpen ui-panel-dismiss-open').trigger('create');
$('#txtSearch', panel).on("keyup", function (e) { $('#txtSearch', panel).on("keyup", function (e) {

View file

@ -20,17 +20,18 @@
<form id="supporterKeyForm"> <form id="supporterKeyForm">
<div style="margin: 1em 0;"> <div style="margin: 1em 0;">
<label for="txtSupporterKey">MB3 Supporter Key (paste from email)</label> <label for="txtSupporterKey">${LabelSupporterKey}</label>
<input type="password" id="txtSupporterKey" name="txtSupporterKey" data-inline="true" /> <input type="password" id="txtSupporterKey" name="txtSupporterKey" data-inline="true" />
<div class="fieldDescription"> <div class="fieldDescription">
Enter your supporter key to start enjoying additional benefits the community has developed for Media Browser. <strong>MB3 keys only.</strong> ${LabelSupporterKeyHelp}
</div> </div>
<p style="display: none; padding: 1em; border-radius: 5px; font-weight: normal;" class="ui-bar-a notSupporter"> <div style="display: none; padding: 1em; margin-top: 1em; border-radius: 5px; font-weight: normal;" class="ui-bar-a notSupporter">
<strong>MB3 Key Missing or Invalid</strong> - in order for any premium content to be registered, you must also be an MB3 Supporter. <p><strong>${MessageInvalidKey}</strong></p>
Please <a href="supporter.html">donate</a> and support the continued development of the core product. Thank you. <p>
${ErrorMessageInvalidKey}
</p> </p>
</div>
</div> </div>
<div style="margin: 2em 0;"> <div style="margin: 2em 0;">
@ -48,16 +49,16 @@
</form> </form>
<br /> <br />
<div data-role="collapsible"> <div data-role="collapsible">
<h3>Lost Key</h3> <h3>${HeaderForgotKey}</h3>
<div> <div>
<form id="lostKeyForm"> <form id="lostKeyForm">
<div style="margin: 1em 0;"> <div style="margin: 1em 0;">
<label for="txtEmail">Email Address</label> <label for="txtEmail">${LabelEmailAddress}</label>
<input type="email" required id="txtEmail" name="txtEmail" /> <input type="email" required id="txtEmail" name="txtEmail" />
<div class="fieldDescription">The email address that was used to purchase the key.</div> <div class="fieldDescription">${LabelSupporterEmailAddress}</div>
</div> </div>
<p> <p>
<button type="submit" id="mbRetrieveKeyBtn" data-icon="action" data-theme="b">Retrieve Key</button> <button type="submit" id="mbRetrieveKeyBtn" data-icon="action" data-theme="b">${ButtonRetrieveKey}</button>
</p> </p>
</form> </form>
@ -65,31 +66,31 @@
</div> </div>
<div data-role="collapsible"> <div data-role="collapsible">
<h3>Multiple Key Linking</h3> <h3>${HeaderMultipleKeyLinking}</h3>
<div> <div>
<form id="linkKeysForm"> <form id="linkKeysForm">
<p> <p>
If you have more than one supporter key, use this form to link the old key's registrations with your new one. ${MultipleKeyLinkingHelp}
</p> </p>
<div style="margin: 1em 0;"> <div style="margin: 1em 0;">
<label for="txtEmail">Current Email Address</label> <label for="txtEmail">${LabelCurrentEmailAddress}</label>
<input type="email" required id="txtNewEmail" name="txtNewEmail" /> <input type="email" required id="txtNewEmail" name="txtNewEmail" />
<div class="fieldDescription"> <div class="fieldDescription">
The current email address to which your new key was sent. ${LabelCurrentEmailAddressHelp}
</div> </div>
</div> </div>
<p> <p>
<label for="txtNewKey">New Supporter Key</label> <label for="txtNewKey">${LabelNewSupporterKey}</label>
<input type="password" required="required" id="txtNewKey" name="txtNewKey" /> <input type="password" required="required" id="txtNewKey" name="txtNewKey" />
</p> </p>
<p> <p>
<label for="txtOldKey">Old Supporter Key</label> <label for="txtOldKey">${LabelOldSupporterKey}</label>
<input type="password" required="required" id="txtOldKey" name="txtOldKey" /> <input type="password" required="required" id="txtOldKey" name="txtOldKey" />
</p> </p>
<p> <p>
<button type="submit" id="mbLinkKeysBtn" data-icon="check" data-theme="b">Link Keys</button> <button type="submit" id="mbLinkKeysBtn" data-icon="check" data-theme="b">${ButtonLinkKeys}</button>
</p> </p>
</form> </form>
</div> </div>