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;
|
width: 28px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 1px;
|
top: 2px;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnDefaultCast .btnCastImage {
|
.btnDefaultCast .btnCastImage {
|
||||||
|
@ -20,3 +21,21 @@
|
||||||
.btnDisabledCast .btnCastImage {
|
.btnDisabledCast .btnCastImage {
|
||||||
background-image: url(images/chromecast/ic_media_route_disabled_holo_dark.png);
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -130,4 +130,13 @@
|
||||||
|
|
||||||
.ui-nosvg .ui-icon-expand:after {
|
.ui-nosvg .ui-icon-expand:after {
|
||||||
background-image: url("images/icons/expand.png");
|
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;
|
border-width: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryMenuButton img {
|
.barsMenuButton img {
|
||||||
border: 1px solid #444 !important;
|
border: 1px solid #444 !important;
|
||||||
padding: .5em;
|
padding: .5em;
|
||||||
background-color: #181818;
|
background-color: #181818;
|
||||||
|
@ -70,16 +70,16 @@
|
||||||
height: 14px!important;
|
height: 14px!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryMenuButton:hover {
|
.barsMenuButton:hover {
|
||||||
opacity: 1!important;
|
opacity: 1!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryMenuButton img:hover {
|
.barsMenuButton img:hover {
|
||||||
background-color: #38c;
|
background-color: #38c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 600px) {
|
@media all and (min-width: 600px) {
|
||||||
.libraryMenuButton {
|
.barsMenuButton {
|
||||||
opacity: .9;
|
opacity: .9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,26 +126,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 460px) {
|
@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 {
|
.headerButtonLeft img {
|
||||||
height: 15px;
|
height: 15px;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +149,7 @@
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryMenuButton:hover {
|
.barsMenuButton:hover {
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,3 +302,21 @@
|
||||||
display: none;
|
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 */
|
/* Now playing bar */
|
||||||
.nowPlayingBar {
|
.nowPlayingBar {
|
||||||
padding: 6px 0 14px 0;
|
padding: 6px 0 14px 0;
|
||||||
border-top: 2px solid green;
|
border-top: 1px solid green;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nowPlayingBarImage {
|
.nowPlayingBarImage {
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nowPlayingDoubleText {
|
.nowPlayingDoubleText {
|
||||||
|
@ -122,6 +123,10 @@ input[type="range"]::-ms-fill-upper {
|
||||||
display: none; /* display and visibility only */
|
display: none; /* display and visibility only */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.remoteControlButton {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-width: 800px) {
|
@media all and (max-width: 800px) {
|
||||||
|
|
||||||
#nowPlayingBar .mediaButton {
|
#nowPlayingBar .mediaButton {
|
||||||
|
@ -129,7 +134,7 @@ input[type="range"]::-ms-fill-upper {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nowPlayingBar .mediaButton:not(#playButton):not(#pauseButton) {
|
#nowPlayingBar .mediaButton:not(#playButton):not(#pauseButton):not(.remoteControlButton) {
|
||||||
display: none;
|
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) {
|
@media (min-width: 1440px) {
|
||||||
#nowPlayingBar .positionSliderContainer {
|
#nowPlayingBar .positionSliderContainer {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
@ -163,4 +175,4 @@ input[type="range"]::-ms-fill-upper {
|
||||||
.mediaPlayerAudioContainerInner {
|
.mediaPlayerAudioContainerInner {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
background: #222;
|
background: #222;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,30 @@
|
||||||
.btnNotifications {
|
.btnNotifications {
|
||||||
text-decoration: none;
|
text-decoration: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnNotificationsInner {
|
||||||
|
text-decoration: none!important;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
-moz-border-radius: 2px;
|
-moz-border-radius: 2px;
|
||||||
-webkit-border-radius: 2px;
|
-webkit-border-radius: 2px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
padding: 8px 12px;
|
padding: 0 12px;
|
||||||
|
line-height: 22px;
|
||||||
|
margin-top: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
background-color: #f5f5f5;
|
background-color: #353535;
|
||||||
background-image: -webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#f1f1f1));
|
background-image: -webkit-gradient(linear,left top,left bottom,from(#353535),to(#313131));
|
||||||
background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1);
|
background-image: -webkit-linear-gradient(top,#353535,#313131);
|
||||||
background-image: -moz-linear-gradient(top,#f5f5f5,#f1f1f1);
|
background-image: -moz-linear-gradient(top,#353535,#313131);
|
||||||
background-image: -ms-linear-gradient(top,#f5f5f5,#f1f1f1);
|
background-image: -ms-linear-gradient(top,#353535,#313131);
|
||||||
background-image: -o-linear-gradient(top,#f5f5f5,#f1f1f1);
|
background-image: -o-linear-gradient(top,#353535,#313131);
|
||||||
background-image: linear-gradient(top,#f5f5f5,#f1f1f1);
|
background-image: linear-gradient(top,#353535,#313131);
|
||||||
border: 1px solid #dcdcdc;
|
border: 1px solid #444;
|
||||||
color: #666;
|
color: #fff;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.levelNormal {
|
.levelNormal {
|
||||||
|
|
|
@ -175,13 +175,6 @@ pre, textarea.pre {
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headerButtons {
|
|
||||||
float: right;
|
|
||||||
position: absolute;
|
|
||||||
top: 10px;
|
|
||||||
right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header .imageLink {
|
.header .imageLink {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
@ -195,10 +188,6 @@ pre, textarea.pre {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.imageLink.supporterIcon {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btnCurrentUser {
|
.btnCurrentUser {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
@ -226,6 +215,7 @@ h1 .imageLink {
|
||||||
|
|
||||||
.pageTitle {
|
.pageTitle {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
font-family: "Open Sans";
|
||||||
}
|
}
|
||||||
|
|
||||||
.imageButton {
|
.imageButton {
|
||||||
|
@ -278,12 +268,23 @@ h1 .imageLink {
|
||||||
margin-bottom: 0!important;
|
margin-bottom: 0!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content-primary {
|
||||||
|
padding-top: 55px;
|
||||||
|
}
|
||||||
|
|
||||||
.content-secondary {
|
.content-secondary {
|
||||||
z-index: 99996;
|
z-index: 1000;
|
||||||
background: #222;
|
background: #333;
|
||||||
border: 0;
|
border: 0;
|
||||||
margin-top: 40px;
|
border-right: 1px solid #ddd;
|
||||||
display: none;
|
display: none;
|
||||||
|
text-align: left;
|
||||||
|
width: 25%;
|
||||||
|
position: fixed;
|
||||||
|
top: 51px;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-secondary h1 {
|
.content-secondary h1 {
|
||||||
|
@ -294,9 +295,9 @@ h1 .imageLink {
|
||||||
|
|
||||||
.sidebarLinks a {
|
.sidebarLinks a {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 10px 20px 10px 30px;
|
padding: .6em 20px .6em 20px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #fff!important;
|
color: #eee!important;
|
||||||
text-shadow: none!important;
|
text-shadow: none!important;
|
||||||
font-weight: 400!important;
|
font-weight: 400!important;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@ -310,11 +311,12 @@ h1 .imageLink {
|
||||||
.sidebarLinks a.selectedSidebarLink {
|
.sidebarLinks a.selectedSidebarLink {
|
||||||
background: #38c!important;
|
background: #38c!important;
|
||||||
color: #fff!important;
|
color: #fff!important;
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarDivider {
|
.sidebarDivider {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: #383838;
|
background: #444;
|
||||||
margin: .25em 0;
|
margin: .25em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,7 +344,7 @@ h1 .imageLink {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboardPanelLink {
|
.dashboardPanelLink {
|
||||||
padding: .75em .5em .75em 1.25em;
|
padding: .5em .5em .5em 1.25em;
|
||||||
display: block;
|
display: block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #fff!important;
|
color: #fff!important;
|
||||||
|
@ -391,10 +393,6 @@ h1 .imageLink {
|
||||||
.imgLogoIcon {
|
.imgLogoIcon {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.imageLink.supporterIcon {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 750px) {
|
@media all and (min-width: 750px) {
|
||||||
|
@ -416,11 +414,6 @@ h1 .imageLink {
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headerButtons {
|
|
||||||
top: 20px;
|
|
||||||
right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-interior > .ui-content, .type-interior > .ui-panel-content-wrap > .ui-content {
|
.type-interior > .ui-content, .type-interior > .ui-panel-content-wrap > .ui-content {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
@ -429,20 +422,13 @@ h1 .imageLink {
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-secondary {
|
.content-secondary {
|
||||||
text-align: left;
|
|
||||||
width: 34%;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
margin: 0;
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-primary {
|
.content-primary {
|
||||||
width: 56%;
|
width: 65%;
|
||||||
float: right;
|
float: right;
|
||||||
padding: 10px 6% 3em 0;
|
padding: 80px 6% 3em 0;
|
||||||
margin: 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) {
|
@media all and (min-width: 900px) {
|
||||||
|
|
||||||
.page:not(.standalonePage) .header {
|
.page:not(.standalonePage) .header {
|
||||||
|
@ -469,11 +448,11 @@ h1 .imageLink {
|
||||||
|
|
||||||
|
|
||||||
.content-secondary {
|
.content-secondary {
|
||||||
width: 30%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-primary {
|
.content-primary {
|
||||||
width: 60%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,11 +460,11 @@ h1 .imageLink {
|
||||||
|
|
||||||
|
|
||||||
.content-secondary {
|
.content-secondary {
|
||||||
width: 25%;
|
width: 17%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-primary {
|
.content-primary {
|
||||||
width: 65%;
|
width: 74%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -497,7 +476,7 @@ h1 .imageLink {
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-primary {
|
.content-primary {
|
||||||
width: 70%;
|
width: 71%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -669,11 +648,6 @@ h1 .imageLink {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Startup wizard */
|
|
||||||
.wizardPage {
|
|
||||||
background: #e2e2e2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wizardContent {
|
.wizardContent {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
padding: .5em 2em 1em;
|
padding: .5em 2em 1em;
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
<a href="dashboardgeneral.html" data-role="button">${TabGeneral}</a>
|
<a href="dashboardgeneral.html" data-role="button">${TabGeneral}</a>
|
||||||
<a href="dashboardinfopage.html" data-role="button">${TabInfo}</a>
|
<a href="dashboardinfopage.html" data-role="button">${TabInfo}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dashboardContent">
|
<div class="dashboardContent">
|
||||||
<div class="readOnlyContent dashboardHomeLeftColumn">
|
<div class="readOnlyContent dashboardHomeLeftColumn">
|
||||||
|
|
||||||
|
@ -42,6 +41,8 @@
|
||||||
<div id="pPluginUpdates"></div>
|
<div id="pPluginUpdates"></div>
|
||||||
|
|
||||||
<p class="externalUrl"></p>
|
<p class="externalUrl"></p>
|
||||||
|
<p class="supporterIconContainer">
|
||||||
|
</p>
|
||||||
<div style="margin-top: 1em;">
|
<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 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>
|
<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>
|
<title>${TitleLiveTV}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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 data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
|
@ -19,26 +19,28 @@
|
||||||
|
|
||||||
<form class="metadataChaptersForm">
|
<form class="metadataChaptersForm">
|
||||||
|
|
||||||
<p>${HeaderChapterDownloadingHelp}</p>
|
<div style="display: none;">
|
||||||
|
<p>${HeaderChapterDownloadingHelp}</p>
|
||||||
|
|
||||||
<div class="chapterDownloadSettings" style="display: none;">
|
<div class="chapterDownloadSettings" style="display: none;">
|
||||||
<fieldset data-role="controlgroup">
|
<fieldset data-role="controlgroup">
|
||||||
<legend>${HeaderDownloadChaptersFor}</legend>
|
<legend>${HeaderDownloadChaptersFor}</legend>
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadChapterMovies" />
|
<input type="checkbox" data-mini="true" id="chkDownloadChapterMovies" />
|
||||||
<label for="chkDownloadChapterMovies">${OptionMovies}</label>
|
<label for="chkDownloadChapterMovies">${OptionMovies}</label>
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadChapterEpisodes" />
|
<input type="checkbox" data-mini="true" id="chkDownloadChapterEpisodes" />
|
||||||
<label for="chkDownloadChapterEpisodes">${OptionEpisodes}</label>
|
<label for="chkDownloadChapterEpisodes">${OptionEpisodes}</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<br />
|
<br />
|
||||||
<div class="chapterFetchers">
|
<div class="chapterFetchers">
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
<div class="noChapterProviders" style="display: none; color: green;">
|
||||||
|
<p>${MessageNoChapterProviders}</p>
|
||||||
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
</div>
|
|
||||||
<div class="noChapterProviders" style="display: none; color: green;">
|
|
||||||
<p>${MessageNoChapterProviders}</p>
|
|
||||||
<br />
|
|
||||||
</div>
|
</div>
|
||||||
<ul data-role="listview" class="ulForm">
|
<ul data-role="listview" class="ulForm">
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>${TitleMediaBrowser}</title>
|
<title>${TitleMediaBrowser}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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">
|
<div class="libraryViewNav">
|
||||||
<a href="#" class="ui-btn-active tabButton" data-tab="tabNowPlaying">${TabNowPlaying}</a>
|
<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) {
|
// if (CastPlayer.deviceState != DEVICE_STATE.ACTIVE && CastPlayer.isInitialized) {
|
||||||
CastPlayer.launchApp();
|
// CastPlayer.launchApp();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
|
|
||||||
})(window, window.chrome, console);
|
})(window, window.chrome, console);
|
|
@ -26,11 +26,11 @@
|
||||||
$('#contribute', page).show();
|
$('#contribute', page).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DashboardPage.renderSupporterIcon(page, pluginSecurityInfo);
|
||||||
});
|
});
|
||||||
|
|
||||||
DashboardPage.reloadSystemInfo(page);
|
DashboardPage.reloadSystemInfo(page);
|
||||||
DashboardPage.reloadNews(page);
|
DashboardPage.reloadNews(page);
|
||||||
|
|
||||||
DashboardPage.sessionUpdateTimer = setInterval(DashboardPage.refreshSessionsLocally, 60000);
|
DashboardPage.sessionUpdateTimer = setInterval(DashboardPage.refreshSessionsLocally, 60000);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
var port = systemInfo.HttpServerPortNumber;
|
var port = systemInfo.HttpServerPortNumber;
|
||||||
|
|
||||||
if (port == systemInfo.WebSocketPortNumber) {
|
if (port == systemInfo.WebSocketPortNumber) {
|
||||||
|
|
||||||
$('#ports', page).html(Globalize.translate('LabelRunningOnPort').replace('{0}', '<b>' + port + '</b>'));
|
$('#ports', page).html(Globalize.translate('LabelRunningOnPort').replace('{0}', '<b>' + port + '</b>'));
|
||||||
} else {
|
} else {
|
||||||
$('#ports', page).html(Globalize.translate('LabelRunningOnPorts').replace('{0}', '<b>' + port + '</b>').replace('{1}', '<b>' + systemInfo.WebSocketPortNumber + '</b>'));
|
$('#ports', page).html(Globalize.translate('LabelRunningOnPorts').replace('{0}', '<b>' + port + '</b>').replace('{1}', '<b>' + systemInfo.WebSocketPortNumber + '</b>'));
|
||||||
|
@ -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) {
|
renderHasPendingRestart: function (page, hasPendingRestart) {
|
||||||
|
|
||||||
$('#updateFail', page).hide();
|
$('#updateFail', page).hide();
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
else if (view == "Poster") {
|
else if (view == "Poster") {
|
||||||
html = LibraryBrowser.getPosterViewHtml({
|
html = LibraryBrowser.getPosterViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
shape: "portrait",
|
shape: "auto",
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
centerText: true
|
centerText: true
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,49 +7,56 @@
|
||||||
//html += '<a href="index.html" class="headerButton headerButtonLeft headerHomeButton">';
|
//html += '<a href="index.html" class="headerButton headerButtonLeft headerHomeButton">';
|
||||||
//html += '<img src="css/images/items/folders/home.png" />';
|
//html += '<img src="css/images/items/folders/home.png" />';
|
||||||
//html += '</a>';
|
//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 += '<img src="css/images/menu.png" />';
|
||||||
html += '</button>';
|
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="libraryMenuButtonText headerButton"><span>MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></div>';
|
||||||
|
|
||||||
html += '<div class="viewMenuSecondary">';
|
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="headerSelectedPlayer"></div><div class="btnCastImage"></div></button>';
|
||||||
|
|
||||||
html += '<button id="btnCast" class="btnCast btnDefaultCast headerButton headerButtonRight" type="button" data-role="none"><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>';
|
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 class="headerButton headerButtonRight headerUserButton" href="#" onclick="Dashboard.showUserFlyout(this);">';
|
||||||
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);">';
|
|
||||||
|
|
||||||
|
var userButtonHeight = 22;
|
||||||
if (user.PrimaryImageTag) {
|
if (user.PrimaryImageTag) {
|
||||||
|
|
||||||
var url = ApiClient.getUserImageUrl(user.Id, {
|
var url = ApiClient.getUserImageUrl(user.Id, {
|
||||||
height: 18,
|
height: userButtonHeight,
|
||||||
tag: user.PrimaryImageTag,
|
tag: user.PrimaryImageTag,
|
||||||
type: "Primary"
|
type: "Primary"
|
||||||
});
|
});
|
||||||
|
|
||||||
html += '<img src="' + url + '" />';
|
html += '<img src="' + url + '" style="height:' + userButtonHeight + 'px;" />';
|
||||||
} else {
|
} else {
|
||||||
html += '<img src="css/images/currentuserdefaultwhite.png" />';
|
html += '<img src="css/images/currentuserdefaultwhite.png" style="height:' + userButtonHeight + 'px;" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</a>';
|
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>';
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
$(document.body).prepend(html);
|
$(document.body).prepend(html);
|
||||||
|
$('.viewMenuBar').trigger('create');
|
||||||
|
|
||||||
$(document).trigger('headercreated');
|
$(document).trigger('headercreated');
|
||||||
|
|
||||||
$('.libraryMenuButton').createHoverTouch().on('hovertouch', showLibraryMenu);
|
$('.libraryMenuButton').createHoverTouch().on('hovertouch', showLibraryMenu);
|
||||||
|
$('.dashboardMenuButton').createHoverTouch().on('hovertouch', showDashboardMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getItemHref(item) {
|
function getItemHref(item) {
|
||||||
|
@ -76,9 +83,23 @@
|
||||||
|
|
||||||
function showLibraryMenu() {
|
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 () {
|
$(panel).panel('toggle').off('mouseleave.librarymenu').on('mouseleave.librarymenu', function () {
|
||||||
|
|
||||||
|
@ -100,7 +121,7 @@
|
||||||
var viewMenuCssClass = (i.CollectionType || 'general') + 'ViewMenu';
|
var viewMenuCssClass = (i.CollectionType || 'general') + 'ViewMenu';
|
||||||
|
|
||||||
var itemId = i.Id;
|
var itemId = i.Id;
|
||||||
|
|
||||||
if (i.CollectionType == "channels") {
|
if (i.CollectionType == "channels") {
|
||||||
itemId = "channels";
|
itemId = "channels";
|
||||||
}
|
}
|
||||||
|
@ -131,6 +152,8 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var requiresLibraryMenuRefresh = false;
|
||||||
|
|
||||||
function getLibraryMenu() {
|
function getLibraryMenu() {
|
||||||
|
|
||||||
var panel = $('#libraryPanel');
|
var panel = $('#libraryPanel');
|
||||||
|
@ -157,6 +180,33 @@
|
||||||
|
|
||||||
updateLibraryMenu();
|
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;
|
return panel;
|
||||||
}
|
}
|
||||||
|
@ -187,10 +237,12 @@
|
||||||
if (info.isLocalPlayer) {
|
if (info.isLocalPlayer) {
|
||||||
|
|
||||||
$('.btnCast').addClass('btnDefaultCast').removeClass('btnActiveCast');
|
$('.btnCast').addClass('btnDefaultCast').removeClass('btnActiveCast');
|
||||||
|
$('.headerSelectedPlayer').html('');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$('.btnCast').removeClass('btnDefaultCast').addClass('btnActiveCast');
|
$('.btnCast').removeClass('btnDefaultCast').addClass('btnActiveCast');
|
||||||
|
$('.headerSelectedPlayer').html(info.deviceName || info.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,12 +309,30 @@
|
||||||
$('.libraryMenuButtonText').html('<span>' + name + '</span>');
|
$('.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>');
|
$('.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;
|
var page = this;
|
||||||
|
|
||||||
|
@ -274,10 +344,9 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}).on('pagebeforeshow', ".libraryPage", function () {
|
}).on('pagebeforeshow', ".page:not(.standalonePage)", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
if (!$('.viewMenuBar').length) {
|
if (!$('.viewMenuBar').length) {
|
||||||
|
|
||||||
Dashboard.getCurrentUser().done(function (user) {
|
Dashboard.getCurrentUser().done(function (user) {
|
||||||
|
@ -294,14 +363,25 @@
|
||||||
updateLibraryNavLinks(page);
|
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 () {
|
}).on('pagebeforeshow', ".page", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
if ($(page).hasClass('libraryPage')) {
|
if ($(page).hasClass('standalonePage')) {
|
||||||
$('.viewMenuBar').show();
|
|
||||||
} else {
|
|
||||||
$('.viewMenuBar').hide();
|
$('.viewMenuBar').hide();
|
||||||
|
} else {
|
||||||
|
$('.viewMenuBar').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}).on('pageshow', ".libraryPage", function () {
|
}).on('pageshow', ".libraryPage", function () {
|
||||||
|
@ -316,8 +396,6 @@
|
||||||
// Scroll back up so in case vertical scroll was messed with
|
// Scroll back up so in case vertical scroll was messed with
|
||||||
$(document).scrollTop(0);
|
$(document).scrollTop(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
@ -326,6 +404,7 @@
|
||||||
updateCastIcon();
|
updateCastIcon();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(ApiClient).on('websocketmessage', onWebSocketMessage);
|
||||||
});
|
});
|
||||||
|
|
||||||
})(window, document, jQuery);
|
})(window, document, jQuery);
|
||||||
|
|
|
@ -291,7 +291,7 @@
|
||||||
currentPlayer.shuffle(id);
|
currentPlayer.shuffle(id);
|
||||||
};
|
};
|
||||||
|
|
||||||
self.playlist = function() {
|
self.playlist = function () {
|
||||||
return currentPlayer.playlist || [];
|
return currentPlayer.playlist || [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@
|
||||||
|
|
||||||
var mirror = (!target.isLocalPlayer && target.supportedCommands.indexOf('DisplayContent') != -1) ? 'true' : 'false';
|
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;
|
html += '<label for="' + id + '" style="font-weight:normal;">' + target.name;
|
||||||
|
|
||||||
if (target.appName) {
|
if (target.appName) {
|
||||||
|
@ -460,6 +460,9 @@
|
||||||
|
|
||||||
html += '<div class="players"></div>';
|
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>';
|
html += '</div>';
|
||||||
|
|
||||||
$(document.body).append(html);
|
$(document.body).append(html);
|
||||||
|
@ -506,6 +509,7 @@
|
||||||
var playerName = this.getAttribute('data-playername');
|
var playerName = this.getAttribute('data-playername');
|
||||||
var targetId = this.getAttribute('data-targetid');
|
var targetId = this.getAttribute('data-targetid');
|
||||||
var targetName = this.getAttribute('data-targetname');
|
var targetName = this.getAttribute('data-targetname');
|
||||||
|
var deviceName = this.getAttribute('data-deviceName');
|
||||||
var playableMediaTypes = this.getAttribute('data-mediatypes').split(',');
|
var playableMediaTypes = this.getAttribute('data-mediatypes').split(',');
|
||||||
var supportedCommands = this.getAttribute('data-commands').split(',');
|
var supportedCommands = this.getAttribute('data-commands').split(',');
|
||||||
|
|
||||||
|
@ -513,7 +517,8 @@
|
||||||
id: targetId,
|
id: targetId,
|
||||||
name: targetName,
|
name: targetName,
|
||||||
playableMediaTypes: playableMediaTypes,
|
playableMediaTypes: playableMediaTypes,
|
||||||
supportedCommands: supportedCommands
|
supportedCommands: supportedCommands,
|
||||||
|
deviceName: deviceName
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,21 +1,8 @@
|
||||||
(function () {
|
(function () {
|
||||||
videoPlayer = function (mediaPlayer, item, mediaSource, startPosition, user) {
|
|
||||||
if (mediaPlayer == null) {
|
|
||||||
throw new Error("mediaPlayer cannot be null");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item == null) {
|
function createVideoPlayer(self) {
|
||||||
throw new Error("item cannot be null");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (user == null) {
|
|
||||||
throw new Error("user cannot be null");
|
|
||||||
}
|
|
||||||
|
|
||||||
var self = mediaPlayer;
|
|
||||||
|
|
||||||
var timeout;
|
var timeout;
|
||||||
var video;
|
|
||||||
var initialVolume;
|
var initialVolume;
|
||||||
var fullscreenExited = false;
|
var fullscreenExited = false;
|
||||||
var idleState = true;
|
var idleState = true;
|
||||||
|
@ -30,12 +17,6 @@
|
||||||
|
|
||||||
self.currentSubtitleStreamIndex = null;
|
self.currentSubtitleStreamIndex = null;
|
||||||
|
|
||||||
self.initVideoPlayer = function () {
|
|
||||||
video = playVideo(item, mediaSource, startPosition);
|
|
||||||
|
|
||||||
return video;
|
|
||||||
};
|
|
||||||
|
|
||||||
self.getCurrentSubtitleStream = function () {
|
self.getCurrentSubtitleStream = function () {
|
||||||
return self.getSubtitleStream(self.currentSubtitleStreamIndex);
|
return self.getSubtitleStream(self.currentSubtitleStreamIndex);
|
||||||
};
|
};
|
||||||
|
@ -219,7 +200,7 @@
|
||||||
return s.Type == 'Subtitle' && s.IsTextSubtitleStream;
|
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++) {
|
for (var i = 0; i < allTracks.length; i++) {
|
||||||
|
|
||||||
|
@ -239,7 +220,7 @@
|
||||||
return;
|
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++) {
|
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;
|
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() {
|
function onPositionSliderChange() {
|
||||||
|
|
||||||
isPositionSliderActive = false;
|
isPositionSliderActive = false;
|
||||||
|
@ -365,12 +330,6 @@
|
||||||
hideFlyout($('#video-qualityFlyout'));
|
hideFlyout($('#video-qualityFlyout'));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").on("mousemove", "#videoPlayer.fullscreenVideo #itemVideo", function () {
|
|
||||||
|
|
||||||
idleHandler(this);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
var trackChange = false;
|
var trackChange = false;
|
||||||
|
|
||||||
var tooltip = $('<div id="slider-tooltip"></div>');
|
var tooltip = $('<div id="slider-tooltip"></div>');
|
||||||
|
@ -399,9 +358,18 @@
|
||||||
|
|
||||||
tooltip.remove();
|
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() {
|
function idleHandler() {
|
||||||
|
|
||||||
var video = $(".itemVideo");
|
var video = $(".itemVideo");
|
||||||
var videoControls = $("#videoControls");
|
var videoControls = $("#videoControls");
|
||||||
|
|
||||||
|
@ -447,14 +415,6 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeHandler(event) {
|
|
||||||
|
|
||||||
document.addEventListener(event, function () {
|
|
||||||
fullscreenExited = self.isFullScreen() == false;
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function enterFullScreen() {
|
function enterFullScreen() {
|
||||||
|
|
||||||
var player = $("#videoPlayer");
|
var player = $("#videoPlayer");
|
||||||
|
@ -512,6 +472,7 @@
|
||||||
$(document.body).off("mousedown.hidesearchhints");
|
$(document.body).off("mousedown.hidesearchhints");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getChaptersFlyoutHtml() {
|
function getChaptersFlyoutHtml() {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
@ -577,7 +538,7 @@
|
||||||
return currentStream.Type == "Audio";
|
return currentStream.Type == "Audio";
|
||||||
});
|
});
|
||||||
|
|
||||||
var currentIndex = getParameterByName('AudioStreamIndex', video.currentSrc);
|
var currentIndex = getParameterByName('AudioStreamIndex', self.currentMediaElement.currentSrc);
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
|
@ -716,12 +677,12 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
var currentSrc = video.currentSrc.toLowerCase();
|
var currentSrc = self.currentMediaElement.currentSrc.toLowerCase();
|
||||||
var isStatic = currentSrc.indexOf('static=true') != -1;
|
var isStatic = currentSrc.indexOf('static=true') != -1;
|
||||||
|
|
||||||
var transcodingExtension = self.getTranscodingExtension();
|
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);
|
var options = getVideoQualityOptions(self.currentMediaSource.MediaStreams, currentAudioStreamIndex, transcodingExtension);
|
||||||
|
|
||||||
|
@ -833,7 +794,66 @@
|
||||||
return options;
|
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 || [];
|
var mediaStreams = mediaSource.MediaStreams || [];
|
||||||
|
|
||||||
|
@ -892,18 +912,15 @@
|
||||||
|
|
||||||
// None of the browsers seem to like this
|
// None of the browsers seem to like this
|
||||||
EnableAutoStreamCopy: false
|
EnableAutoStreamCopy: false
|
||||||
|
|
||||||
})) + seekParam;
|
})) + seekParam;
|
||||||
|
|
||||||
var webmVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.webm', $.extend({}, baseParams, {
|
var webmVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.webm', $.extend({}, baseParams, {
|
||||||
|
|
||||||
VideoCodec: 'vpx',
|
VideoCodec: 'vpx',
|
||||||
AudioCodec: 'Vorbis',
|
AudioCodec: 'Vorbis',
|
||||||
maxWidth: webmQuality.maxWidth,
|
maxWidth: webmQuality.maxWidth,
|
||||||
videoBitrate: webmQuality.videoBitrate,
|
videoBitrate: webmQuality.videoBitrate,
|
||||||
audioBitrate: webmQuality.audioBitrate,
|
audioBitrate: webmQuality.audioBitrate,
|
||||||
EnableAutoStreamCopy: false
|
EnableAutoStreamCopy: false
|
||||||
|
|
||||||
})) + seekParam;
|
})) + seekParam;
|
||||||
|
|
||||||
var hlsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.m3u8', $.extend({}, baseParams, {
|
var hlsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.m3u8', $.extend({}, baseParams, {
|
||||||
|
@ -915,7 +932,6 @@
|
||||||
AudioCodec: m3U8Quality.audioCodec,
|
AudioCodec: m3U8Quality.audioCodec,
|
||||||
profile: 'baseline',
|
profile: 'baseline',
|
||||||
level: '3'
|
level: '3'
|
||||||
|
|
||||||
})) + seekParam;
|
})) + seekParam;
|
||||||
|
|
||||||
//======================================================================================>
|
//======================================================================================>
|
||||||
|
@ -975,9 +991,8 @@
|
||||||
|
|
||||||
html += '</video>';
|
html += '</video>';
|
||||||
|
|
||||||
var mediaPlayer = $("#mediaPlayer").show();
|
var mediaPlayerContainer = $("#mediaPlayer").show();
|
||||||
var videoPlayer = $("#videoPlayer", mediaPlayer);
|
var videoControls = $('#videoControls', mediaPlayerContainer);
|
||||||
var videoControls = $('#videoControls', mediaPlayer);
|
|
||||||
|
|
||||||
//show stop button
|
//show stop button
|
||||||
$('#video-stopButton', videoControls).show();
|
$('#video-stopButton', videoControls).show();
|
||||||
|
@ -985,7 +1000,8 @@
|
||||||
$('#video-pauseButton', videoControls).show();
|
$('#video-pauseButton', videoControls).show();
|
||||||
$('#video-previousTrackButton', videoControls).hide();
|
$('#video-previousTrackButton', videoControls).hide();
|
||||||
$('#video-nextTrackButton', videoControls).hide();
|
$('#video-nextTrackButton', videoControls).hide();
|
||||||
var videoElement = $('#videoElement', mediaPlayer).prepend(html);
|
|
||||||
|
var videoElement = $('#videoElement', mediaPlayerContainer).prepend(html);
|
||||||
|
|
||||||
$('#video-qualityButton', videoControls).show();
|
$('#video-qualityButton', videoControls).show();
|
||||||
|
|
||||||
|
@ -1000,7 +1016,8 @@
|
||||||
if (subtitleStreams.length) {
|
if (subtitleStreams.length) {
|
||||||
$('#video-subtitleButton', videoControls).show().prop("disabled", false);
|
$('#video-subtitleButton', videoControls).show().prop("disabled", false);
|
||||||
} else {
|
} else {
|
||||||
$('#video-subtitleButton', videoControls).hide().prop("disabled", true);;
|
$('#video-subtitleButton', videoControls).hide().prop("disabled", true);
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Chapters && item.Chapters.length) {
|
if (item.Chapters && item.Chapters.length) {
|
||||||
|
@ -1026,17 +1043,17 @@
|
||||||
volumeSlider.val(initialVolume).slider('refresh');
|
volumeSlider.val(initialVolume).slider('refresh');
|
||||||
updateVolumeButtons(initialVolume);
|
updateVolumeButtons(initialVolume);
|
||||||
|
|
||||||
video.on("volumechange", function (e) {
|
video.on("volumechange.mediaplayerevent", function (e) {
|
||||||
|
|
||||||
var vol = this.volume;
|
var vol = this.volume;
|
||||||
|
|
||||||
updateVolumeButtons(vol);
|
updateVolumeButtons(vol);
|
||||||
|
|
||||||
}).one("playing", function () {
|
}).one("playing.mediaplayerevent", function () {
|
||||||
|
|
||||||
self.onPlaybackStart(this, item, mediaSource);
|
self.onPlaybackStart(this, item, mediaSource);
|
||||||
|
|
||||||
}).on("pause", function (e) {
|
}).on("pause.mediaplayerevent", function (e) {
|
||||||
|
|
||||||
$('#video-playButton', videoControls).show();
|
$('#video-playButton', videoControls).show();
|
||||||
$('#video-pauseButton', videoControls).hide();
|
$('#video-pauseButton', videoControls).hide();
|
||||||
|
@ -1050,7 +1067,7 @@
|
||||||
self.stop();
|
self.stop();
|
||||||
}, 5 * 60 * 1000); // 5 minutes
|
}, 5 * 60 * 1000); // 5 minutes
|
||||||
|
|
||||||
}).on("playing", function (e) {
|
}).on("playing.mediaplayerevent", function (e) {
|
||||||
|
|
||||||
$('#video-playButton', videoControls).hide();
|
$('#video-playButton', videoControls).hide();
|
||||||
$('#video-pauseButton', videoControls).show();
|
$('#video-pauseButton', videoControls).show();
|
||||||
|
@ -1062,14 +1079,14 @@
|
||||||
// Remove pause setop timer
|
// Remove pause setop timer
|
||||||
self.clearPauseStop();
|
self.clearPauseStop();
|
||||||
|
|
||||||
}).on("timeupdate", function () {
|
}).on("timeupdate.mediaplayerevent", function () {
|
||||||
|
|
||||||
if (!isPositionSliderActive) {
|
if (!isPositionSliderActive) {
|
||||||
|
|
||||||
self.setCurrentTime(self.getCurrentTicks(this), positionSlider, currentTimeElement);
|
self.setCurrentTime(self.getCurrentTicks(this), positionSlider, currentTimeElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
}).on("error", function () {
|
}).on("error.mediaplayerevent", function () {
|
||||||
|
|
||||||
self.clearPauseStop();
|
self.clearPauseStop();
|
||||||
|
|
||||||
|
@ -1090,7 +1107,7 @@
|
||||||
message: errorMsg
|
message: errorMsg
|
||||||
});
|
});
|
||||||
|
|
||||||
}).on("click", function (e) {
|
}).on("click.mediaplayerevent", function (e) {
|
||||||
|
|
||||||
if (this.paused) {
|
if (this.paused) {
|
||||||
self.unpause();
|
self.unpause();
|
||||||
|
@ -1098,23 +1115,23 @@
|
||||||
self.pause();
|
self.pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
}).on("dblclick", function () {
|
}).on("dblclick.mediaplayerevent", function () {
|
||||||
|
|
||||||
self.toggleFullscreen();
|
self.toggleFullscreen();
|
||||||
|
|
||||||
}).on("seeking", function (e) {
|
}).on("seeking.mediaplayerevent", function (e) {
|
||||||
|
|
||||||
$("html").css("cursor", "wait");
|
$("html").css("cursor", "wait");
|
||||||
|
|
||||||
}).on("seeked", function (e) {
|
}).on("seeked.mediaplayerevent", function (e) {
|
||||||
|
|
||||||
$("html").css("cursor", "default");
|
$("html").css("cursor", "default");
|
||||||
|
|
||||||
}).on("loadstart", function () {
|
}).on("loadstart.mediaplayerevent", function () {
|
||||||
|
|
||||||
$("html").css("cursor", "progress");
|
$("html").css("cursor", "progress");
|
||||||
|
|
||||||
}).on("canplay", function () {
|
}).on("canplay.mediaplayerevent", function () {
|
||||||
|
|
||||||
$("html").css("cursor", "default");
|
$("html").css("cursor", "default");
|
||||||
|
|
||||||
|
@ -1124,47 +1141,22 @@
|
||||||
|
|
||||||
self.onPlaybackStopped.call(this);
|
self.onPlaybackStopped.call(this);
|
||||||
|
|
||||||
|
unbindEventsForPlayback();
|
||||||
|
|
||||||
}).on('ended.playnext', self.playNextAfterEnded);
|
}).on('ended.playnext', self.playNextAfterEnded);
|
||||||
|
|
||||||
// Stop playback on browser back button nav
|
bindEventsForPlayback();
|
||||||
$(window).on("popstate", function () {
|
|
||||||
self.stop();
|
|
||||||
return;
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".mediaFlyoutContainer").on("click", "a", function (e) {
|
mediaPlayerContainer.trigger("create");
|
||||||
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");
|
|
||||||
|
|
||||||
fullscreenExited = false;
|
fullscreenExited = false;
|
||||||
|
|
||||||
self.currentSubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex;
|
self.currentSubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex;
|
||||||
|
|
||||||
return video[0];
|
return video[0];
|
||||||
}
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
|
createVideoPlayer(MediaPlayer);
|
||||||
|
|
||||||
})();
|
})();
|
|
@ -475,8 +475,7 @@
|
||||||
self.currentItem = item;
|
self.currentItem = item;
|
||||||
self.currentMediaSource = getOptimalMediaSource(item.MediaType, item.MediaSources);
|
self.currentMediaSource = getOptimalMediaSource(item.MediaType, item.MediaSources);
|
||||||
|
|
||||||
videoPlayer(self, item, self.currentMediaSource, startPosition, user);
|
mediaElement = self.playVideo(item, self.currentMediaSource, startPosition);
|
||||||
mediaElement = self.initVideoPlayer();
|
|
||||||
self.currentDurationTicks = self.currentMediaSource.RunTimeTicks;
|
self.currentDurationTicks = self.currentMediaSource.RunTimeTicks;
|
||||||
|
|
||||||
} else if (item.MediaType === "Audio") {
|
} else if (item.MediaType === "Audio") {
|
||||||
|
@ -940,7 +939,7 @@
|
||||||
|
|
||||||
var isVideo = self.currentItem.MediaType == "Video";
|
var isVideo = self.currentItem.MediaType == "Video";
|
||||||
|
|
||||||
$(elem).off("ended.playnext").on("ended", function () {
|
$(elem).off("ended.playnext").one("ended", function () {
|
||||||
|
|
||||||
$(this).off();
|
$(this).off();
|
||||||
|
|
||||||
|
@ -1106,7 +1105,7 @@
|
||||||
|
|
||||||
var playerElement = this;
|
var playerElement = this;
|
||||||
|
|
||||||
$(playerElement).off('ended.playbackstopped');
|
$(playerElement).off('.mediaplayerevent').off('ended.playbackstopped');
|
||||||
|
|
||||||
clearProgressInterval();
|
clearProgressInterval();
|
||||||
|
|
||||||
|
@ -1259,25 +1258,25 @@
|
||||||
this.volume = initialVolume;
|
this.volume = initialVolume;
|
||||||
this.play();
|
this.play();
|
||||||
|
|
||||||
}).on("volumechange", function () {
|
}).on("volumechange.mediaplayerevent", function () {
|
||||||
|
|
||||||
self.onVolumeChanged(this);
|
self.onVolumeChanged(this);
|
||||||
|
|
||||||
}).one("playing", function () {
|
}).one("playing.mediaplayerevent", function () {
|
||||||
|
|
||||||
$('.mediaPlayerAudioContainer').hide();
|
$('.mediaPlayerAudioContainer').hide();
|
||||||
|
|
||||||
self.onPlaybackStart(this, item, mediaSource);
|
self.onPlaybackStart(this, item, mediaSource);
|
||||||
|
|
||||||
}).on("pause", function () {
|
}).on("pause.mediaplayerevent", function () {
|
||||||
|
|
||||||
self.onPlaystateChange(this);
|
self.onPlaystateChange(this);
|
||||||
|
|
||||||
}).on("playing", function () {
|
}).on("playing.mediaplayerevent", function () {
|
||||||
|
|
||||||
self.onPlaystateChange(this);
|
self.onPlaystateChange(this);
|
||||||
|
|
||||||
}).on("timeupdate", function () {
|
}).on("timeupdate.mediaplayerevent", function () {
|
||||||
|
|
||||||
self.setCurrentTime(self.getCurrentTicks(this));
|
self.setCurrentTime(self.getCurrentTicks(this));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
self.getNotificationsSummary().done(function (summary) {
|
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) {
|
if (summary.UnreadCount) {
|
||||||
item.addClass('level' + summary.MaxUnreadNotificationLevel);
|
item.addClass('level' + summary.MaxUnreadNotificationLevel);
|
||||||
|
@ -207,13 +207,9 @@
|
||||||
|
|
||||||
window.Notifications = new notifications();
|
window.Notifications = new notifications();
|
||||||
|
|
||||||
$(Dashboard).on('interiorheaderrendered', function (e, header, user) {
|
$(document).on('headercreated', function (e) {
|
||||||
|
|
||||||
if (!user || $('.notificationsButton', header).length) {
|
$('<a class="headerButton headerButtonRight btnNotifications" href="#" title="Notifications"><div class="btnNotificationsInner">0</div></a>').insertBefore($('.headerUserButton')).on('click', Notifications.showNotificationsFlyout);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$('<a class="imageLink btnNotifications" href="#" title="Notifications">0</a>').insertAfter($('.btnCurrentUser', header)).on('click', Notifications.showNotificationsFlyout);
|
|
||||||
|
|
||||||
Notifications.updateNotificationCount();
|
Notifications.updateNotificationCount();
|
||||||
});
|
});
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
html += '<div style="display:inline-block;width:12px;"></div>';
|
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 += '<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 += '<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="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>';
|
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) {
|
}).map(function (s) {
|
||||||
return {
|
return {
|
||||||
name: s.DeviceName,
|
name: s.DeviceName,
|
||||||
|
deviceName: s.DeviceName,
|
||||||
id: s.Id,
|
id: s.Id,
|
||||||
playerName: self.name,
|
playerName: self.name,
|
||||||
appName: s.Client,
|
appName: s.Client,
|
||||||
|
|
|
@ -59,30 +59,13 @@ var Dashboard = {
|
||||||
return Dashboard.getUserPromise;
|
return Dashboard.getUserPromise;
|
||||||
},
|
},
|
||||||
|
|
||||||
validateCurrentUser: function (page) {
|
validateCurrentUser: function () {
|
||||||
|
|
||||||
Dashboard.getUserPromise = null;
|
Dashboard.getUserPromise = null;
|
||||||
|
|
||||||
if (Dashboard.getCurrentUserId()) {
|
if (Dashboard.getCurrentUserId()) {
|
||||||
Dashboard.getCurrentUser();
|
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 () {
|
getCurrentUserId: function () {
|
||||||
|
@ -544,21 +527,21 @@ var Dashboard = {
|
||||||
Dashboard.validateCurrentUser();
|
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) {
|
renderHeader: function (page) {
|
||||||
|
|
||||||
var headerHtml = '';
|
|
||||||
|
|
||||||
var header = $('.header', page);
|
var header = $('.header', page);
|
||||||
|
|
||||||
if (!header.length) {
|
if (!header.length) {
|
||||||
|
var headerHtml = '';
|
||||||
|
|
||||||
headerHtml += '<div class="header">';
|
headerHtml += '<div class="header">';
|
||||||
|
|
||||||
headerHtml += '<a class="logo" href="index.html">';
|
headerHtml += '<a class="logo" href="index.html">';
|
||||||
|
@ -570,67 +553,9 @@ var Dashboard = {
|
||||||
|
|
||||||
headerHtml += '</a>';
|
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>';
|
headerHtml += '</div>';
|
||||||
page.prepend(headerHtml);
|
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) {
|
ensureToolsMenu: function (page, user) {
|
||||||
|
@ -645,12 +570,9 @@ var Dashboard = {
|
||||||
|
|
||||||
var html = '<div class="content-secondary ui-bar-a toolsSidebar">';
|
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>';
|
//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/>';
|
||||||
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 += '<div class="sidebarLinks">';
|
html += '<div class="sidebarLinks">';
|
||||||
|
|
||||||
var links = Dashboard.getToolsMenuLinks(page);
|
var links = Dashboard.getToolsMenuLinks(page);
|
||||||
|
@ -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 += '<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++) {
|
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) {
|
getToolsMenuLinks: function (page) {
|
||||||
|
|
||||||
var pageElem = page[0];
|
var pageElem = page[0];
|
||||||
|
@ -906,7 +821,7 @@ var Dashboard = {
|
||||||
else if (msg.MessageType === "RestartRequired") {
|
else if (msg.MessageType === "RestartRequired") {
|
||||||
Dashboard.updateSystemInfo(msg.Data);
|
Dashboard.updateSystemInfo(msg.Data);
|
||||||
}
|
}
|
||||||
else if (msg.MessageType === "UserUpdated") {
|
else if (msg.MessageType === "UserUpdated" || msg.MessageType === "UserConfigurationUpdated") {
|
||||||
Dashboard.validateCurrentUser();
|
Dashboard.validateCurrentUser();
|
||||||
|
|
||||||
var user = msg.Data;
|
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") {
|
else if (msg.MessageType === "GeneralCommand") {
|
||||||
|
|
||||||
var cmd = msg.Data;
|
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) {
|
showPackageInstallNotification: function (installation, status) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
@ -1160,7 +1037,7 @@ var Dashboard = {
|
||||||
parent = $('.ui-content', page)[0];
|
parent = $('.ui-content', page)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$(parent).prepend("<h2 class='pageTitle'>" + (document.title || " ") + "</h2>");
|
$(parent).prepend("<h1 class='pageTitle'>" + (document.title || " ") + "</h1>");
|
||||||
},
|
},
|
||||||
|
|
||||||
setPageTitle: function (title) {
|
setPageTitle: function (title) {
|
||||||
|
@ -1439,7 +1316,7 @@ $(document).on('pagebeforeshow', ".page", function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
Dashboard.ensureToolsMenu(page, user);
|
Dashboard.ensureToolsMenu(page, user);
|
||||||
Dashboard.ensureHeader(page, user);
|
Dashboard.ensureHeader(page);
|
||||||
Dashboard.ensurePageTitle(page);
|
Dashboard.ensurePageTitle(page);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,8 +51,6 @@
|
||||||
|
|
||||||
var userId = getParameterByName("userId");
|
var userId = getParameterByName("userId");
|
||||||
|
|
||||||
Dashboard.validateCurrentUser(page);
|
|
||||||
|
|
||||||
if (userId) {
|
if (userId) {
|
||||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
|
|
||||||
var page = $.mobile.activePage;
|
var page = $.mobile.activePage;
|
||||||
|
|
||||||
Dashboard.validateCurrentUser(page);
|
|
||||||
reloadUser(page);
|
reloadUser(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,8 +165,6 @@
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
|
||||||
Dashboard.validateCurrentUser(page);
|
|
||||||
|
|
||||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,6 @@
|
||||||
|
|
||||||
ApiClient.deleteUser(id).done(function () {
|
ApiClient.deleteUser(id).done(function () {
|
||||||
|
|
||||||
Dashboard.validateCurrentUser(page);
|
|
||||||
UserProfilesPage.loadPageData();
|
UserProfilesPage.loadPageData();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue