mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
dlna fixes
This commit is contained in:
parent
11cb5f0b45
commit
b9aac88766
28 changed files with 410 additions and 423 deletions
|
@ -6,7 +6,8 @@
|
|||
width: 28px;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
top: 2px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.btnDefaultCast .btnCastImage {
|
||||
|
@ -20,3 +21,21 @@
|
|||
.btnDisabledCast .btnCastImage {
|
||||
background-image: url(images/chromecast/ic_media_route_disabled_holo_dark.png);
|
||||
}
|
||||
|
||||
.headerSelectedPlayer {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
color: #ddd;
|
||||
font-size: 11px;
|
||||
margin-right: .5em;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
top: -19px;
|
||||
font-family: "Open Sans";
|
||||
}
|
||||
|
||||
@media all and (max-width: 800px) {
|
||||
.headerSelectedPlayer {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,3 +131,12 @@
|
|||
.ui-nosvg .ui-icon-expand:after {
|
||||
background-image: url("images/icons/expand.png");
|
||||
}
|
||||
|
||||
.ui-icon-remote:after {
|
||||
background-image: url("images/icons/remote.png");
|
||||
}
|
||||
|
||||
/* Fallback */
|
||||
.ui-nosvg .ui-icon-remote:after {
|
||||
background-image: url("images/icons/remote.png");
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB |
BIN
dashboard-ui/css/images/icons/remote.png
Normal file
BIN
dashboard-ui/css/images/icons/remote.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 399 B |
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
|
@ -62,7 +62,7 @@
|
|||
border-width: 0 !important;
|
||||
}
|
||||
|
||||
.libraryMenuButton img {
|
||||
.barsMenuButton img {
|
||||
border: 1px solid #444 !important;
|
||||
padding: .5em;
|
||||
background-color: #181818;
|
||||
|
@ -70,16 +70,16 @@
|
|||
height: 14px!important;
|
||||
}
|
||||
|
||||
.libraryMenuButton:hover {
|
||||
.barsMenuButton:hover {
|
||||
opacity: 1!important;
|
||||
}
|
||||
|
||||
.libraryMenuButton img:hover {
|
||||
.barsMenuButton img:hover {
|
||||
background-color: #38c;
|
||||
}
|
||||
|
||||
@media all and (min-width: 600px) {
|
||||
.libraryMenuButton {
|
||||
.barsMenuButton {
|
||||
opacity: .9;
|
||||
}
|
||||
}
|
||||
|
@ -126,26 +126,6 @@
|
|||
}
|
||||
|
||||
@media all and (max-width: 460px) {
|
||||
.viewMenuBar, .headerButton {
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.headerButton {
|
||||
line-height: 46px;
|
||||
}
|
||||
|
||||
.libraryPage {
|
||||
padding-top: 46px !important;
|
||||
}
|
||||
|
||||
.libraryPage:not(.metadataEditorPage):not(.noSecondaryNavPage) {
|
||||
padding-top: 96px !important;
|
||||
}
|
||||
|
||||
.libraryViewNav {
|
||||
top: 47px;
|
||||
}
|
||||
|
||||
.headerButtonLeft img {
|
||||
height: 15px;
|
||||
}
|
||||
|
@ -169,7 +149,7 @@
|
|||
opacity: 1;
|
||||
}
|
||||
|
||||
.libraryMenuButton:hover {
|
||||
.barsMenuButton:hover {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
|
@ -322,3 +302,21 @@
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 750px) {
|
||||
|
||||
.dashboardDocument .dashboardMenuButton {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 750px) {
|
||||
|
||||
.dashboardDocument .libraryMenuButton {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.libraryDocument .dashboardMenuButton {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Now playing bar */
|
||||
.nowPlayingBar {
|
||||
padding: 6px 0 14px 0;
|
||||
border-top: 2px solid green;
|
||||
border-top: 1px solid green;
|
||||
}
|
||||
|
||||
.nowPlayingBarImage {
|
||||
|
@ -27,6 +27,7 @@
|
|||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.nowPlayingDoubleText {
|
||||
|
@ -122,6 +123,10 @@ input[type="range"]::-ms-fill-upper {
|
|||
display: none; /* display and visibility only */
|
||||
}
|
||||
|
||||
.remoteControlButton {
|
||||
float: right;
|
||||
}
|
||||
|
||||
@media all and (max-width: 800px) {
|
||||
|
||||
#nowPlayingBar .mediaButton {
|
||||
|
@ -129,7 +134,7 @@ input[type="range"]::-ms-fill-upper {
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#nowPlayingBar .mediaButton:not(#playButton):not(#pauseButton) {
|
||||
#nowPlayingBar .mediaButton:not(#playButton):not(#pauseButton):not(.remoteControlButton) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
@ -146,6 +151,13 @@ input[type="range"]::-ms-fill-upper {
|
|||
}
|
||||
}
|
||||
|
||||
/*@media all and (min-width: 800px) {
|
||||
|
||||
.nowPlayingBar {
|
||||
text-align: center;
|
||||
}
|
||||
}*/
|
||||
|
||||
@media (min-width: 1440px) {
|
||||
#nowPlayingBar .positionSliderContainer {
|
||||
width: 300px;
|
||||
|
|
|
@ -1,23 +1,30 @@
|
|||
.btnNotifications {
|
||||
text-decoration: none;
|
||||
text-decoration: none!important;
|
||||
}
|
||||
|
||||
.btnNotificationsInner {
|
||||
text-decoration: none!important;
|
||||
vertical-align: middle;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
padding: 8px 12px;
|
||||
padding: 0 12px;
|
||||
line-height: 22px;
|
||||
margin-top: 15px;
|
||||
text-align: center;
|
||||
text-decoration: none !important;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
background-color: #f5f5f5;
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#f1f1f1));
|
||||
background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1);
|
||||
background-image: -moz-linear-gradient(top,#f5f5f5,#f1f1f1);
|
||||
background-image: -ms-linear-gradient(top,#f5f5f5,#f1f1f1);
|
||||
background-image: -o-linear-gradient(top,#f5f5f5,#f1f1f1);
|
||||
background-image: linear-gradient(top,#f5f5f5,#f1f1f1);
|
||||
border: 1px solid #dcdcdc;
|
||||
color: #666;
|
||||
background-color: #353535;
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,from(#353535),to(#313131));
|
||||
background-image: -webkit-linear-gradient(top,#353535,#313131);
|
||||
background-image: -moz-linear-gradient(top,#353535,#313131);
|
||||
background-image: -ms-linear-gradient(top,#353535,#313131);
|
||||
background-image: -o-linear-gradient(top,#353535,#313131);
|
||||
background-image: linear-gradient(top,#353535,#313131);
|
||||
border: 1px solid #444;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.levelNormal {
|
||||
|
|
|
@ -175,13 +175,6 @@ pre, textarea.pre {
|
|||
z-index: 99999;
|
||||
}
|
||||
|
||||
.headerButtons {
|
||||
float: right;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.header .imageLink {
|
||||
display: inline-block;
|
||||
}
|
||||
|
@ -195,10 +188,6 @@ pre, textarea.pre {
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.imageLink.supporterIcon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btnCurrentUser {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
@ -226,6 +215,7 @@ h1 .imageLink {
|
|||
|
||||
.pageTitle {
|
||||
margin-top: 0;
|
||||
font-family: "Open Sans";
|
||||
}
|
||||
|
||||
.imageButton {
|
||||
|
@ -278,12 +268,23 @@ h1 .imageLink {
|
|||
margin-bottom: 0!important;
|
||||
}
|
||||
|
||||
.content-primary {
|
||||
padding-top: 55px;
|
||||
}
|
||||
|
||||
.content-secondary {
|
||||
z-index: 99996;
|
||||
background: #222;
|
||||
z-index: 1000;
|
||||
background: #333;
|
||||
border: 0;
|
||||
margin-top: 40px;
|
||||
border-right: 1px solid #ddd;
|
||||
display: none;
|
||||
text-align: left;
|
||||
width: 25%;
|
||||
position: fixed;
|
||||
top: 51px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.content-secondary h1 {
|
||||
|
@ -294,9 +295,9 @@ h1 .imageLink {
|
|||
|
||||
.sidebarLinks a {
|
||||
display: block;
|
||||
padding: 10px 20px 10px 30px;
|
||||
padding: .6em 20px .6em 20px;
|
||||
text-decoration: none;
|
||||
color: #fff!important;
|
||||
color: #eee!important;
|
||||
text-shadow: none!important;
|
||||
font-weight: 400!important;
|
||||
font-size: 14px;
|
||||
|
@ -310,11 +311,12 @@ h1 .imageLink {
|
|||
.sidebarLinks a.selectedSidebarLink {
|
||||
background: #38c!important;
|
||||
color: #fff!important;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.sidebarDivider {
|
||||
height: 1px;
|
||||
background: #383838;
|
||||
background: #444;
|
||||
margin: .25em 0;
|
||||
}
|
||||
|
||||
|
@ -342,7 +344,7 @@ h1 .imageLink {
|
|||
}
|
||||
|
||||
.dashboardPanelLink {
|
||||
padding: .75em .5em .75em 1.25em;
|
||||
padding: .5em .5em .5em 1.25em;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: #fff!important;
|
||||
|
@ -391,10 +393,6 @@ h1 .imageLink {
|
|||
.imgLogoIcon {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.imageLink.supporterIcon {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 750px) {
|
||||
|
@ -416,11 +414,6 @@ h1 .imageLink {
|
|||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.headerButtons {
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.type-interior > .ui-content, .type-interior > .ui-panel-content-wrap > .ui-content {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
|
@ -429,20 +422,13 @@ h1 .imageLink {
|
|||
}
|
||||
|
||||
.content-secondary {
|
||||
text-align: left;
|
||||
width: 34%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.content-primary {
|
||||
width: 56%;
|
||||
width: 65%;
|
||||
float: right;
|
||||
padding: 10px 6% 3em 0;
|
||||
padding: 80px 6% 3em 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
@ -451,13 +437,6 @@ h1 .imageLink {
|
|||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 850px) {
|
||||
|
||||
.content-primary {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 900px) {
|
||||
|
||||
.page:not(.standalonePage) .header {
|
||||
|
@ -469,11 +448,11 @@ h1 .imageLink {
|
|||
|
||||
|
||||
.content-secondary {
|
||||
width: 30%;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.content-primary {
|
||||
width: 60%;
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -481,11 +460,11 @@ h1 .imageLink {
|
|||
|
||||
|
||||
.content-secondary {
|
||||
width: 25%;
|
||||
width: 17%;
|
||||
}
|
||||
|
||||
.content-primary {
|
||||
width: 65%;
|
||||
width: 74%;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -497,7 +476,7 @@ h1 .imageLink {
|
|||
}
|
||||
|
||||
.content-primary {
|
||||
width: 70%;
|
||||
width: 71%;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -669,11 +648,6 @@ h1 .imageLink {
|
|||
}
|
||||
}
|
||||
|
||||
/* Startup wizard */
|
||||
.wizardPage {
|
||||
background: #e2e2e2;
|
||||
}
|
||||
|
||||
.wizardContent {
|
||||
max-width: 800px;
|
||||
padding: .5em 2em 1em;
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<a href="dashboardgeneral.html" data-role="button">${TabGeneral}</a>
|
||||
<a href="dashboardinfopage.html" data-role="button">${TabInfo}</a>
|
||||
</div>
|
||||
|
||||
<div class="dashboardContent">
|
||||
<div class="readOnlyContent dashboardHomeLeftColumn">
|
||||
|
||||
|
@ -42,6 +41,8 @@
|
|||
<div id="pPluginUpdates"></div>
|
||||
|
||||
<p class="externalUrl"></p>
|
||||
<p class="supporterIconContainer">
|
||||
</p>
|
||||
<div style="margin-top: 1em;">
|
||||
<button class="btnRestartContainer hide" id="btnRestartServer" type="button" data-icon="refresh" data-mini="true" data-inline="true" onclick="DashboardPage.restart();">${ButtonRestart}</button>
|
||||
<button id="btnShutdown" type="button" data-icon="delete" data-mini="true" data-inline="true" onclick="DashboardPage.shutdown();">${ButtonShutdown}</button>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleLiveTV}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvSettingsPage" data-role="page" class="page type-interior liveTvSettingsPage liveTvPage" data-contextname="${HeaderLiveTv}">
|
||||
<div id="liveTvSettingsPage" data-role="page" class="page type-interior liveTvSettingsPage liveTvPage">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
<form class="metadataChaptersForm">
|
||||
|
||||
<div style="display: none;">
|
||||
<p>${HeaderChapterDownloadingHelp}</p>
|
||||
|
||||
<div class="chapterDownloadSettings" style="display: none;">
|
||||
|
@ -40,6 +41,7 @@
|
|||
<p>${MessageNoChapterProviders}</p>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<label>${HeaderExtractChapterImagesFor}</label>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleMediaBrowser}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="nowPlayingPage" data-role="page" class="page libraryPage nowPlayingPage" data-theme="b">
|
||||
<div id="nowPlayingPage" data-role="page" class="page libraryPage nowPlayingPage" data-theme="b" data-contextname="${TitleRemoteControl}">
|
||||
|
||||
<div class="libraryViewNav">
|
||||
<a href="#" class="ui-btn-active tabButton" data-tab="tabNowPlaying">${TabNowPlaying}</a>
|
||||
|
|
|
@ -1260,16 +1260,16 @@
|
|||
};
|
||||
}
|
||||
|
||||
MediaController.registerPlayer(new chromecastPlayer());
|
||||
//MediaController.registerPlayer(new chromecastPlayer());
|
||||
|
||||
$(MediaController).on('playerchange', function () {
|
||||
//$(MediaController).on('playerchange', function () {
|
||||
|
||||
if (MediaController.getPlayerInfo().name == PlayerName) {
|
||||
// if (MediaController.getPlayerInfo().name == PlayerName) {
|
||||
|
||||
if (CastPlayer.deviceState != DEVICE_STATE.ACTIVE && CastPlayer.isInitialized) {
|
||||
CastPlayer.launchApp();
|
||||
}
|
||||
}
|
||||
});
|
||||
// if (CastPlayer.deviceState != DEVICE_STATE.ACTIVE && CastPlayer.isInitialized) {
|
||||
// CastPlayer.launchApp();
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
|
||||
})(window, window.chrome, console);
|
|
@ -26,11 +26,11 @@
|
|||
$('#contribute', page).show();
|
||||
}
|
||||
|
||||
DashboardPage.renderSupporterIcon(page, pluginSecurityInfo);
|
||||
});
|
||||
|
||||
DashboardPage.reloadSystemInfo(page);
|
||||
DashboardPage.reloadNews(page);
|
||||
|
||||
DashboardPage.sessionUpdateTimer = setInterval(DashboardPage.refreshSessionsLocally, 60000);
|
||||
},
|
||||
|
||||
|
@ -739,6 +739,25 @@
|
|||
}
|
||||
},
|
||||
|
||||
renderSupporterIcon: function (page, pluginSecurityInfo) {
|
||||
|
||||
var imgUrl, text;
|
||||
|
||||
if (pluginSecurityInfo.IsMBSupporter) {
|
||||
|
||||
imgUrl = "css/images/supporter/supporterbadge.png";
|
||||
text = "Thank you for supporting Media Browser.";
|
||||
|
||||
$('.supporterIconContainer', page).html('<a class="imageLink supporterIcon" href="supporter.html" title="' + text + '"><img src="' + imgUrl + '" style="height:32px;vertical-align: middle; margin-right: .5em;" /></a><span style="position:relative;top:2px;text-decoration:none;">' + text + '</span>');
|
||||
} else {
|
||||
|
||||
imgUrl = "css/images/supporter/nonsupporterbadge.png";
|
||||
text = "Please support Media Browser.";
|
||||
|
||||
$('.supporterIconContainer', page).html('<a class="imageLink supporterIcon" href="supporter.html" title="' + text + '"><img src="' + imgUrl + '" style="height:32px;vertical-align: middle; margin-right: .5em;" /><span style="position:relative;top:2px;text-decoration:none;">' + text + '</span></a>');
|
||||
}
|
||||
},
|
||||
|
||||
renderHasPendingRestart: function (page, hasPendingRestart) {
|
||||
|
||||
$('#updateFail', page).hide();
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
else if (view == "Poster") {
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "portrait",
|
||||
shape: "auto",
|
||||
showTitle: true,
|
||||
centerText: true
|
||||
});
|
||||
|
|
|
@ -7,49 +7,56 @@
|
|||
//html += '<a href="index.html" class="headerButton headerButtonLeft headerHomeButton">';
|
||||
//html += '<img src="css/images/items/folders/home.png" />';
|
||||
//html += '</a>';
|
||||
html += '<button type="button" data-role="none" title="Menu" class="headerButton libraryMenuButton headerButtonLeft">';
|
||||
|
||||
html += '<button type="button" data-role="none" title="Menu" class="headerButton dashboardMenuButton barsMenuButton headerButtonLeft">';
|
||||
html += '<img src="css/images/menu.png" />';
|
||||
html += '</button>';
|
||||
|
||||
html += '<button type="button" data-role="none" title="Menu" class="headerButton libraryMenuButton barsMenuButton headerButtonLeft">';
|
||||
html += '<img src="css/images/menu.png" />';
|
||||
html += '</button>';
|
||||
|
||||
html += '<div class="libraryMenuButtonText headerButton"><span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></div>';
|
||||
|
||||
html += '<div class="viewMenuSecondary">';
|
||||
|
||||
html += '<a href="nowplaying.html" class="headerButton headerButtonRight headerRemoteButton"><img src="css/images/remote.png" /></a>';
|
||||
|
||||
html += '<button id="btnCast" class="btnCast btnDefaultCast headerButton headerButtonRight" type="button" data-role="none"><div class="btnCastImage"></div></button>';
|
||||
html += '<button id="btnCast" class="btnCast btnDefaultCast headerButton headerButtonRight" type="button" data-role="none"><div class="headerSelectedPlayer"></div><div class="btnCastImage"></div></button>';
|
||||
|
||||
html += '<button onclick="Search.showSearchPanel($.mobile.activePage);" type="button" data-role="none" class="headerButton headerButtonRight headerSearchButton"><img src="css/images/headersearch.png" /></button>';
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
html += '<a href="dashboard.html" class="headerButton headerButtonRight headerSettingsButton"><img src="css/images/items/folders/settings.png" /></a>';
|
||||
}
|
||||
|
||||
html += '<a class="headerButton headerButtonRight" href="#" onclick="Dashboard.showUserFlyout(this);">';
|
||||
html += '<a class="headerButton headerButtonRight headerUserButton" href="#" onclick="Dashboard.showUserFlyout(this);">';
|
||||
|
||||
var userButtonHeight = 22;
|
||||
if (user.PrimaryImageTag) {
|
||||
|
||||
var url = ApiClient.getUserImageUrl(user.Id, {
|
||||
height: 18,
|
||||
height: userButtonHeight,
|
||||
tag: user.PrimaryImageTag,
|
||||
type: "Primary"
|
||||
});
|
||||
|
||||
html += '<img src="' + url + '" />';
|
||||
html += '<img src="' + url + '" style="height:' + userButtonHeight + 'px;" />';
|
||||
} else {
|
||||
html += '<img src="css/images/currentuserdefaultwhite.png" />';
|
||||
html += '<img src="css/images/currentuserdefaultwhite.png" style="height:' + userButtonHeight + 'px;" />';
|
||||
}
|
||||
|
||||
html += '</a>';
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
html += '<a href="dashboard.html" class="headerButton headerButtonRight"><img src="css/images/items/folders/settings.png" /></a>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
$(document.body).prepend(html);
|
||||
$('.viewMenuBar').trigger('create');
|
||||
|
||||
$(document).trigger('headercreated');
|
||||
|
||||
$('.libraryMenuButton').createHoverTouch().on('hovertouch', showLibraryMenu);
|
||||
$('.dashboardMenuButton').createHoverTouch().on('hovertouch', showDashboardMenu);
|
||||
}
|
||||
|
||||
function getItemHref(item) {
|
||||
|
@ -76,9 +83,23 @@
|
|||
|
||||
function showLibraryMenu() {
|
||||
|
||||
var panel = getLibraryMenu();
|
||||
var page = $.mobile.activePage;
|
||||
var panel;
|
||||
|
||||
updateLibraryNavLinks($.mobile.activePage);
|
||||
panel = getLibraryMenu();
|
||||
updateLibraryNavLinks(page);
|
||||
|
||||
$(panel).panel('toggle').off('mouseleave.librarymenu').on('mouseleave.librarymenu', function () {
|
||||
|
||||
$(this).panel("close");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function showDashboardMenu() {
|
||||
|
||||
var page = $.mobile.activePage;
|
||||
var panel = getDashboardMenu(page);
|
||||
|
||||
$(panel).panel('toggle').off('mouseleave.librarymenu').on('mouseleave.librarymenu', function () {
|
||||
|
||||
|
@ -131,6 +152,8 @@
|
|||
});
|
||||
}
|
||||
|
||||
var requiresLibraryMenuRefresh = false;
|
||||
|
||||
function getLibraryMenu() {
|
||||
|
||||
var panel = $('#libraryPanel');
|
||||
|
@ -157,6 +180,33 @@
|
|||
|
||||
updateLibraryMenu();
|
||||
}
|
||||
else if (requiresLibraryMenuRefresh) {
|
||||
updateLibraryMenu();
|
||||
requiresLibraryMenuRefresh = false;
|
||||
}
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
function getDashboardMenu(page) {
|
||||
|
||||
var panel = $('#dashboardPanel', page);
|
||||
|
||||
if (!panel.length) {
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div data-role="panel" id="dashboardPanel" class="dashboardPanel" data-position="left" data-display="overlay" data-position-fixed="true" data-theme="b">';
|
||||
|
||||
html += '<div style="margin: 0 -1em;">';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
$(document.body).append(html);
|
||||
panel = $('#dashboardPanel').panel({}).trigger('create');
|
||||
}
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
@ -187,10 +237,12 @@
|
|||
if (info.isLocalPlayer) {
|
||||
|
||||
$('.btnCast').addClass('btnDefaultCast').removeClass('btnActiveCast');
|
||||
$('.headerSelectedPlayer').html('');
|
||||
|
||||
} else {
|
||||
|
||||
$('.btnCast').removeClass('btnDefaultCast').addClass('btnActiveCast');
|
||||
$('.headerSelectedPlayer').html(info.deviceName || info.name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,12 +309,30 @@
|
|||
$('.libraryMenuButtonText').html('<span>' + name + '</span>');
|
||||
|
||||
}
|
||||
else if ($(page).hasClass('allLibraryPage')) {
|
||||
//else if ($(page).hasClass('type-interior')) {
|
||||
|
||||
// $('.libraryMenuButtonText').html('<span>' + 'Dashboard' + '</span>');
|
||||
|
||||
//}
|
||||
else if ($(page).hasClass('allLibraryPage') || $(page).hasClass('type-interior')) {
|
||||
$('.libraryMenuButtonText').html('<span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span>');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinit', ".libraryPage", function () {
|
||||
function onWebSocketMessage(e, data) {
|
||||
|
||||
var msg = data;
|
||||
|
||||
if (msg.MessageType === "UserConfigurationUpdated") {
|
||||
|
||||
if (msg.Data.Id == Dashboard.getCurrentUserId()) {
|
||||
|
||||
requiresLibraryMenuRefresh = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinit', ".page", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -274,10 +344,9 @@
|
|||
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', ".libraryPage", function () {
|
||||
}).on('pagebeforeshow', ".page:not(.standalonePage)", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if (!$('.viewMenuBar').length) {
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
@ -294,14 +363,25 @@
|
|||
updateLibraryNavLinks(page);
|
||||
}
|
||||
|
||||
var jpage = $(page);
|
||||
|
||||
if (jpage.hasClass('libraryPage')) {
|
||||
$(document.body).addClass('libraryDocument').removeClass('dashboardDocument');
|
||||
}
|
||||
else if (jpage.hasClass('type-interior')) {
|
||||
$(document.body).addClass('dashboardDocument').removeClass('libraryDocument');
|
||||
} else {
|
||||
$(document.body).removeClass('dashboardDocument').removeClass('libraryDocument');
|
||||
}
|
||||
|
||||
}).on('pagebeforeshow', ".page", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if ($(page).hasClass('libraryPage')) {
|
||||
$('.viewMenuBar').show();
|
||||
} else {
|
||||
if ($(page).hasClass('standalonePage')) {
|
||||
$('.viewMenuBar').hide();
|
||||
} else {
|
||||
$('.viewMenuBar').show();
|
||||
}
|
||||
|
||||
}).on('pageshow', ".libraryPage", function () {
|
||||
|
@ -316,8 +396,6 @@
|
|||
// Scroll back up so in case vertical scroll was messed with
|
||||
$(document).scrollTop(0);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$(function () {
|
||||
|
@ -326,6 +404,7 @@
|
|||
updateCastIcon();
|
||||
});
|
||||
|
||||
$(ApiClient).on('websocketmessage', onWebSocketMessage);
|
||||
});
|
||||
|
||||
})(window, document, jQuery);
|
||||
|
|
|
@ -430,7 +430,7 @@
|
|||
|
||||
var mirror = (!target.isLocalPlayer && target.supportedCommands.indexOf('DisplayContent') != -1) ? 'true' : 'false';
|
||||
|
||||
html += '<input type="radio" class="radioSelectPlayerTarget" name="radioSelectPlayerTarget" data-mirror="' + mirror + '" data-commands="' + target.supportedCommands.join(',') + '" data-mediatypes="' + target.playableMediaTypes.join(',') + '" data-playername="' + target.playerName + '" data-targetid="' + target.id + '" data-targetname="' + target.name + '" id="' + id + '" value="' + target.id + '"' + checkedHtml + '>';
|
||||
html += '<input type="radio" class="radioSelectPlayerTarget" name="radioSelectPlayerTarget" data-mirror="' + mirror + '" data-commands="' + target.supportedCommands.join(',') + '" data-mediatypes="' + target.playableMediaTypes.join(',') + '" data-playername="' + target.playerName + '" data-targetid="' + target.id + '" data-targetname="' + target.name + '" data-devicename="' + target.deviceName + '" id="' + id + '" value="' + target.id + '"' + checkedHtml + '>';
|
||||
html += '<label for="' + id + '" style="font-weight:normal;">' + target.name;
|
||||
|
||||
if (target.appName) {
|
||||
|
@ -460,6 +460,9 @@
|
|||
|
||||
html += '<div class="players"></div>';
|
||||
|
||||
html += '<br/>';
|
||||
html += '<p><a href="nowplaying.html" data-role="button" data-mini="true" data-icon="remote">' + Globalize.translate('ButtonRemoteControl') + '</a></p>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
$(document.body).append(html);
|
||||
|
@ -506,6 +509,7 @@
|
|||
var playerName = this.getAttribute('data-playername');
|
||||
var targetId = this.getAttribute('data-targetid');
|
||||
var targetName = this.getAttribute('data-targetname');
|
||||
var deviceName = this.getAttribute('data-deviceName');
|
||||
var playableMediaTypes = this.getAttribute('data-mediatypes').split(',');
|
||||
var supportedCommands = this.getAttribute('data-commands').split(',');
|
||||
|
||||
|
@ -513,7 +517,8 @@
|
|||
id: targetId,
|
||||
name: targetName,
|
||||
playableMediaTypes: playableMediaTypes,
|
||||
supportedCommands: supportedCommands
|
||||
supportedCommands: supportedCommands,
|
||||
deviceName: deviceName
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,21 +1,8 @@
|
|||
(function () {
|
||||
videoPlayer = function (mediaPlayer, item, mediaSource, startPosition, user) {
|
||||
if (mediaPlayer == null) {
|
||||
throw new Error("mediaPlayer cannot be null");
|
||||
}
|
||||
|
||||
if (item == null) {
|
||||
throw new Error("item cannot be null");
|
||||
}
|
||||
|
||||
if (user == null) {
|
||||
throw new Error("user cannot be null");
|
||||
}
|
||||
|
||||
var self = mediaPlayer;
|
||||
function createVideoPlayer(self) {
|
||||
|
||||
var timeout;
|
||||
var video;
|
||||
var initialVolume;
|
||||
var fullscreenExited = false;
|
||||
var idleState = true;
|
||||
|
@ -30,12 +17,6 @@
|
|||
|
||||
self.currentSubtitleStreamIndex = null;
|
||||
|
||||
self.initVideoPlayer = function () {
|
||||
video = playVideo(item, mediaSource, startPosition);
|
||||
|
||||
return video;
|
||||
};
|
||||
|
||||
self.getCurrentSubtitleStream = function () {
|
||||
return self.getSubtitleStream(self.currentSubtitleStreamIndex);
|
||||
};
|
||||
|
@ -219,7 +200,7 @@
|
|||
return s.Type == 'Subtitle' && s.IsTextSubtitleStream;
|
||||
});
|
||||
|
||||
var allTracks = video.textTracks; // get list of tracks
|
||||
var allTracks = self.currentMediaElement.textTracks; // get list of tracks
|
||||
|
||||
for (var i = 0; i < allTracks.length; i++) {
|
||||
|
||||
|
@ -239,7 +220,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var allTracks = video.textTracks; // get list of tracks
|
||||
var allTracks = self.currentMediaElement.textTracks; // get list of tracks
|
||||
|
||||
for (var i = 0; i < allTracks.length; i++) {
|
||||
|
||||
|
@ -256,7 +237,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
$('track', video).each(function () {
|
||||
$('track', self.currentMediaElement).each(function () {
|
||||
|
||||
var currentSrc = this.src;
|
||||
|
||||
|
@ -267,22 +248,6 @@
|
|||
});
|
||||
};
|
||||
|
||||
$(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function (e) {
|
||||
|
||||
var videoControls = $('#videoControls');
|
||||
|
||||
$('.itemVideo').off('mousemove keydown scroll', idleHandler);
|
||||
|
||||
if (self.isFullScreen()) {
|
||||
enterFullScreen();
|
||||
idleState = true;
|
||||
$('.itemVideo').on('mousemove keydown scroll', idleHandler).trigger('mousemove');
|
||||
} else {
|
||||
videoControls.removeClass("active inactive");
|
||||
exitFullScreenToWindow();
|
||||
}
|
||||
});
|
||||
|
||||
function onPositionSliderChange() {
|
||||
|
||||
isPositionSliderActive = false;
|
||||
|
@ -365,12 +330,6 @@
|
|||
hideFlyout($('#video-qualityFlyout'));
|
||||
});
|
||||
|
||||
$("body").on("mousemove", "#videoPlayer.fullscreenVideo #itemVideo", function () {
|
||||
|
||||
idleHandler(this);
|
||||
|
||||
});
|
||||
|
||||
var trackChange = false;
|
||||
|
||||
var tooltip = $('<div id="slider-tooltip"></div>');
|
||||
|
@ -399,9 +358,18 @@
|
|||
|
||||
tooltip.remove();
|
||||
});
|
||||
|
||||
$(".mediaFlyoutContainer").on("click", "a", function (e) {
|
||||
if (confirm("This option will close the video player. Proceed?")) {
|
||||
self.stop();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function idleHandler() {
|
||||
|
||||
var video = $(".itemVideo");
|
||||
var videoControls = $("#videoControls");
|
||||
|
||||
|
@ -447,14 +415,6 @@
|
|||
|
||||
}
|
||||
|
||||
function changeHandler(event) {
|
||||
|
||||
document.addEventListener(event, function () {
|
||||
fullscreenExited = self.isFullScreen() == false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function enterFullScreen() {
|
||||
|
||||
var player = $("#videoPlayer");
|
||||
|
@ -512,6 +472,7 @@
|
|||
$(document.body).off("mousedown.hidesearchhints");
|
||||
}
|
||||
|
||||
|
||||
function getChaptersFlyoutHtml() {
|
||||
|
||||
var html = '';
|
||||
|
@ -577,7 +538,7 @@
|
|||
return currentStream.Type == "Audio";
|
||||
});
|
||||
|
||||
var currentIndex = getParameterByName('AudioStreamIndex', video.currentSrc);
|
||||
var currentIndex = getParameterByName('AudioStreamIndex', self.currentMediaElement.currentSrc);
|
||||
|
||||
var html = '';
|
||||
|
||||
|
@ -716,12 +677,12 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
var currentSrc = video.currentSrc.toLowerCase();
|
||||
var currentSrc = self.currentMediaElement.currentSrc.toLowerCase();
|
||||
var isStatic = currentSrc.indexOf('static=true') != -1;
|
||||
|
||||
var transcodingExtension = self.getTranscodingExtension();
|
||||
|
||||
var currentAudioStreamIndex = getParameterByName('AudioStreamIndex', video.currentSrc);
|
||||
var currentAudioStreamIndex = getParameterByName('AudioStreamIndex', self.currentMediaElement.currentSrc);
|
||||
|
||||
var options = getVideoQualityOptions(self.currentMediaSource.MediaStreams, currentAudioStreamIndex, transcodingExtension);
|
||||
|
||||
|
@ -833,7 +794,66 @@
|
|||
return options;
|
||||
}
|
||||
|
||||
function playVideo(item, mediaSource, startPosition) {
|
||||
function bindEventsForPlayback() {
|
||||
|
||||
$(document).on('webkitfullscreenchange.videoplayer mozfullscreenchange.videoplayer fullscreenchange.videoplayer', function (e) {
|
||||
|
||||
$('.itemVideo').off('mousemove.videoplayer keydown.videoplayer scroll.videoplayer', idleHandler);
|
||||
|
||||
if (self.isFullScreen()) {
|
||||
enterFullScreen();
|
||||
idleState = true;
|
||||
$('.itemVideo').on('mousemove.videoplayer keydown.videoplayer scroll.videoplayer', idleHandler).trigger('mousemove');
|
||||
|
||||
} else {
|
||||
$('#videoControls').removeClass("active inactive");
|
||||
exitFullScreenToWindow();
|
||||
}
|
||||
|
||||
fullscreenExited = self.isFullScreen() == false;
|
||||
|
||||
}).on("msfullscreenchange.videoplayer", function (e) {
|
||||
|
||||
fullscreenExited = self.isFullScreen() == false;
|
||||
|
||||
}).on("keyup.videoplayer", function (e) {
|
||||
|
||||
if (fullscreenExited) {
|
||||
$("#videoPlayer", $("#mediaPlayer")).removeClass("fullscreenVideo");
|
||||
fullscreenExited = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.keyCode == 27) {
|
||||
self.stop();
|
||||
}
|
||||
});
|
||||
|
||||
// Stop playback on browser back button nav
|
||||
$(window).one("popstate.videoplayer", function () {
|
||||
self.stop();
|
||||
return;
|
||||
});
|
||||
|
||||
$(document.body).on("mousemove.videplayer", "#videoPlayer.fullscreenVideo #itemVideo", function () {
|
||||
|
||||
idleHandler(this);
|
||||
});
|
||||
}
|
||||
|
||||
function unbindEventsForPlayback() {
|
||||
|
||||
$(document).off('webkitfullscreenchange.videoplayer mozfullscreenchange.videoplayer fullscreenchange.videoplayer').off("msfullscreenchange.videoplayer").off("keyup.videoplayer");
|
||||
|
||||
// Stop playback on browser back button nav
|
||||
$(window).off("popstate.videoplayer");
|
||||
|
||||
$(document.body).off("mousemove.videplayer", "#videoPlayer.fullscreenVideo #itemVideo");
|
||||
|
||||
$('.itemVideo').off('mousemove.videoplayer keydown.videoplayer scroll.videoplayer');
|
||||
}
|
||||
|
||||
self.playVideo = function (item, mediaSource, startPosition) {
|
||||
|
||||
var mediaStreams = mediaSource.MediaStreams || [];
|
||||
|
||||
|
@ -892,18 +912,15 @@
|
|||
|
||||
// None of the browsers seem to like this
|
||||
EnableAutoStreamCopy: false
|
||||
|
||||
})) + seekParam;
|
||||
|
||||
var webmVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.webm', $.extend({}, baseParams, {
|
||||
|
||||
VideoCodec: 'vpx',
|
||||
AudioCodec: 'Vorbis',
|
||||
maxWidth: webmQuality.maxWidth,
|
||||
videoBitrate: webmQuality.videoBitrate,
|
||||
audioBitrate: webmQuality.audioBitrate,
|
||||
EnableAutoStreamCopy: false
|
||||
|
||||
})) + seekParam;
|
||||
|
||||
var hlsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.m3u8', $.extend({}, baseParams, {
|
||||
|
@ -915,7 +932,6 @@
|
|||
AudioCodec: m3U8Quality.audioCodec,
|
||||
profile: 'baseline',
|
||||
level: '3'
|
||||
|
||||
})) + seekParam;
|
||||
|
||||
//======================================================================================>
|
||||
|
@ -975,9 +991,8 @@
|
|||
|
||||
html += '</video>';
|
||||
|
||||
var mediaPlayer = $("#mediaPlayer").show();
|
||||
var videoPlayer = $("#videoPlayer", mediaPlayer);
|
||||
var videoControls = $('#videoControls', mediaPlayer);
|
||||
var mediaPlayerContainer = $("#mediaPlayer").show();
|
||||
var videoControls = $('#videoControls', mediaPlayerContainer);
|
||||
|
||||
//show stop button
|
||||
$('#video-stopButton', videoControls).show();
|
||||
|
@ -985,7 +1000,8 @@
|
|||
$('#video-pauseButton', videoControls).show();
|
||||
$('#video-previousTrackButton', videoControls).hide();
|
||||
$('#video-nextTrackButton', videoControls).hide();
|
||||
var videoElement = $('#videoElement', mediaPlayer).prepend(html);
|
||||
|
||||
var videoElement = $('#videoElement', mediaPlayerContainer).prepend(html);
|
||||
|
||||
$('#video-qualityButton', videoControls).show();
|
||||
|
||||
|
@ -1000,7 +1016,8 @@
|
|||
if (subtitleStreams.length) {
|
||||
$('#video-subtitleButton', videoControls).show().prop("disabled", false);
|
||||
} else {
|
||||
$('#video-subtitleButton', videoControls).hide().prop("disabled", true);;
|
||||
$('#video-subtitleButton', videoControls).hide().prop("disabled", true);
|
||||
;
|
||||
}
|
||||
|
||||
if (item.Chapters && item.Chapters.length) {
|
||||
|
@ -1026,17 +1043,17 @@
|
|||
volumeSlider.val(initialVolume).slider('refresh');
|
||||
updateVolumeButtons(initialVolume);
|
||||
|
||||
video.on("volumechange", function (e) {
|
||||
video.on("volumechange.mediaplayerevent", function (e) {
|
||||
|
||||
var vol = this.volume;
|
||||
|
||||
updateVolumeButtons(vol);
|
||||
|
||||
}).one("playing", function () {
|
||||
}).one("playing.mediaplayerevent", function () {
|
||||
|
||||
self.onPlaybackStart(this, item, mediaSource);
|
||||
|
||||
}).on("pause", function (e) {
|
||||
}).on("pause.mediaplayerevent", function (e) {
|
||||
|
||||
$('#video-playButton', videoControls).show();
|
||||
$('#video-pauseButton', videoControls).hide();
|
||||
|
@ -1050,7 +1067,7 @@
|
|||
self.stop();
|
||||
}, 5 * 60 * 1000); // 5 minutes
|
||||
|
||||
}).on("playing", function (e) {
|
||||
}).on("playing.mediaplayerevent", function (e) {
|
||||
|
||||
$('#video-playButton', videoControls).hide();
|
||||
$('#video-pauseButton', videoControls).show();
|
||||
|
@ -1062,14 +1079,14 @@
|
|||
// Remove pause setop timer
|
||||
self.clearPauseStop();
|
||||
|
||||
}).on("timeupdate", function () {
|
||||
}).on("timeupdate.mediaplayerevent", function () {
|
||||
|
||||
if (!isPositionSliderActive) {
|
||||
|
||||
self.setCurrentTime(self.getCurrentTicks(this), positionSlider, currentTimeElement);
|
||||
}
|
||||
|
||||
}).on("error", function () {
|
||||
}).on("error.mediaplayerevent", function () {
|
||||
|
||||
self.clearPauseStop();
|
||||
|
||||
|
@ -1090,7 +1107,7 @@
|
|||
message: errorMsg
|
||||
});
|
||||
|
||||
}).on("click", function (e) {
|
||||
}).on("click.mediaplayerevent", function (e) {
|
||||
|
||||
if (this.paused) {
|
||||
self.unpause();
|
||||
|
@ -1098,23 +1115,23 @@
|
|||
self.pause();
|
||||
}
|
||||
|
||||
}).on("dblclick", function () {
|
||||
}).on("dblclick.mediaplayerevent", function () {
|
||||
|
||||
self.toggleFullscreen();
|
||||
|
||||
}).on("seeking", function (e) {
|
||||
}).on("seeking.mediaplayerevent", function (e) {
|
||||
|
||||
$("html").css("cursor", "wait");
|
||||
|
||||
}).on("seeked", function (e) {
|
||||
}).on("seeked.mediaplayerevent", function (e) {
|
||||
|
||||
$("html").css("cursor", "default");
|
||||
|
||||
}).on("loadstart", function () {
|
||||
}).on("loadstart.mediaplayerevent", function () {
|
||||
|
||||
$("html").css("cursor", "progress");
|
||||
|
||||
}).on("canplay", function () {
|
||||
}).on("canplay.mediaplayerevent", function () {
|
||||
|
||||
$("html").css("cursor", "default");
|
||||
|
||||
|
@ -1124,47 +1141,22 @@
|
|||
|
||||
self.onPlaybackStopped.call(this);
|
||||
|
||||
unbindEventsForPlayback();
|
||||
|
||||
}).on('ended.playnext', self.playNextAfterEnded);
|
||||
|
||||
// Stop playback on browser back button nav
|
||||
$(window).on("popstate", function () {
|
||||
self.stop();
|
||||
return;
|
||||
});
|
||||
bindEventsForPlayback();
|
||||
|
||||
$(".mediaFlyoutContainer").on("click", "a", function (e) {
|
||||
if (confirm("This option will close the video player. Proceed?")) {
|
||||
self.stop();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
changeHandler("fullscreenchange");
|
||||
changeHandler("mozfullscreenchange");
|
||||
changeHandler("webkitfullscreenchange");
|
||||
changeHandler("msfullscreenchange");
|
||||
|
||||
$(document).on("keyup.enhancePlayer", function (e) {
|
||||
if (fullscreenExited) {
|
||||
videoPlayer.removeClass("fullscreenVideo");
|
||||
fullscreenExited = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.keyCode == 27) {
|
||||
self.stop();
|
||||
$(this).off("keyup.enhancePlayer");
|
||||
}
|
||||
});
|
||||
|
||||
mediaPlayer.trigger("create");
|
||||
mediaPlayerContainer.trigger("create");
|
||||
|
||||
fullscreenExited = false;
|
||||
|
||||
self.currentSubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex;
|
||||
|
||||
return video[0];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
createVideoPlayer(MediaPlayer);
|
||||
|
||||
})();
|
|
@ -475,8 +475,7 @@
|
|||
self.currentItem = item;
|
||||
self.currentMediaSource = getOptimalMediaSource(item.MediaType, item.MediaSources);
|
||||
|
||||
videoPlayer(self, item, self.currentMediaSource, startPosition, user);
|
||||
mediaElement = self.initVideoPlayer();
|
||||
mediaElement = self.playVideo(item, self.currentMediaSource, startPosition);
|
||||
self.currentDurationTicks = self.currentMediaSource.RunTimeTicks;
|
||||
|
||||
} else if (item.MediaType === "Audio") {
|
||||
|
@ -940,7 +939,7 @@
|
|||
|
||||
var isVideo = self.currentItem.MediaType == "Video";
|
||||
|
||||
$(elem).off("ended.playnext").on("ended", function () {
|
||||
$(elem).off("ended.playnext").one("ended", function () {
|
||||
|
||||
$(this).off();
|
||||
|
||||
|
@ -1106,7 +1105,7 @@
|
|||
|
||||
var playerElement = this;
|
||||
|
||||
$(playerElement).off('ended.playbackstopped');
|
||||
$(playerElement).off('.mediaplayerevent').off('ended.playbackstopped');
|
||||
|
||||
clearProgressInterval();
|
||||
|
||||
|
@ -1259,25 +1258,25 @@
|
|||
this.volume = initialVolume;
|
||||
this.play();
|
||||
|
||||
}).on("volumechange", function () {
|
||||
}).on("volumechange.mediaplayerevent", function () {
|
||||
|
||||
self.onVolumeChanged(this);
|
||||
|
||||
}).one("playing", function () {
|
||||
}).one("playing.mediaplayerevent", function () {
|
||||
|
||||
$('.mediaPlayerAudioContainer').hide();
|
||||
|
||||
self.onPlaybackStart(this, item, mediaSource);
|
||||
|
||||
}).on("pause", function () {
|
||||
}).on("pause.mediaplayerevent", function () {
|
||||
|
||||
self.onPlaystateChange(this);
|
||||
|
||||
}).on("playing", function () {
|
||||
}).on("playing.mediaplayerevent", function () {
|
||||
|
||||
self.onPlaystateChange(this);
|
||||
|
||||
}).on("timeupdate", function () {
|
||||
}).on("timeupdate.mediaplayerevent", function () {
|
||||
|
||||
self.setCurrentTime(self.getCurrentTicks(this));
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
self.getNotificationsSummary().done(function (summary) {
|
||||
|
||||
var item = $('.btnNotifications').removeClass('levelNormal').removeClass('levelWarning').removeClass('levelError').html(summary.UnreadCount);
|
||||
var item = $('.btnNotificationsInner').removeClass('levelNormal').removeClass('levelWarning').removeClass('levelError').html(summary.UnreadCount);
|
||||
|
||||
if (summary.UnreadCount) {
|
||||
item.addClass('level' + summary.MaxUnreadNotificationLevel);
|
||||
|
@ -207,13 +207,9 @@
|
|||
|
||||
window.Notifications = new notifications();
|
||||
|
||||
$(Dashboard).on('interiorheaderrendered', function (e, header, user) {
|
||||
$(document).on('headercreated', function (e) {
|
||||
|
||||
if (!user || $('.notificationsButton', header).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('<a class="imageLink btnNotifications" href="#" title="Notifications">0</a>').insertAfter($('.btnCurrentUser', header)).on('click', Notifications.showNotificationsFlyout);
|
||||
$('<a class="headerButton headerButtonRight btnNotifications" href="#" title="Notifications"><div class="btnNotificationsInner">0</div></a>').insertBefore($('.headerUserButton')).on('click', Notifications.showNotificationsFlyout);
|
||||
|
||||
Notifications.updateNotificationCount();
|
||||
});
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
html += '<div style="display:inline-block;width:12px;"></div>';
|
||||
html += '<a id="playlistButton" class="mediaButton playlistButton" href="playlist.html" data-role="button" data-icon="bullets" data-iconpos="notext" data-inline="true" title="' + Globalize.translate('ButtonPlaylist') + '">' + Globalize.translate('ButtonPlaylist') + '</a>';
|
||||
html += '<button id="previousTrackButton" class="mediaButton previousTrackButton" title="' + Globalize.translate('ButtonPreviousTrack') + '" type="button" data-icon="previous-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPreviousTrack') + '</button>';
|
||||
|
||||
html += '<a class="mediaButton remoteControlButton" title="' + Globalize.translate('ButtonRemoteControl') + '" href="nowplaying.html" data-role="button" data-icon="remote" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonRemoteControl') + '</a>';
|
||||
|
||||
html += '<button id="playButton" class="mediaButton unpauseButton" title="' + Globalize.translate('ButtonPlay') + '" type="button" data-icon="play" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPlay') + '</button>';
|
||||
html += '<button id="pauseButton" class="mediaButton pauseButton" title="' + Globalize.translate('ButtonPause') + '" type="button" data-icon="pause" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPause') + '</button>';
|
||||
|
||||
|
|
|
@ -252,6 +252,7 @@
|
|||
}).map(function (s) {
|
||||
return {
|
||||
name: s.DeviceName,
|
||||
deviceName: s.DeviceName,
|
||||
id: s.Id,
|
||||
playerName: self.name,
|
||||
appName: s.Client,
|
||||
|
|
|
@ -59,30 +59,13 @@ var Dashboard = {
|
|||
return Dashboard.getUserPromise;
|
||||
},
|
||||
|
||||
validateCurrentUser: function (page) {
|
||||
validateCurrentUser: function () {
|
||||
|
||||
Dashboard.getUserPromise = null;
|
||||
|
||||
if (Dashboard.getCurrentUserId()) {
|
||||
Dashboard.getCurrentUser();
|
||||
}
|
||||
|
||||
page = page || $.mobile.activePage;
|
||||
|
||||
var header = $('.header', page);
|
||||
|
||||
if (header.length) {
|
||||
// Re-render the header
|
||||
header.remove();
|
||||
|
||||
if (Dashboard.getUserPromise) {
|
||||
Dashboard.getUserPromise.done(function (user) {
|
||||
Dashboard.ensureHeader(page, user);
|
||||
});
|
||||
} else {
|
||||
Dashboard.ensureHeader(page);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getCurrentUserId: function () {
|
||||
|
@ -544,21 +527,21 @@ var Dashboard = {
|
|||
Dashboard.validateCurrentUser();
|
||||
},
|
||||
|
||||
ensureHeader: function (page, user) {
|
||||
ensureHeader: function (page) {
|
||||
|
||||
if (!page.hasClass('libraryPage') && !$('.headerButtons', page).length) {
|
||||
if (page.hasClass('standalonePage')) {
|
||||
|
||||
Dashboard.renderHeader(page, user);
|
||||
Dashboard.renderHeader(page);
|
||||
}
|
||||
},
|
||||
|
||||
renderHeader: function (page, user) {
|
||||
|
||||
var headerHtml = '';
|
||||
renderHeader: function (page) {
|
||||
|
||||
var header = $('.header', page);
|
||||
|
||||
if (!header.length) {
|
||||
var headerHtml = '';
|
||||
|
||||
headerHtml += '<div class="header">';
|
||||
|
||||
headerHtml += '<a class="logo" href="index.html">';
|
||||
|
@ -570,67 +553,9 @@ var Dashboard = {
|
|||
|
||||
headerHtml += '</a>';
|
||||
|
||||
if (page.hasClass('type-interior')) {
|
||||
headerHtml += '<div>';
|
||||
headerHtml += '<button type="button" data-icon="bars" data-inline="true" data-iconpos="notext" class="ui-alt-icon" onclick="Dashboard.showDashboardMenu();">Menu</button>';
|
||||
headerHtml += '</div>';
|
||||
}
|
||||
|
||||
headerHtml += '</div>';
|
||||
page.prepend(headerHtml);
|
||||
|
||||
header = $('.header', page).trigger('create');
|
||||
}
|
||||
|
||||
var imageColor = "black";
|
||||
|
||||
headerHtml = '';
|
||||
headerHtml += '<div class="headerButtons">';
|
||||
|
||||
if (user && !page.hasClass('wizardPage')) {
|
||||
|
||||
headerHtml += '<a class="imageLink btnCurrentUser" href="#" onclick="Dashboard.showUserFlyout(this);"><span class="currentUsername" style="font-weight:normal;">' + user.Name + '</span>';
|
||||
|
||||
if (user.PrimaryImageTag) {
|
||||
|
||||
var url = ApiClient.getUserImageUrl(user.Id, {
|
||||
width: 28,
|
||||
tag: user.PrimaryImageTag,
|
||||
type: "Primary"
|
||||
});
|
||||
|
||||
headerHtml += '<img src="' + url + '" />';
|
||||
} else {
|
||||
headerHtml += '<img src="css/images/currentuserdefault' + imageColor + '.png" />';
|
||||
}
|
||||
headerHtml += '</a>';
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
|
||||
var href = window.location.toString().toLowerCase().indexOf('dashboard.html') == -1 ? 'dashboard.html' : '#';
|
||||
|
||||
headerHtml += '<a class="imageLink btnTools" href="' + href + '" data-role="button" data-icon="gear" data-inline="true" data-iconpos="notext">Tools</a>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
headerHtml += '</div>';
|
||||
|
||||
header.append(headerHtml).trigger('create');
|
||||
|
||||
if (!$('.supporterIcon', header).length) {
|
||||
|
||||
Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) {
|
||||
|
||||
if (pluginSecurityInfo.IsMBSupporter) {
|
||||
$('<a class="imageLink supporterIcon" href="supporter.html" title="Thank you for supporting Media Browser."><img src="css/images/supporter/supporterbadge.png" /></a>').insertBefore($('.btnTools', header));
|
||||
} else {
|
||||
$('<a class="imageLink supporterIcon" href="supporter.html" title="Become a Media Browser supporter!"><img src="css/images/supporter/nonsupporterbadge.png" /></a>').insertBefore($('.btnTools', header));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(Dashboard).trigger('interiorheaderrendered', [header, user]);
|
||||
},
|
||||
|
||||
ensureToolsMenu: function (page, user) {
|
||||
|
@ -645,11 +570,8 @@ var Dashboard = {
|
|||
|
||||
var html = '<div class="content-secondary ui-bar-a toolsSidebar">';
|
||||
|
||||
html += '<p class="libraryPanelHeader" style="margin: 30px 0 20px 25px;"><a href="index.html" class="imageLink"><img src="css/images/mblogoicon.png" style="height:28px;" /><span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></a></p>';
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
html += '<div style="position:absolute;top:20px;right:20px;"><a data-role="button" data-theme="b" data-icon="edit" data-iconpos="notext" href="edititemmetadata.html" title="Metadata Manager">Metadata Manager</a></div>';
|
||||
}
|
||||
//html += '<p class="libraryPanelHeader" style="margin: 25px 0 20px 20px;"><a href="index.html" class="imageLink"><img src="css/images/mblogoicon.png" style="height:28px;" /><span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></a></p>';
|
||||
html += '<br/>';
|
||||
|
||||
html += '<div class="sidebarLinks">';
|
||||
|
||||
|
@ -688,7 +610,7 @@ var Dashboard = {
|
|||
|
||||
html += '<div data-role="panel" id="dashboardPanel" class="dashboardPanel" data-position="left" data-display="overlay" data-position-fixed="true" data-theme="b">';
|
||||
|
||||
html += '<p class="libraryPanelHeader" style="margin: 20px 0 20px 15px;"><a href="index.html" class="imageLink"><img src="css/images/mblogoicon.png" /><span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></a></p>';
|
||||
html += '<p class="libraryPanelHeader" style="margin: 15px 0 15px 15px;"><a href="index.html" class="imageLink"><img src="css/images/mblogoicon.png" /><span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></a></p>';
|
||||
|
||||
for (i = 0, length = links.length; i < length; i++) {
|
||||
|
||||
|
@ -719,13 +641,6 @@ var Dashboard = {
|
|||
}
|
||||
},
|
||||
|
||||
showDashboardMenu: function () {
|
||||
|
||||
var page = $.mobile.activePage;
|
||||
|
||||
$("#dashboardPanel", page).panel("open");
|
||||
},
|
||||
|
||||
getToolsMenuLinks: function (page) {
|
||||
|
||||
var pageElem = page[0];
|
||||
|
@ -906,7 +821,7 @@ var Dashboard = {
|
|||
else if (msg.MessageType === "RestartRequired") {
|
||||
Dashboard.updateSystemInfo(msg.Data);
|
||||
}
|
||||
else if (msg.MessageType === "UserUpdated") {
|
||||
else if (msg.MessageType === "UserUpdated" || msg.MessageType === "UserConfigurationUpdated") {
|
||||
Dashboard.validateCurrentUser();
|
||||
|
||||
var user = msg.Data;
|
||||
|
@ -952,15 +867,6 @@ var Dashboard = {
|
|||
}
|
||||
});
|
||||
}
|
||||
else if (msg.MessageType === "ScheduledTaskEnded") {
|
||||
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
Dashboard.showTaskCompletionNotification(msg.Data);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (msg.MessageType === "GeneralCommand") {
|
||||
|
||||
var cmd = msg.Data;
|
||||
|
@ -1007,35 +913,6 @@ var Dashboard = {
|
|||
|
||||
},
|
||||
|
||||
showTaskCompletionNotification: function (result) {
|
||||
|
||||
var html = '';
|
||||
|
||||
if (result.Status == "Completed") {
|
||||
html += '<img src="css/images/notifications/done.png" class="notificationIcon" />';
|
||||
return;
|
||||
}
|
||||
else if (result.Status == "Cancelled") {
|
||||
html += '<img src="css/images/notifications/info.png" class="notificationIcon" />';
|
||||
return;
|
||||
}
|
||||
else {
|
||||
html += '<img src="css/images/notifications/error.png" class="notificationIcon" />';
|
||||
}
|
||||
|
||||
html += '<span>';
|
||||
html += result.Name + " " + result.Status;
|
||||
html += '</span>';
|
||||
|
||||
var timeout = 0;
|
||||
|
||||
if (result.Status == 'Cancelled') {
|
||||
timeout = 2000;
|
||||
}
|
||||
|
||||
Dashboard.showFooterNotification({ html: html, id: result.Id, forceShow: true, timeout: timeout });
|
||||
},
|
||||
|
||||
showPackageInstallNotification: function (installation, status) {
|
||||
|
||||
var html = '';
|
||||
|
@ -1160,7 +1037,7 @@ var Dashboard = {
|
|||
parent = $('.ui-content', page)[0];
|
||||
}
|
||||
|
||||
$(parent).prepend("<h2 class='pageTitle'>" + (document.title || " ") + "</h2>");
|
||||
$(parent).prepend("<h1 class='pageTitle'>" + (document.title || " ") + "</h1>");
|
||||
},
|
||||
|
||||
setPageTitle: function (title) {
|
||||
|
@ -1439,7 +1316,7 @@ $(document).on('pagebeforeshow', ".page", function () {
|
|||
}
|
||||
|
||||
Dashboard.ensureToolsMenu(page, user);
|
||||
Dashboard.ensureHeader(page, user);
|
||||
Dashboard.ensureHeader(page);
|
||||
Dashboard.ensurePageTitle(page);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -51,8 +51,6 @@
|
|||
|
||||
var userId = getParameterByName("userId");
|
||||
|
||||
Dashboard.validateCurrentUser(page);
|
||||
|
||||
if (userId) {
|
||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||
} else {
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
|
||||
var page = $.mobile.activePage;
|
||||
|
||||
Dashboard.validateCurrentUser(page);
|
||||
reloadUser(page);
|
||||
}
|
||||
|
||||
|
|
|
@ -165,8 +165,6 @@
|
|||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
Dashboard.validateCurrentUser(page);
|
||||
|
||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
|
||||
ApiClient.deleteUser(id).done(function () {
|
||||
|
||||
Dashboard.validateCurrentUser(page);
|
||||
UserProfilesPage.loadPageData();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue