Merge pull request #1 from jellyfin/master
This commit is contained in:
commit
4d66c53263
229 changed files with 1559 additions and 1020 deletions
|
@ -1,27 +1,71 @@
|
|||
env:
|
||||
es6: true
|
||||
es6: false
|
||||
browser: true
|
||||
amd: true
|
||||
|
||||
globals:
|
||||
# New browser globals
|
||||
DataView: readonly
|
||||
MediaMetadata: readonly
|
||||
Promise: readonly
|
||||
# Deprecated browser globals
|
||||
DocumentTouch: readonly
|
||||
# Tizen globals
|
||||
tizen: readonly
|
||||
webapis: readonly
|
||||
# WebOS globals
|
||||
webOS: readonly
|
||||
# Dependency globals
|
||||
$: readonly
|
||||
jQuery: readonly
|
||||
queryString: readonly
|
||||
requirejs: readonly
|
||||
# Jellyfin globals
|
||||
ApiClient: writable
|
||||
AppInfo: writable
|
||||
chrome: writable
|
||||
ConnectionManager: writable
|
||||
DlnaProfilePage: writable
|
||||
Dashboard: writable
|
||||
DashboardPage: writable
|
||||
Emby: readonly
|
||||
Events: writable
|
||||
getParameterByName: writable
|
||||
getWindowLocationSearch: writable
|
||||
Globalize: writable
|
||||
Hls: writable
|
||||
humaneDate: writable
|
||||
humaneElapsed: writable
|
||||
LibraryMenu: writable
|
||||
LinkParser: writable
|
||||
LiveTvHelpers: writable
|
||||
MetadataEditor: writable
|
||||
pageClassOn: writable
|
||||
pageIdOn: writable
|
||||
PlaylistViewer: writable
|
||||
UserParentalControlPage: writable
|
||||
Windows: readonly
|
||||
|
||||
extends:
|
||||
- eslint:recommended
|
||||
|
||||
rules:
|
||||
block-spacing: ["error"]
|
||||
brace-style: ["error"]
|
||||
comma-dangle: ["error", "never"]
|
||||
comma-spacing: ["error"]
|
||||
eol-last: ["off"]
|
||||
eol-last: ["error"]
|
||||
indent: ["error", 4, { "SwitchCase": 1 }]
|
||||
keyword-spacing: ["error"]
|
||||
line-comment-position: ["off"]
|
||||
max-statements-per-line: ["error"]
|
||||
no-empty: ["error"]
|
||||
no-extra-semi: ["error"]
|
||||
no-floating-decimal: ["error"]
|
||||
no-multi-spaces: ["error"]
|
||||
no-multiple-empty-lines: ["error", { "max": 1 }]
|
||||
no-trailing-spaces: ["error"]
|
||||
no-void: ["off"]
|
||||
one-var: ["error", "never"]
|
||||
padding-line-between-statements: ["off"]
|
||||
semi: ["off"]
|
||||
semi: ["warn"]
|
||||
space-before-blocks: ["error"]
|
||||
yoda: ["off"]
|
||||
# TODO: Fix warnings and remove these rules
|
||||
no-redeclare: ["warn"]
|
||||
no-unused-vars: ["warn"]
|
||||
no-useless-escape: ["warn"]
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -575,4 +575,4 @@ healthchecksdb
|
|||
# End of https://www.gitignore.io/api/node,rider,macos,linux,windows,visualstudio,visualstudiocode
|
||||
|
||||
# dist for webpack output
|
||||
dist
|
||||
dist
|
||||
|
|
|
@ -140,4 +140,4 @@
|
|||
"value-list-comma-space-before": "never",
|
||||
"value-list-max-empty-lines": 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,11 +31,10 @@
|
|||
"jellyfin-noto": "https://github.com/jellyfin/jellyfin-noto",
|
||||
"jquery": "^3.4.1",
|
||||
"jstree": "^3.3.7",
|
||||
"libass-wasm": "^2.1.1",
|
||||
"libass-wasm": "https://github.com/jellyfin/JavascriptSubtitlesOctopus",
|
||||
"libjass": "^0.11.0",
|
||||
"material-design-icons-iconfont": "^5.0.1",
|
||||
"native-promise-only": "^0.8.0-a",
|
||||
"requirejs": "^2.3.5",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"shaka-player": "^2.5.9",
|
||||
"sortablejs": "^1.10.2",
|
||||
|
|
|
@ -29,7 +29,7 @@ h3 {
|
|||
}
|
||||
|
||||
.layout-tv {
|
||||
font-size: 2.5vh;
|
||||
font-size: 130%;
|
||||
}
|
||||
|
||||
.layout-mobile {
|
||||
|
|
|
@ -439,10 +439,42 @@
|
|||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-attachment: fixed;
|
||||
height: 50vh;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.layout-desktop .itemBackdrop::after,
|
||||
.layout-tv .itemBackdrop::after {
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.65);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layout-desktop .noBackdrop .itemBackdrop,
|
||||
.layout-tv .noBackdrop .itemBackdrop {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.detailPageContent {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 2%;
|
||||
padding-right: 2%;
|
||||
}
|
||||
|
||||
.layout-desktop .noBackdrop .detailPageContent,
|
||||
.layout-tv .noBackdrop .detailPageContent {
|
||||
margin-top: 2.5em;
|
||||
}
|
||||
|
||||
.layout-desktop .noBackdrop .detailImageContainer img,
|
||||
.layout-tv .noBackdrop .detailImageContainer img {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.personBackdrop {
|
||||
background-size: contain;
|
||||
}
|
||||
|
@ -509,8 +541,6 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
position: sticky;
|
||||
top: 3.85em;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
|
@ -520,13 +550,21 @@
|
|||
top: 0;
|
||||
}
|
||||
|
||||
.layout-tv .detailPagePrimaryContainer {
|
||||
.layout-tv #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer,
|
||||
.layout-desktop #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer {
|
||||
position: relative;
|
||||
top: 0;
|
||||
padding-left: 32.45vw;
|
||||
}
|
||||
|
||||
.detailSticky {
|
||||
background-color: #101010;
|
||||
.layout-desktop .detailSticky,
|
||||
.layout-tv .detailSticky {
|
||||
margin-top: -7.2em;
|
||||
}
|
||||
|
||||
.layout-desktop .noBackdrop .detailSticky,
|
||||
.layout-tv .noBackdrop .detailSticky {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.infoWrapper {
|
||||
|
@ -548,23 +586,17 @@
|
|||
margin: 1.25em 0;
|
||||
}
|
||||
|
||||
.detailPageContent {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-left: 2%;
|
||||
padding-right: 2%;
|
||||
}
|
||||
|
||||
.detailImageContainer {
|
||||
position: sticky;
|
||||
top: 25%;
|
||||
position: relative;
|
||||
margin-top: -25vh;
|
||||
float: left;
|
||||
width: 22.786458333333332vw;
|
||||
width: 25vw;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.layout-mobile .detailImageContainer,
|
||||
.layout-tv .detailImageContainer {
|
||||
position: relative;
|
||||
.layout-desktop .noBackdrop .detailImageContainer,
|
||||
.layout-tv .noBackdrop .detailImageContainer {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.detailPagePrimaryContent {
|
||||
|
@ -572,15 +604,19 @@
|
|||
}
|
||||
|
||||
.detailLogo {
|
||||
width: 25em;
|
||||
height: 9.375em;
|
||||
width: 67.25vw;
|
||||
height: 14.5vh;
|
||||
position: absolute;
|
||||
top: 14.5%;
|
||||
right: 10.5%;
|
||||
top: 15vh;
|
||||
right: 0;
|
||||
-webkit-background-size: contain;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.noBackdrop .detailLogo {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media all and (max-width: 87.5em) {
|
||||
.detailLogo {
|
||||
right: 5%;
|
||||
|
@ -607,8 +643,8 @@
|
|||
|
||||
.itemDetailImage {
|
||||
width: 100% !important;
|
||||
box-shadow: 0 0.0725em 0.29em 0 rgba(0, 0, 0, 0.37);
|
||||
-webkit-box-shadow: 0 0.0725em 0.29em 0 rgba(0, 0, 0, 0.37);
|
||||
-webkit-box-shadow: 0 0.1em 0.5em 0 rgba(0, 0, 0, 0.75);
|
||||
box-shadow: 0 0.1em 0.5em 0 rgba(0, 0, 0, 0.75);
|
||||
}
|
||||
|
||||
div.itemDetailGalleryLink.defaultCardBackground {
|
||||
|
@ -635,6 +671,16 @@ div.itemDetailGalleryLink.defaultCardBackground {
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.layout-desktop .detailPageWrapperContainer,
|
||||
.layout-tv .detailPageWrapperContainer {
|
||||
margin-top: 7.2em;
|
||||
}
|
||||
|
||||
.layout-tv #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer,
|
||||
.layout-desktop #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer {
|
||||
padding-left: 3.3%;
|
||||
}
|
||||
|
||||
.btnPlaySimple {
|
||||
display: none !important;
|
||||
}
|
||||
|
@ -849,6 +895,11 @@ div.itemDetailGalleryLink.defaultCardBackground {
|
|||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.layout-desktop .noBackdrop .detailPageWrapperContainer,
|
||||
.layout-tv .noBackdrop .detailPageWrapperContainer {
|
||||
margin-top: 3.8em;
|
||||
}
|
||||
|
||||
.mediaInfoStream {
|
||||
margin: 0 3em 0 0;
|
||||
display: inline-block;
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
<div id="pluginTiles" style="text-align:left;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -47,12 +47,6 @@ _define("howler", function() {
|
|||
return howler;
|
||||
});
|
||||
|
||||
// native-promise-only
|
||||
var nativePromise = require("native-promise-only");
|
||||
_define("native-promise-only", function() {
|
||||
return nativePromise;
|
||||
});
|
||||
|
||||
// resize-observer-polyfill
|
||||
var resize = require("resize-observer-polyfill").default;
|
||||
_define("resize-observer-polyfill", function() {
|
||||
|
|
|
@ -42,4 +42,4 @@ define(['browser', 'dialog', 'globalize'], function (browser, dialog, globalize)
|
|||
|
||||
return Promise.resolve();
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@ define(['dom', 'focusManager'], function (dom, focusManager) {
|
|||
if (e.ctrlKey) {
|
||||
return;
|
||||
}
|
||||
if (!!e.shiftKey) {
|
||||
if (e.shiftKey) {
|
||||
return;
|
||||
}
|
||||
if (e.altKey) {
|
||||
|
@ -127,4 +127,4 @@ define(['dom', 'focusManager'], function (dom, focusManager) {
|
|||
};
|
||||
|
||||
return AlphaNumericShortcuts;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -241,7 +241,7 @@ define(['focusManager', 'layoutManager', 'dom', 'css!./style.css', 'paper-icon-b
|
|||
try {
|
||||
btn = element.querySelector('.alphaPickerButton[data-value=\'' + value + '\']');
|
||||
} catch (err) {
|
||||
console.log('Error in querySelector: ' + err);
|
||||
console.error('error in querySelector: ' + err);
|
||||
}
|
||||
|
||||
if (btn && btn !== selected) {
|
||||
|
|
|
@ -14,6 +14,9 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
|||
},
|
||||
showSettings: function () {
|
||||
show('/settings/settings.html');
|
||||
},
|
||||
showNowPlaying: function () {
|
||||
show("/nowplaying.html");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -387,13 +390,13 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
|||
var apiClient = connectionManager.currentApiClient();
|
||||
var pathname = ctx.pathname.toLowerCase();
|
||||
|
||||
console.log('appRouter - processing path request ' + pathname);
|
||||
console.debug('appRouter - processing path request ' + pathname);
|
||||
|
||||
var isCurrentRouteStartup = currentRouteInfo ? currentRouteInfo.route.startup : true;
|
||||
var shouldExitApp = ctx.isBack && route.isDefaultRoute && isCurrentRouteStartup;
|
||||
|
||||
if (!shouldExitApp && (!apiClient || !apiClient.isLoggedIn()) && !route.anonymous) {
|
||||
console.log('appRouter - route does not allow anonymous access, redirecting to login');
|
||||
console.debug('appRouter - route does not allow anonymous access, redirecting to login');
|
||||
beginConnectionWizard();
|
||||
return;
|
||||
}
|
||||
|
@ -408,10 +411,10 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
|||
|
||||
if (apiClient && apiClient.isLoggedIn()) {
|
||||
|
||||
console.log('appRouter - user is authenticated');
|
||||
console.debug('appRouter - user is authenticated');
|
||||
|
||||
if (route.isDefaultRoute) {
|
||||
console.log('appRouter - loading skin home page');
|
||||
console.debug('appRouter - loading skin home page');
|
||||
loadUserSkinWithOptions(ctx);
|
||||
return;
|
||||
} else if (route.roles) {
|
||||
|
@ -425,7 +428,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
|||
}
|
||||
}
|
||||
|
||||
console.log('appRouter - proceeding to ' + pathname);
|
||||
console.debug('appRouter - proceeding to ' + pathname);
|
||||
callback();
|
||||
}
|
||||
|
||||
|
@ -672,7 +675,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
|||
baseRoute = baseRoute.substring(0, baseRoute.length - 1);
|
||||
}
|
||||
|
||||
console.log('Setting page base to ' + baseRoute);
|
||||
console.debug('setting page base to ' + baseRoute);
|
||||
page.base(baseRoute);
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSet
|
|||
|
||||
return !!cue.length;
|
||||
} catch (err) {
|
||||
console.log("error detecting cue support: " + err);
|
||||
console.error("error detecting cue support: " + err);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSet
|
|||
function onAppVisible() {
|
||||
if (isHidden) {
|
||||
isHidden = false;
|
||||
console.log("triggering app resume event");
|
||||
console.debug("triggering app resume event");
|
||||
events.trigger(appHost, "resume");
|
||||
}
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSet
|
|||
function onAppHidden() {
|
||||
if (!isHidden) {
|
||||
isHidden = true;
|
||||
console.log("app is hidden");
|
||||
console.debug("app is hidden");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,7 +314,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSet
|
|||
window.close();
|
||||
}
|
||||
} catch (err) {
|
||||
console.log("error closing application: " + err);
|
||||
console.error("error closing application: " + err);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSet
|
|||
* Ask user for exit
|
||||
*/
|
||||
function askForExit() {
|
||||
if (!!exitPromise) {
|
||||
if (exitPromise) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -374,7 +374,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSet
|
|||
return -1 !== supportedFeatures.indexOf(command.toLowerCase());
|
||||
},
|
||||
preferVisualCards: browser.android || browser.chrome,
|
||||
moreIcon: browser.android ? "dots-vert" : "dots-horiz",
|
||||
moreIcon: browser.android ? "more_vert" : "more_horiz",
|
||||
getSyncProfile: getSyncProfile,
|
||||
getDefaultLayout: function () {
|
||||
if (window.NativeShell) {
|
||||
|
|
|
@ -25,7 +25,7 @@ define(["focusManager", "layoutManager"], function (focusManager, layoutManager)
|
|||
activeElement = e.target;
|
||||
});
|
||||
|
||||
console.log("AutoFocuser enabled");
|
||||
console.debug("AutoFocuser enabled");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -429,6 +429,12 @@ button::-moz-focus-inner {
|
|||
font-size: 1.66956521739130434em !important;
|
||||
}
|
||||
|
||||
.cardOverlayButtonIcon.material-icons {
|
||||
/* material-icons override display, so we need to
|
||||
make a better matching selector to set it to flex */
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.cardOverlayButton-centered {
|
||||
bottom: initial;
|
||||
right: initial;
|
||||
|
@ -784,7 +790,7 @@ button::-moz-focus-inner {
|
|||
opacity: 0;
|
||||
transition: 0.2s;
|
||||
background: transparent;
|
||||
padding: 0.5em;
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
.cardOverlayButtonIcon-hover {
|
||||
|
|
|
@ -140,7 +140,6 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
}
|
||||
return 100 / 72;
|
||||
}
|
||||
break;
|
||||
case 'overflowPortrait':
|
||||
|
||||
if (layoutManager.tv) {
|
||||
|
@ -166,7 +165,6 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
}
|
||||
return 100 / 42;
|
||||
}
|
||||
break;
|
||||
case 'overflowSquare':
|
||||
if (layoutManager.tv) {
|
||||
return 100 / 15.5;
|
||||
|
@ -191,7 +189,6 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
}
|
||||
return 100 / 42;
|
||||
}
|
||||
break;
|
||||
case 'overflowBackdrop':
|
||||
if (layoutManager.tv) {
|
||||
return 100 / 23.3;
|
||||
|
@ -216,7 +213,6 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
}
|
||||
return 100 / 72;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return 4;
|
||||
}
|
||||
|
@ -342,7 +338,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
try {
|
||||
newIndexValue = datetime.toLocaleDateString(datetime.parseISO8601Date(item.PremiereDate), { weekday: 'long', month: 'long', day: 'numeric' });
|
||||
} catch (err) {
|
||||
console.log('error parsing timestamp for premiere date');
|
||||
console.error('error parsing timestamp for premiere date');
|
||||
}
|
||||
}
|
||||
} else if (options.indexBy === 'ProductionYear') {
|
||||
|
@ -738,7 +734,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
airTimeText += ' - ' + datetime.getDisplayTime(date);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log("Error parsing date: " + item.StartDate);
|
||||
console.error("error parsing date: " + item.StartDate);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -870,9 +866,10 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
|
||||
if (item.PremiereDate) {
|
||||
try {
|
||||
|
||||
lines.push(getPremiereDateText(item));
|
||||
|
||||
lines.push(datetime.toLocaleDateString(
|
||||
datetime.parseISO8601Date(item.PremiereDate),
|
||||
{ weekday: 'long', month: 'long', day: 'numeric' }
|
||||
));
|
||||
} catch (err) {
|
||||
lines.push('');
|
||||
|
||||
|
@ -1383,7 +1380,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
}
|
||||
|
||||
if (item.Type === 'CollectionFolder' || item.CollectionType) {
|
||||
var refreshClass = item.RefreshProgress || (item.RefreshStatus && virtualFolder.item !== 'Idle') ? '' : ' class="hide"';
|
||||
var refreshClass = item.RefreshProgress ? '' : ' class="hide"';
|
||||
indicatorsHtml += '<div is="emby-itemrefreshindicator"' + refreshClass + ' data-progress="' + (item.RefreshProgress || 0) + '" data-status="' + item.RefreshStatus + '"></div>';
|
||||
requireRefreshIndicator();
|
||||
}
|
||||
|
@ -1497,13 +1494,13 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
case 'Person':
|
||||
return '<i class="cardImageIcon material-icons">person</i>';
|
||||
case 'Movie':
|
||||
return '<i class="cardImageIcon material-icons">movie</i>'
|
||||
return '<i class="cardImageIcon material-icons">movie</i>';
|
||||
case 'Series':
|
||||
return '<i class="cardImageIcon material-icons">tv</i>'
|
||||
return '<i class="cardImageIcon material-icons">tv</i>';
|
||||
case 'Book':
|
||||
return '<i class="cardImageIcon material-icons">book</i>'
|
||||
return '<i class="cardImageIcon material-icons">book</i>';
|
||||
case 'Folder':
|
||||
return '<i class="cardImageIcon material-icons">folder</i>'
|
||||
return '<i class="cardImageIcon material-icons">folder</i>';
|
||||
}
|
||||
|
||||
if (options && options.defaultCardImageIcon) {
|
||||
|
|
|
@ -90,7 +90,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'layoutManager', 'browse
|
|||
var cardImageContainer = imgUrl ? ('<div class="' + cardImageContainerClass + ' lazy" data-src="' + imgUrl + '">') : ('<div class="' + cardImageContainerClass + '">');
|
||||
|
||||
if (!imgUrl) {
|
||||
cardImageContainer += '<i class="material-icons cardImageIcon">local_movies</i>';
|
||||
cardImageContainer += '<i class="material-icons cardImageIcon local_movies"></i>';
|
||||
}
|
||||
|
||||
var nameHtml = '';
|
||||
|
|
|
@ -84,7 +84,7 @@ define(["dialogHelper", "loading", "connectionManager", "globalize", "actionshee
|
|||
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
html += '<button class="btnMap autoSize" is="paper-icon-button-light" type="button" data-id="' + channel.Id + '" data-providerid="' + channel.ProviderChannelId + '"><i class="material-icons">mode_edit</i></button>';
|
||||
html += '<button class="btnMap autoSize" is="paper-icon-button-light" type="button" data-id="' + channel.Id + '" data-providerid="' + channel.ProviderChannelId + '"><i class="material-icons mode_edit"></i></button>';
|
||||
return html += "</div>";
|
||||
}
|
||||
|
||||
|
|
|
@ -131,8 +131,9 @@ define(['events'], function (events) {
|
|||
var links = [];
|
||||
var match;
|
||||
|
||||
// eslint-disable-next-line no-cond-assign
|
||||
while (match = linkRegExp.exec(text)) {
|
||||
// console.log(matches);
|
||||
console.debug(match);
|
||||
var txt = match[0];
|
||||
var pos = match.index;
|
||||
var len = txt.length;
|
||||
|
@ -189,7 +190,7 @@ define(['events'], function (events) {
|
|||
return apiClient.getPublicSystemInfo().then(function (info) {
|
||||
var localAddress = info.LocalAddress
|
||||
if (!localAddress) {
|
||||
console.log("No valid local address returned, defaulting to external one")
|
||||
console.debug("No valid local address returned, defaulting to external one")
|
||||
localAddress = serverAddress;
|
||||
}
|
||||
addToCache(serverAddress, localAddress);
|
||||
|
@ -230,4 +231,4 @@ define(['events'], function (events) {
|
|||
return {
|
||||
getServerAddress: getServerAddress
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -105,7 +105,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
this.sessionListener.bind(this),
|
||||
this.receiverListener.bind(this));
|
||||
|
||||
console.log('chromecast.initialize');
|
||||
console.debug('chromecast.initialize');
|
||||
chrome.cast.initialize(apiConfig, this.onInitSuccess.bind(this), this.errorHandler);
|
||||
};
|
||||
|
||||
|
@ -114,14 +114,14 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
*/
|
||||
CastPlayer.prototype.onInitSuccess = function () {
|
||||
this.isInitialized = true;
|
||||
console.log("chromecast init success");
|
||||
console.debug("chromecast init success");
|
||||
};
|
||||
|
||||
/**
|
||||
* Generic error callback function
|
||||
*/
|
||||
CastPlayer.prototype.onError = function () {
|
||||
console.log("chromecast error");
|
||||
console.debug("chromecast error");
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -177,10 +177,10 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
*/
|
||||
CastPlayer.prototype.receiverListener = function (e) {
|
||||
if (e === 'available') {
|
||||
console.log("chromecast receiver found");
|
||||
console.debug("chromecast receiver found");
|
||||
this.hasReceivers = true;
|
||||
} else {
|
||||
console.log("chromecast receiver list empty");
|
||||
console.debug("chromecast receiver list empty");
|
||||
this.hasReceivers = false;
|
||||
}
|
||||
};
|
||||
|
@ -190,7 +190,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
*/
|
||||
CastPlayer.prototype.sessionUpdateListener = function (isAlive) {
|
||||
if (isAlive) {
|
||||
console.log('sessionUpdateListener: already alive');
|
||||
console.debug('sessionUpdateListener: already alive');
|
||||
} else {
|
||||
this.session = null;
|
||||
this.deviceState = DEVICE_STATE.IDLE;
|
||||
|
@ -198,7 +198,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
document.removeEventListener("volumeupbutton", onVolumeUpKeyDown, false);
|
||||
document.removeEventListener("volumedownbutton", onVolumeDownKeyDown, false);
|
||||
|
||||
console.log('sessionUpdateListener: setting currentMediaSession to null');
|
||||
console.debug('sessionUpdateListener: setting currentMediaSession to null');
|
||||
this.currentMediaSession = null;
|
||||
|
||||
sendConnectionResult(false);
|
||||
|
@ -211,7 +211,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
* session request in opt_sessionRequest.
|
||||
*/
|
||||
CastPlayer.prototype.launchApp = function () {
|
||||
console.log("chromecast launching app...");
|
||||
console.debug("chromecast launching app...");
|
||||
chrome.cast.requestSession(this.onRequestSessionSuccess.bind(this), this.onLaunchError.bind(this));
|
||||
};
|
||||
|
||||
|
@ -220,7 +220,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
* @param {Object} e A chrome.cast.Session object
|
||||
*/
|
||||
CastPlayer.prototype.onRequestSessionSuccess = function (e) {
|
||||
console.log("chromecast session success: " + e.sessionId);
|
||||
console.debug("chromecast session success: " + e.sessionId);
|
||||
this.onSessionConnected(e);
|
||||
};
|
||||
|
||||
|
@ -262,7 +262,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
* Callback function for launch error
|
||||
*/
|
||||
CastPlayer.prototype.onLaunchError = function () {
|
||||
console.log("chromecast launch error");
|
||||
console.debug("chromecast launch error");
|
||||
this.deviceState = DEVICE_STATE.ERROR;
|
||||
sendConnectionResult(false);
|
||||
};
|
||||
|
@ -280,7 +280,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
* Callback function for stop app success
|
||||
*/
|
||||
CastPlayer.prototype.onStopAppSuccess = function (message) {
|
||||
console.log(message);
|
||||
console.debug(message);
|
||||
|
||||
this.deviceState = DEVICE_STATE.IDLE;
|
||||
this.castPlayerState = PLAYER_STATE.IDLE;
|
||||
|
@ -296,7 +296,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
*/
|
||||
CastPlayer.prototype.loadMedia = function (options, command) {
|
||||
if (!this.session) {
|
||||
console.log("no session");
|
||||
console.debug("no session");
|
||||
return Promise.reject();
|
||||
}
|
||||
|
||||
|
@ -377,7 +377,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
};
|
||||
|
||||
CastPlayer.prototype.onPlayCommandSuccess = function () {
|
||||
//console.log('Message was sent to receiver ok.');
|
||||
console.debug('Message was sent to receiver ok.');
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -386,7 +386,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
*/
|
||||
CastPlayer.prototype.onMediaDiscovered = function (how, mediaSession) {
|
||||
|
||||
//console.log("chromecast new media session ID:" + mediaSession.mediaSessionId + ' (' + how + ')');
|
||||
console.debug("chromecast new media session ID:" + mediaSession.mediaSessionId + ' (' + how + ')');
|
||||
this.currentMediaSession = mediaSession;
|
||||
|
||||
if (how === 'loadMedia') {
|
||||
|
@ -405,7 +405,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
* @param {!Boolean} e true/false
|
||||
*/
|
||||
CastPlayer.prototype.onMediaStatusUpdate = function (e) {
|
||||
//console.log("chromecast updating media: " + e);
|
||||
console.debug("chromecast updating media: " + e);
|
||||
if (e === false) {
|
||||
this.castPlayerState = PLAYER_STATE.IDLE;
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
*/
|
||||
CastPlayer.prototype.setReceiverVolume = function (mute, vol) {
|
||||
if (!this.currentMediaSession) {
|
||||
//console.log('this.currentMediaSession is null');
|
||||
console.debug('this.currentMediaSession is null');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -443,7 +443,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
* Callback function for media command success
|
||||
*/
|
||||
CastPlayer.prototype.mediaCommandSuccessCallback = function (info, e) {
|
||||
//console.log(info);
|
||||
console.debug(info);
|
||||
};
|
||||
|
||||
function normalizeImages(state) {
|
||||
|
@ -493,7 +493,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
|
||||
events.on(instance._castPlayer, eventName, function (e, data) {
|
||||
|
||||
//console.log('cc: ' + eventName);
|
||||
console.debug('cc: ' + eventName);
|
||||
var state = instance.getPlayerStateInternal(data);
|
||||
|
||||
events.trigger(instance, eventName, [state]);
|
||||
|
@ -520,14 +520,14 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
playbackManager.setActivePlayer(PlayerName, instance.getCurrentTargetInfo());
|
||||
}
|
||||
|
||||
console.log('cc: connect');
|
||||
console.debug('cc: connect');
|
||||
// Reset this so that statechange will fire
|
||||
instance.lastPlayerData = null;
|
||||
});
|
||||
|
||||
events.on(instance._castPlayer, "playbackstart", function (e, data) {
|
||||
|
||||
console.log('cc: playbackstart');
|
||||
console.debug('cc: playbackstart');
|
||||
|
||||
instance._castPlayer.initializeCastPlayer();
|
||||
|
||||
|
@ -537,7 +537,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
|
||||
events.on(instance._castPlayer, "playbackstop", function (e, data) {
|
||||
|
||||
console.log('cc: playbackstop');
|
||||
console.debug('cc: playbackstop');
|
||||
var state = instance.getPlayerStateInternal(data);
|
||||
|
||||
events.trigger(instance, "playbackstop", [state]);
|
||||
|
@ -555,7 +555,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
|
||||
events.on(instance._castPlayer, "playbackprogress", function (e, data) {
|
||||
|
||||
//console.log('cc: positionchange');
|
||||
console.debug('cc: positionchange');
|
||||
var state = instance.getPlayerStateInternal(data);
|
||||
|
||||
events.trigger(instance, "timeupdate", [state]);
|
||||
|
@ -569,7 +569,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
|
||||
events.on(instance._castPlayer, "playstatechange", function (e, data) {
|
||||
|
||||
//console.log('cc: playstatechange');
|
||||
console.debug('cc: playstatechange');
|
||||
var state = instance.getPlayerStateInternal(data);
|
||||
|
||||
events.trigger(instance, "pause", [state]);
|
||||
|
@ -664,7 +664,7 @@ define(['appSettings', 'userSettings', 'playbackManager', 'connectionManager', '
|
|||
|
||||
normalizeImages(data);
|
||||
|
||||
//console.log(JSON.stringify(data));
|
||||
console.debug(JSON.stringify(data));
|
||||
|
||||
if (triggerStateChange) {
|
||||
events.trigger(this, "statechange", [data]);
|
||||
|
|
|
@ -24,4 +24,4 @@ define([], function () {
|
|||
return Promise.reject();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
</div>
|
||||
|
||||
<div class="formDialogFooter formDialogFooter-clear formDialogFooter-flex" style="padding-bottom: 1.5em;">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -32,7 +32,7 @@ define(['appRouter', 'focusManager', 'browser', 'layoutManager', 'inputManager',
|
|||
try {
|
||||
parentNode.removeChild(elem);
|
||||
} catch (err) {
|
||||
console.log('Error removing dialog element: ' + err);
|
||||
console.error('error removing dialog element: ' + err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -481,4 +481,4 @@ define(['appRouter', 'focusManager', 'browser', 'layoutManager', 'inputManager',
|
|||
globalOnOpenCallback = val;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -76,7 +76,7 @@ define(['loading', 'dialogHelper', 'dom', 'listViewStyle', 'emby-input', 'paper-
|
|||
html += name;
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
html += '<i class="material-icons" style="font-size:inherit;">arrow_forward</i>';
|
||||
html += '<i class="material-icons arrow_forward" style="font-size:inherit;"></i>';
|
||||
html += "</div>";
|
||||
return html;
|
||||
}
|
||||
|
|
|
@ -63,13 +63,14 @@ define([], function () {
|
|||
var supportsCaptureOption = false;
|
||||
try {
|
||||
var opts = Object.defineProperty({}, 'capture', {
|
||||
// eslint-disable-next-line getter-return
|
||||
get: function () {
|
||||
supportsCaptureOption = true;
|
||||
}
|
||||
});
|
||||
window.addEventListener("test", null, opts);
|
||||
} catch (e) {
|
||||
console.log('error checking capture support');
|
||||
console.debug('error checking capture support');
|
||||
}
|
||||
|
||||
function addEventListenerWithOptions(target, type, handler, options) {
|
||||
|
@ -178,4 +179,4 @@ define([], function () {
|
|||
whichAnimationEvent: whichAnimationEvent,
|
||||
whichAnimationCancelEvent: whichAnimationCancelEvent
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -74,4 +74,4 @@ define(['emby-progressring', 'dom', 'serverNotifications', 'events', 'registerEl
|
|||
prototype: EmbyItemRefreshIndicatorPrototype,
|
||||
extends: 'div'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -467,7 +467,7 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
|
|||
focusManager.focus(newElement);
|
||||
return;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -479,4 +479,4 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
|
|||
prototype: ItemsContainerPrototype,
|
||||
extends: 'div'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -206,4 +206,4 @@ define(['scroller', 'dom', 'layoutManager', 'inputManager', 'focusManager', 'bro
|
|||
prototype: ScrollerPrototype,
|
||||
extends: 'div'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -338,4 +338,4 @@ define(['dom', 'scroller', 'browser', 'layoutManager', 'focusManager', 'register
|
|||
prototype: EmbyTabs,
|
||||
extends: 'div'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -51,7 +51,7 @@ define([], function () {
|
|||
|
||||
function fetchWithTimeout(url, options, timeoutMs) {
|
||||
|
||||
console.log('fetchWithTimeout: timeoutMs: ' + timeoutMs + ', url: ' + url);
|
||||
console.debug('fetchWithTimeout: timeoutMs: ' + timeoutMs + ', url: ' + url);
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
|
@ -63,14 +63,14 @@ define([], function () {
|
|||
fetch(url, options).then(function (response) {
|
||||
clearTimeout(timeout);
|
||||
|
||||
console.log('fetchWithTimeout: succeeded connecting to url: ' + url);
|
||||
console.debug('fetchWithTimeout: succeeded connecting to url: ' + url);
|
||||
|
||||
resolve(response);
|
||||
}, function (error) {
|
||||
|
||||
clearTimeout(timeout);
|
||||
|
||||
console.log('fetchWithTimeout: timed out connecting to url: ' + url);
|
||||
console.debug('fetchWithTimeout: timed out connecting to url: ' + url);
|
||||
|
||||
reject();
|
||||
});
|
||||
|
@ -93,21 +93,17 @@ define([], function () {
|
|||
}
|
||||
|
||||
function ajax(request) {
|
||||
|
||||
if (!request) {
|
||||
throw new Error("Request cannot be null");
|
||||
}
|
||||
|
||||
request.headers = request.headers || {};
|
||||
|
||||
console.log('requesting url: ' + request.url);
|
||||
console.debug('requesting url: ' + request.url);
|
||||
|
||||
return getFetchPromise(request).then(function (response) {
|
||||
|
||||
console.log('response status: ' + response.status + ', url: ' + request.url);
|
||||
|
||||
console.debug('response status: ' + response.status + ', url: ' + request.url);
|
||||
if (response.status < 400) {
|
||||
|
||||
if (request.dataType === 'json' || request.headers.accept === 'application/json') {
|
||||
return response.json();
|
||||
} else if (request.dataType === 'text' || (response.headers.get('Content-Type') || '').toLowerCase().indexOf('text/') === 0) {
|
||||
|
@ -118,10 +114,8 @@ define([], function () {
|
|||
} else {
|
||||
return Promise.reject(response);
|
||||
}
|
||||
|
||||
}, function (err) {
|
||||
|
||||
console.log('request failed to url: ' + request.url);
|
||||
console.error('request failed to url: ' + request.url);
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
|
@ -129,4 +123,4 @@ define([], function () {
|
|||
getFetchPromise: getFetchPromise,
|
||||
ajax: ajax
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -15,4 +15,4 @@ define(['multi-download'], function (multiDownload) {
|
|||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -15,4 +15,4 @@ define([], function () {
|
|||
return Promise.reject();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -105,4 +105,4 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -43,7 +43,7 @@ define(['dom', 'scrollManager'], function (dom, scrollManager) {
|
|||
preventScroll: scrollManager.isEnabled()
|
||||
});
|
||||
} catch (err) {
|
||||
console.log('Error in focusManager.autoFocus: ' + err);
|
||||
console.error('Error in focusManager.autoFocus: ' + err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,20 +89,6 @@ define(['dialogHelper', 'globalize', 'userSettings', 'layoutManager', 'connectio
|
|||
}
|
||||
}
|
||||
|
||||
function onSortByChange() {
|
||||
var newValue = this.value;
|
||||
if (this.checked) {
|
||||
var changed = options.query.SortBy !== newValue;
|
||||
|
||||
options.query.SortBy = newValue.replace('_', ',');
|
||||
options.query.StartIndex = 0;
|
||||
|
||||
if (options.callback && changed) {
|
||||
options.callback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showEditor(options) {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
@ -171,4 +157,4 @@ define(['dialogHelper', 'globalize', 'userSettings', 'layoutManager', 'connectio
|
|||
return {
|
||||
show: showEditor
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -29,7 +29,6 @@ define(['require', 'inputManager', 'browser', 'globalize', 'connectionManager',
|
|||
var offset = newPct - left;
|
||||
var pctOfWidth = (offset / width) * 100;
|
||||
|
||||
//console.log(pctOfWidth);
|
||||
var guideProgramName = cell.guideProgramName;
|
||||
if (!guideProgramName) {
|
||||
guideProgramName = cell.querySelector('.guideProgramName');
|
||||
|
@ -396,7 +395,7 @@ define(['require', 'inputManager', 'browser', 'globalize', 'connectionManager',
|
|||
try {
|
||||
program.StartDateLocal = datetime.parseISO8601Date(program.StartDate, { toLocal: true });
|
||||
} catch (err) {
|
||||
console.log('error parsing timestamp for start date');
|
||||
console.error('error parsing timestamp for start date');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -404,7 +403,7 @@ define(['require', 'inputManager', 'browser', 'globalize', 'connectionManager',
|
|||
try {
|
||||
program.EndDateLocal = datetime.parseISO8601Date(program.EndDate, { toLocal: true });
|
||||
} catch (err) {
|
||||
console.log('error parsing timestamp for end date');
|
||||
console.error('error parsing timestamp for end date');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,6 @@
|
|||
<i class="material-icons arrow_back"></i>
|
||||
</button>
|
||||
<button is="paper-icon-button-light" type="button" class="btnNextPage">
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
<i class="material-icons arrow_forward"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -340,4 +340,4 @@ define(['dom', 'layoutManager', 'browser', 'css!./headroom'], function (dom, lay
|
|||
};
|
||||
|
||||
return Headroom;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -129,4 +129,4 @@
|
|||
<button is="emby-button" type="submit" class="raised button-submit block btnSave hide">
|
||||
<span>${Save}</span>
|
||||
</button>
|
||||
</form>
|
||||
</form>
|
||||
|
|
|
@ -77,7 +77,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||
|
||||
var createNowLink = elem.querySelector("#button-createLibrary")
|
||||
if (createNowLink) {
|
||||
createNowLink.addEventListener("click", () => {
|
||||
createNowLink.addEventListener("click", function () {
|
||||
Dashboard.navigate("library.html");
|
||||
});
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||
html += '</div>';
|
||||
|
||||
if (enableScrollX()) {
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true">';
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x">';
|
||||
} else {
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer focuscontainer-x padded-left padded-right vertical-wrap">';
|
||||
|
@ -343,7 +343,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||
if (userViews.length) {
|
||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderMyMedia') + '</h2>';
|
||||
if (enableScrollX()) {
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true">';
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x">';
|
||||
} else {
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right focuscontainer-x vertical-wrap">';
|
||||
|
@ -423,7 +423,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||
|
||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderContinueWatching') + '</h2>';
|
||||
if (enableScrollX()) {
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true">';
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x" data-monitor="videoplayback,markplayed">';
|
||||
} else {
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right vertical-wrap focuscontainer-x" data-monitor="videoplayback,markplayed">';
|
||||
|
@ -496,7 +496,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||
|
||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderContinueWatching') + '</h2>';
|
||||
if (enableScrollX()) {
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true">';
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x" data-monitor="audioplayback,markplayed">';
|
||||
} else {
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right vertical-wrap focuscontainer-x" data-monitor="audioplayback,markplayed">';
|
||||
|
@ -582,7 +582,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||
html += '</div>';
|
||||
|
||||
if (enableScrollX()) {
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true" data-scrollbuttons="false">';
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true" data-scrollbuttons="false">';
|
||||
html += '<div class="padded-top padded-bottom scrollSlider focuscontainer-x">';
|
||||
} else {
|
||||
html += '<div class="padded-top padded-bottom focuscontainer-x">';
|
||||
|
@ -639,7 +639,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||
html += '</div>';
|
||||
|
||||
if (enableScrollX()) {
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true">';
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x">'
|
||||
} else {
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right vertical-wrap focuscontainer-x">';
|
||||
|
@ -713,7 +713,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||
html += '</div>';
|
||||
|
||||
if (enableScrollX()) {
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true">';
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x" data-monitor="videoplayback,markplayed">'
|
||||
} else {
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right vertical-wrap focuscontainer-x" data-monitor="videoplayback,markplayed">';
|
||||
|
@ -785,7 +785,7 @@ define(['connectionManager', 'cardBuilder', 'appSettings', 'dom', 'apphost', 'la
|
|||
html += '</div>';
|
||||
|
||||
if (enableScrollX()) {
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-mousewheel="false" data-centerfocus="true">';
|
||||
html += '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-centerfocus="true">';
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x">'
|
||||
} else {
|
||||
html += '<div is="emby-itemscontainer" class="itemsContainer padded-left padded-right vertical-wrap focuscontainer-x">';
|
||||
|
|
|
@ -114,12 +114,12 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
|
||||
if (!recoverDecodingErrorDate || (now - recoverDecodingErrorDate) > 3000) {
|
||||
recoverDecodingErrorDate = now;
|
||||
console.log('try to recover media Error ...');
|
||||
console.debug('try to recover media Error ...');
|
||||
hlsPlayer.recoverMediaError();
|
||||
} else {
|
||||
if (!recoverSwapAudioCodecDate || (now - recoverSwapAudioCodecDate) > 3000) {
|
||||
recoverSwapAudioCodecDate = now;
|
||||
console.log('try to swap Audio Codec and recover media Error ...');
|
||||
console.debug('try to swap Audio Codec and recover media Error ...');
|
||||
hlsPlayer.swapAudioCodec();
|
||||
hlsPlayer.recoverMediaError();
|
||||
} else {
|
||||
|
@ -233,7 +233,7 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
return Promise.resolve();
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('error calling video.play: ' + err);
|
||||
console.error('error calling video.play: ' + err);
|
||||
return Promise.reject();
|
||||
}
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
try {
|
||||
player.unload();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
instance._castPlayer = null;
|
||||
|
@ -258,7 +258,7 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
try {
|
||||
player.destroy();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
instance._shakaPlayer = null;
|
||||
|
@ -271,7 +271,7 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
try {
|
||||
player.destroy();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
instance._hlsPlayer = null;
|
||||
|
@ -286,7 +286,7 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
player.detachMediaElement();
|
||||
player.destroy();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
instance._flvPlayer = null;
|
||||
|
@ -307,14 +307,14 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
|
||||
hls.on(Hls.Events.ERROR, function (event, data) {
|
||||
|
||||
console.log('HLS Error: Type: ' + data.type + ' Details: ' + (data.details || '') + ' Fatal: ' + (data.fatal || false));
|
||||
console.error('HLS Error: Type: ' + data.type + ' Details: ' + (data.details || '') + ' Fatal: ' + (data.fatal || false));
|
||||
|
||||
switch (data.type) {
|
||||
case Hls.ErrorTypes.NETWORK_ERROR:
|
||||
// try to recover network error
|
||||
if (data.response && data.response.code && data.response.code >= 400) {
|
||||
|
||||
console.log('hls.js response error code: ' + data.response.code);
|
||||
console.debug('hls.js response error code: ' + data.response.code);
|
||||
|
||||
// Trigger failure differently depending on whether this is prior to start of playback, or after
|
||||
hls.destroy();
|
||||
|
@ -343,7 +343,7 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
|
||||
// This could be a CORS error related to access control response headers
|
||||
|
||||
console.log('hls.js response error code: ' + data.response.code);
|
||||
console.debug('hls.js response error code: ' + data.response.code);
|
||||
|
||||
// Trigger failure differently depending on whether this is prior to start of playback, or after
|
||||
hls.destroy();
|
||||
|
@ -355,20 +355,20 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
onErrorInternal(instance, 'network');
|
||||
}
|
||||
} else {
|
||||
console.log("fatal network error encountered, try to recover");
|
||||
console.debug("fatal network error encountered, try to recover");
|
||||
hls.startLoad();
|
||||
}
|
||||
|
||||
break;
|
||||
case Hls.ErrorTypes.MEDIA_ERROR:
|
||||
console.log("fatal media error encountered, try to recover");
|
||||
console.debug("fatal media error encountered, try to recover");
|
||||
var currentReject = reject;
|
||||
reject = null;
|
||||
handleHlsJsMediaError(instance, currentReject);
|
||||
break;
|
||||
default:
|
||||
|
||||
console.log('Cannot recover from hls error - destroy and trigger error');
|
||||
console.debug('Cannot recover from hls error - destroy and trigger error');
|
||||
// cannot recover
|
||||
// Trigger failure differently depending on whether this is prior to start of playback, or after
|
||||
hls.destroy();
|
||||
|
@ -463,4 +463,4 @@ define(['appSettings', 'browser', 'events'], function (appSettings, browser, eve
|
|||
getCrossOriginValue: getCrossOriginValue,
|
||||
getBufferedRanges: getBufferedRanges
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -16,7 +16,7 @@ define(['events', 'browser', 'require', 'apphost', 'appSettings', 'htmlMediaHelp
|
|||
// Need to record the starting volume on each pass rather than querying elem.volume
|
||||
// This is due to iOS safari not allowing volume changes and always returning the system volume value
|
||||
var newVolume = Math.max(0, startingVolume - 0.15);
|
||||
console.log('fading volume to ' + newVolume);
|
||||
console.debug('fading volume to ' + newVolume);
|
||||
elem.volume = newVolume;
|
||||
|
||||
if (newVolume <= 0) {
|
||||
|
@ -113,7 +113,7 @@ define(['events', 'browser', 'require', 'apphost', 'appSettings', 'htmlMediaHelp
|
|||
bindEvents(elem);
|
||||
|
||||
var val = options.url;
|
||||
console.log('playing url: ' + val);
|
||||
console.debug('playing url: ' + val);
|
||||
|
||||
// Convert to seconds
|
||||
var seconds = (options.playerStartPositionTicks || 0) / 10000000;
|
||||
|
@ -298,7 +298,7 @@ define(['events', 'browser', 'require', 'apphost', 'appSettings', 'htmlMediaHelp
|
|||
|
||||
var errorCode = this.error ? (this.error.code || 0) : 0;
|
||||
var errorMessage = this.error ? (this.error.message || '') : '';
|
||||
console.log('Media element error: ' + errorCode.toString() + ' ' + errorMessage);
|
||||
console.error('media element error: ' + errorCode.toString() + ' ' + errorMessage);
|
||||
|
||||
var type;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackManager', 'appRouter', 'appSettings', 'connectionManager', 'htmlMediaHelper', 'itemHelper', 'fullscreenManager', 'globalize'], function (browser, require, events, appHost, loading, dom, playbackManager, appRouter, appSettings, connectionManager, htmlMediaHelper, itemHelper, fullscreenManager, globalize) {
|
||||
"use strict";
|
||||
/* globals cast */
|
||||
|
||||
var mediaManager;
|
||||
|
||||
|
@ -11,7 +12,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
try {
|
||||
parentNode.removeChild(elem);
|
||||
} catch (err) {
|
||||
console.log('Error removing dialog element: ' + err);
|
||||
console.error('error removing dialog element: ' + err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -242,7 +243,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
|
||||
loading.show();
|
||||
|
||||
console.log('prefetching hls playlist: ' + hlsPlaylistUrl);
|
||||
console.debug('prefetching hls playlist: ' + hlsPlaylistUrl);
|
||||
|
||||
return connectionManager.getApiClient(item.ServerId).ajax({
|
||||
|
||||
|
@ -251,7 +252,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
|
||||
}).then(function () {
|
||||
|
||||
console.log('completed prefetching hls playlist: ' + hlsPlaylistUrl);
|
||||
console.debug('completed prefetching hls playlist: ' + hlsPlaylistUrl);
|
||||
|
||||
loading.hide();
|
||||
streamInfo.url = hlsPlaylistUrl;
|
||||
|
@ -260,7 +261,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
|
||||
}, function () {
|
||||
|
||||
console.log('error prefetching hls playlist: ' + hlsPlaylistUrl);
|
||||
console.error('error prefetching hls playlist: ' + hlsPlaylistUrl);
|
||||
|
||||
loading.hide();
|
||||
return Promise.resolve();
|
||||
|
@ -357,6 +358,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['shaka'], function () {
|
||||
/* globals shaka */
|
||||
|
||||
var player = new shaka.Player(elem);
|
||||
|
||||
|
@ -408,7 +410,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
lrd.media.streamType = cast.receiver.media.StreamType.OTHER;
|
||||
lrd.media.customData = options;
|
||||
|
||||
console.log('loading media url into mediaManager');
|
||||
console.debug('loading media url into media manager');
|
||||
|
||||
try {
|
||||
mediaManager.load(lrd);
|
||||
|
@ -418,7 +420,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
return Promise.resolve();
|
||||
} catch (err) {
|
||||
|
||||
console.log('mediaManager error: ' + err);
|
||||
console.debug('media manager error: ' + err);
|
||||
return Promise.reject();
|
||||
}
|
||||
}
|
||||
|
@ -460,11 +462,11 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
protocol = cast.player.api.CreateSmoothStreamingProtocol(host);
|
||||
}
|
||||
|
||||
console.log('loading playback url: ' + url);
|
||||
console.log('contentType: ' + contentType);
|
||||
console.debug('loading playback url: ' + url);
|
||||
console.debug('content type: ' + contentType);
|
||||
|
||||
host.onError = function (errorCode) {
|
||||
console.log("Fatal Error - " + errorCode);
|
||||
console.error("fatal Error - " + errorCode);
|
||||
};
|
||||
|
||||
mediaElement.autoplay = false;
|
||||
|
@ -499,7 +501,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
elem.removeEventListener('error', onError);
|
||||
|
||||
var val = options.url;
|
||||
console.log('playing url: ' + val);
|
||||
console.debug('playing url: ' + val);
|
||||
|
||||
// Convert to seconds
|
||||
var seconds = (options.playerStartPositionTicks || 0) / 10000000;
|
||||
|
@ -608,7 +610,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
} else if (currentTrackEvents) {
|
||||
setTrackEventsSubtitleOffset(currentTrackEvents, offsetValue);
|
||||
} else {
|
||||
console.log("No available track, cannot apply offset: ", offsetValue);
|
||||
console.debug("No available track, cannot apply offset: ", offsetValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -727,22 +729,18 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
// https://msdn.microsoft.com/en-us/library/hh772507(v=vs.85).aspx
|
||||
|
||||
var elemAudioTracks = elem.audioTracks || [];
|
||||
console.log('found ' + elemAudioTracks.length + ' audio tracks');
|
||||
console.debug('found ' + elemAudioTracks.length + ' audio tracks');
|
||||
|
||||
for (i = 0, length = elemAudioTracks.length; i < length; i++) {
|
||||
|
||||
if (audioIndex === i) {
|
||||
console.log('setting audio track ' + i + ' to enabled');
|
||||
console.debug('setting audio track ' + i + ' to enabled');
|
||||
elemAudioTracks[i].enabled = true;
|
||||
} else {
|
||||
console.log('setting audio track ' + i + ' to disabled');
|
||||
console.debug('setting audio track ' + i + ' to disabled');
|
||||
elemAudioTracks[i].enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
elem.currentTime = elem.currentTime;
|
||||
}, 100);
|
||||
};
|
||||
|
||||
self.stop = function (destroyPlayer) {
|
||||
|
@ -911,7 +909,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
function onError() {
|
||||
var errorCode = this.error ? (this.error.code || 0) : 0;
|
||||
var errorMessage = this.error ? (this.error.message || '') : '';
|
||||
console.log('Media element error: ' + errorCode.toString() + ' ' + errorMessage);
|
||||
console.error('media element error: ' + errorCode.toString() + ' ' + errorMessage);
|
||||
|
||||
var type;
|
||||
|
||||
|
@ -1058,8 +1056,9 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
return i.DeliveryUrl;
|
||||
}),
|
||||
workerUrl: appRouter.baseUrl() + "/libraries/subtitles-octopus-worker.js",
|
||||
legacyWorkerUrl: appRouter.baseUrl() + "/libraries/subtitles-octopus-worker-legacy.js",
|
||||
onError: function() {
|
||||
htmlMediaHelper.onErrorInternal(self, 'mediadecodeerror')
|
||||
htmlMediaHelper.onErrorInternal(self, 'mediadecodeerror');
|
||||
}
|
||||
};
|
||||
require(['JavascriptSubtitlesOctopus'], function(SubtitlesOctopus) {
|
||||
|
@ -1115,9 +1114,10 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
|
||||
function renderSsaAss(videoElement, track, item) {
|
||||
if (supportsCanvas() && supportsWebWorkers()) {
|
||||
console.debug('rendering subtitles with SubtitlesOctopus');
|
||||
renderWithSubtitlesOctopus(videoElement, track, item);
|
||||
} else {
|
||||
console.log('rendering subtitles with libjass');
|
||||
console.debug('rendering subtitles with libjass');
|
||||
renderWithLibjass(videoElement, track, item);
|
||||
}
|
||||
}
|
||||
|
@ -1137,7 +1137,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
var videoElement = self._mediaElement;
|
||||
var width = videoElement.offsetWidth;
|
||||
var height = videoElement.offsetHeight;
|
||||
console.log('videoElement resized: ' + width + 'x' + height);
|
||||
console.debug('videoElement resized: ' + width + 'x' + height);
|
||||
renderer.resize(width, height, 0, 0);
|
||||
}
|
||||
}
|
||||
|
@ -1254,7 +1254,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
trackElement.removeCue(trackElement.cues[0]);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Error removing cue from textTrack');
|
||||
console.error('error removing cue from textTrack');
|
||||
}
|
||||
|
||||
trackElement.mode = 'disabled';
|
||||
|
@ -1268,7 +1268,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
fetchSubtitles(track, item).then(function (data) {
|
||||
|
||||
// show in ui
|
||||
console.log('downloaded ' + data.TrackEvents.length + ' track events');
|
||||
console.debug('downloaded ' + data.TrackEvents.length + ' track events');
|
||||
// add some cues to show the text
|
||||
// in safari, the cues need to be added before setting the track mode to showing
|
||||
data.TrackEvents.forEach(function (trackEvent) {
|
||||
|
@ -1294,7 +1294,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
try {
|
||||
clock.seek(timeMs / 1000);
|
||||
} catch (err) {
|
||||
console.log('Error in libjass: ' + err);
|
||||
console.error('error in libjass: ' + err);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1327,7 +1327,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
|
||||
function setCurrentTrackElement(streamIndex) {
|
||||
|
||||
console.log('Setting new text track index to: ' + streamIndex);
|
||||
console.debug('setting new text track index to: ' + streamIndex);
|
||||
|
||||
var mediaStreamTextTracks = getMediaStreamTextTracks(self._currentPlayOptions.mediaSource);
|
||||
|
||||
|
@ -1348,38 +1348,6 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
}
|
||||
}
|
||||
|
||||
function updateTextStreamUrls(startPositionTicks) {
|
||||
|
||||
if (!supportsTextTracks()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var allTracks = self._mediaElement.textTracks; // get list of tracks
|
||||
var i;
|
||||
var track;
|
||||
|
||||
for (i = 0; i < allTracks.length; i++) {
|
||||
|
||||
track = allTracks[i];
|
||||
|
||||
// This throws an error in IE, but is fine in chrome
|
||||
// In IE it's not necessary anyway because changing the src seems to be enough
|
||||
try {
|
||||
while (track.cues.length) {
|
||||
track.removeCue(track.cues[0]);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Error removing cue from textTrack');
|
||||
}
|
||||
}
|
||||
|
||||
var tracks = self._mediaElement.querySelectorAll('track');
|
||||
for (i = 0; i < tracks.length; i++) {
|
||||
track = tracks[i];
|
||||
track.src = replaceQueryString(track.src, 'startPositionTicks', startPositionTicks);
|
||||
}
|
||||
}
|
||||
|
||||
function createMediaElement(options) {
|
||||
|
||||
if (browser.tv || browser.iOS || browser.mobile) {
|
||||
|
@ -1590,7 +1558,7 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
};
|
||||
|
||||
function onPictureInPictureError(err) {
|
||||
console.log('Picture in picture error: ' + err.toString());
|
||||
console.error('Picture in picture error: ' + err.toString());
|
||||
}
|
||||
|
||||
HtmlVideoPlayer.prototype.setPictureInPictureEnabled = function (isEnabled) {
|
||||
|
@ -1651,9 +1619,13 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
if (document.AirPlayEnabled) {
|
||||
if (video) {
|
||||
if (isEnabled) {
|
||||
video.requestAirPlay().catch(onAirPlayError);
|
||||
video.requestAirPlay().catch(function(err) {
|
||||
console.error("Error requesting AirPlay", err)
|
||||
});
|
||||
} else {
|
||||
document.exitAirPLay().catch(onAirPlayError);
|
||||
document.exitAirPLay().catch(function(err) {
|
||||
console.error("Error exiting AirPlay", err)
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -25,6 +25,7 @@ define(["datetime"], function (datetime) {
|
|||
if (seconds < 0) {
|
||||
seconds = Math.abs(seconds);
|
||||
}
|
||||
// eslint-disable-next-line no-cond-assign
|
||||
for (; format = time_formats[i++];) {
|
||||
if (seconds < format[0]) {
|
||||
if (2 == format.length) {
|
||||
|
|
|
@ -117,7 +117,7 @@ define(['loading', 'apphost', 'dialogHelper', 'connectionManager', 'imageLoader'
|
|||
html += '<div data-role="controlgroup" data-type="horizontal" style="display:inline-block;">';
|
||||
|
||||
html += '<button is="paper-icon-button-light" title="' + globalize.translate('Previous') + '" class="btnPreviousPage autoSize" ' + (startIndex ? '' : 'disabled') + '><i class="material-icons arrow_back"></i></button>';
|
||||
html += '<button is="paper-icon-button-light" title="' + globalize.translate('Next') + '" class="btnNextPage autoSize" ' + (startIndex + limit >= totalRecordCount ? 'disabled' : '') + '><i class="material-icons">arrow_forward</i></button>';
|
||||
html += '<button is="paper-icon-button-light" title="' + globalize.translate('Next') + '" class="btnNextPage autoSize" ' + (startIndex + limit >= totalRecordCount ? 'disabled' : '') + '><i class="material-icons arrow_forward"></i></button>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,7 @@ define(['loading', 'apphost', 'dialogHelper', 'connectionManager', 'imageLoader'
|
|||
if (enableFooterButtons) {
|
||||
html += '<div class="cardText cardTextCentered">';
|
||||
|
||||
html += '<button is="paper-icon-button-light" class="btnDownloadRemoteImage autoSize" raised" title="' + globalize.translate('Download') + '"><i class="material-icons">cloud_download</i></button>';
|
||||
html += '<button is="paper-icon-button-light" class="btnDownloadRemoteImage autoSize" raised" title="' + globalize.translate('Download') + '"><i class="material-icons cloud_download"></i></button>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -35,4 +35,4 @@ define(['dom'], function (dom) {
|
|||
loadImage: loadImage
|
||||
};
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -122,4 +122,4 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
|||
self.getPrimaryImageAspectRatio = getPrimaryImageAspectRatio;
|
||||
|
||||
return self;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -47,7 +47,7 @@ define(['dialogHelper', 'connectionManager', 'dom', 'loading', 'scrollHelper', '
|
|||
};
|
||||
reader.onabort = function () {
|
||||
loading.hide();
|
||||
console.log('File read cancelled');
|
||||
console.debug('File read cancelled');
|
||||
};
|
||||
|
||||
// Closure to capture the file information.
|
||||
|
|
|
@ -62,7 +62,7 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun
|
|||
startDate = datetime.parseISO8601Date(item.StartDate).getTime();
|
||||
endDate = datetime.parseISO8601Date(item.EndDate).getTime();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
var now = new Date().getTime();
|
||||
|
@ -174,7 +174,7 @@ define(['datetime', 'itemHelper', 'css!./indicators.css', 'material-icons'], fun
|
|||
return '<div class="unairedIndicator">Unaired</div>';
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
return '<div class="missingIndicator">Missing</div>';
|
||||
|
|
|
@ -251,114 +251,150 @@ require(['apphost'], function (appHost) {
|
|||
}
|
||||
}
|
||||
|
||||
var inputLoopTimer;
|
||||
function runInputLoop() {
|
||||
// Get the latest gamepad state.
|
||||
var gamepads;
|
||||
if (navigator.getGamepads) {
|
||||
gamepads = navigator.getGamepads();
|
||||
} else if (navigator.webkitGetGamepads) {
|
||||
gamepads = navigator.webkitGetGamepads();
|
||||
}
|
||||
gamepads = gamepads || [];
|
||||
var i;
|
||||
var j;
|
||||
var len;
|
||||
for (i = 0, len = gamepads.length; i < len; i++) {
|
||||
var gamepads = navigator.getGamepads();
|
||||
for (var i = 0, len = gamepads.length; i < len; i++) {
|
||||
var gamepad = gamepads[i];
|
||||
if (gamepad) {
|
||||
// Iterate through the axes
|
||||
var axes = gamepad.axes;
|
||||
var leftStickX = axes[0];
|
||||
var leftStickY = axes[1];
|
||||
if (leftStickX > _THUMB_STICK_THRESHOLD) { // Right
|
||||
_ButtonPressedState.setleftThumbstickRight(true);
|
||||
} else if (leftStickX < -_THUMB_STICK_THRESHOLD) { // Left
|
||||
_ButtonPressedState.setleftThumbstickLeft(true);
|
||||
} else if (leftStickY < -_THUMB_STICK_THRESHOLD) { // Up
|
||||
_ButtonPressedState.setleftThumbstickUp(true);
|
||||
} else if (leftStickY > _THUMB_STICK_THRESHOLD) { // Down
|
||||
_ButtonPressedState.setleftThumbstickDown(true);
|
||||
} else {
|
||||
_ButtonPressedState.setleftThumbstickLeft(false);
|
||||
_ButtonPressedState.setleftThumbstickRight(false);
|
||||
_ButtonPressedState.setleftThumbstickUp(false);
|
||||
_ButtonPressedState.setleftThumbstickDown(false);
|
||||
}
|
||||
// Iterate through the buttons to see if Left thumbstick, DPad, A and B are pressed.
|
||||
var buttons = gamepad.buttons;
|
||||
for (j = 0, len = buttons.length; j < len; j++) {
|
||||
if (ProcessedButtons.indexOf(j) !== -1) {
|
||||
|
||||
if (buttons[j].pressed) {
|
||||
switch (j) {
|
||||
case _GAMEPAD_DPAD_UP_BUTTON_INDEX:
|
||||
_ButtonPressedState.setdPadUp(true);
|
||||
break;
|
||||
case _GAMEPAD_DPAD_DOWN_BUTTON_INDEX:
|
||||
_ButtonPressedState.setdPadDown(true);
|
||||
break;
|
||||
case _GAMEPAD_DPAD_LEFT_BUTTON_INDEX:
|
||||
_ButtonPressedState.setdPadLeft(true);
|
||||
break;
|
||||
case _GAMEPAD_DPAD_RIGHT_BUTTON_INDEX:
|
||||
_ButtonPressedState.setdPadRight(true);
|
||||
break;
|
||||
case _GAMEPAD_A_BUTTON_INDEX:
|
||||
_ButtonPressedState.setgamepadA(true);
|
||||
break;
|
||||
case _GAMEPAD_B_BUTTON_INDEX:
|
||||
_ButtonPressedState.setgamepadB(true);
|
||||
break;
|
||||
default:
|
||||
// No-op
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (j) {
|
||||
case _GAMEPAD_DPAD_UP_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getdPadUp()) {
|
||||
_ButtonPressedState.setdPadUp(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_DPAD_DOWN_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getdPadDown()) {
|
||||
_ButtonPressedState.setdPadDown(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_DPAD_LEFT_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getdPadLeft()) {
|
||||
_ButtonPressedState.setdPadLeft(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_DPAD_RIGHT_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getdPadRight()) {
|
||||
_ButtonPressedState.setdPadRight(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_A_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getgamepadA()) {
|
||||
_ButtonPressedState.setgamepadA(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_B_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getgamepadB()) {
|
||||
_ButtonPressedState.setgamepadB(false);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// No-op
|
||||
break;
|
||||
}
|
||||
if (!gamepad) {
|
||||
continue;
|
||||
}
|
||||
// Iterate through the axes
|
||||
var axes = gamepad.axes;
|
||||
var leftStickX = axes[0];
|
||||
var leftStickY = axes[1];
|
||||
if (leftStickX > _THUMB_STICK_THRESHOLD) { // Right
|
||||
_ButtonPressedState.setleftThumbstickRight(true);
|
||||
} else if (leftStickX < -_THUMB_STICK_THRESHOLD) { // Left
|
||||
_ButtonPressedState.setleftThumbstickLeft(true);
|
||||
} else if (leftStickY < -_THUMB_STICK_THRESHOLD) { // Up
|
||||
_ButtonPressedState.setleftThumbstickUp(true);
|
||||
} else if (leftStickY > _THUMB_STICK_THRESHOLD) { // Down
|
||||
_ButtonPressedState.setleftThumbstickDown(true);
|
||||
} else {
|
||||
_ButtonPressedState.setleftThumbstickLeft(false);
|
||||
_ButtonPressedState.setleftThumbstickRight(false);
|
||||
_ButtonPressedState.setleftThumbstickUp(false);
|
||||
_ButtonPressedState.setleftThumbstickDown(false);
|
||||
}
|
||||
// Iterate through the buttons to see if Left thumbstick, DPad, A and B are pressed.
|
||||
var buttons = gamepad.buttons;
|
||||
for (var j = 0, len = buttons.length; j < len; j++) {
|
||||
if (ProcessedButtons.indexOf(j) !== -1) {
|
||||
if (buttons[j].pressed) {
|
||||
switch (j) {
|
||||
case _GAMEPAD_DPAD_UP_BUTTON_INDEX:
|
||||
_ButtonPressedState.setdPadUp(true);
|
||||
break;
|
||||
case _GAMEPAD_DPAD_DOWN_BUTTON_INDEX:
|
||||
_ButtonPressedState.setdPadDown(true);
|
||||
break;
|
||||
case _GAMEPAD_DPAD_LEFT_BUTTON_INDEX:
|
||||
_ButtonPressedState.setdPadLeft(true);
|
||||
break;
|
||||
case _GAMEPAD_DPAD_RIGHT_BUTTON_INDEX:
|
||||
_ButtonPressedState.setdPadRight(true);
|
||||
break;
|
||||
case _GAMEPAD_A_BUTTON_INDEX:
|
||||
_ButtonPressedState.setgamepadA(true);
|
||||
break;
|
||||
case _GAMEPAD_B_BUTTON_INDEX:
|
||||
_ButtonPressedState.setgamepadB(true);
|
||||
break;
|
||||
default:
|
||||
// No-op
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (j) {
|
||||
case _GAMEPAD_DPAD_UP_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getdPadUp()) {
|
||||
_ButtonPressedState.setdPadUp(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_DPAD_DOWN_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getdPadDown()) {
|
||||
_ButtonPressedState.setdPadDown(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_DPAD_LEFT_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getdPadLeft()) {
|
||||
_ButtonPressedState.setdPadLeft(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_DPAD_RIGHT_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getdPadRight()) {
|
||||
_ButtonPressedState.setdPadRight(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_A_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getgamepadA()) {
|
||||
_ButtonPressedState.setgamepadA(false);
|
||||
}
|
||||
break;
|
||||
case _GAMEPAD_B_BUTTON_INDEX:
|
||||
if (_ButtonPressedState.getgamepadB()) {
|
||||
_ButtonPressedState.setgamepadB(false);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// No-op
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Schedule the next one
|
||||
requestAnimationFrame(runInputLoop);
|
||||
inputLoopTimer = requestAnimationFrame(runInputLoop);
|
||||
}
|
||||
|
||||
runInputLoop();
|
||||
function startInputLoop() {
|
||||
if (!inputLoopTimer) {
|
||||
runInputLoop();
|
||||
}
|
||||
}
|
||||
|
||||
function stopInputLoop() {
|
||||
cancelAnimationFrame(inputLoopTimer);
|
||||
inputLoopTimer = undefined;
|
||||
}
|
||||
|
||||
function isGamepadConnected() {
|
||||
var gamepads = navigator.getGamepads();
|
||||
for (var i = 0, len = gamepads.length; i < len; i++) {
|
||||
var gamepad = gamepads[i];
|
||||
if (gamepad && gamepad.connected) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function onFocusOrGamepadAttach(e) {
|
||||
if (isGamepadConnected() && document.hasFocus()) {
|
||||
console.log("Gamepad connected! Starting input loop");
|
||||
startInputLoop();
|
||||
}
|
||||
}
|
||||
|
||||
function onFocusOrGamepadDetach(e) {
|
||||
if (!isGamepadConnected() || !document.hasFocus()) {
|
||||
console.log("Gamepad disconnected! No other gamepads are connected, stopping input loop");
|
||||
stopInputLoop();
|
||||
} else {
|
||||
console.log("Gamepad disconnected! There are gamepads still connected.");
|
||||
}
|
||||
}
|
||||
|
||||
// Event listeners for any change in gamepads' state.
|
||||
window.addEventListener("gamepaddisconnected", onFocusOrGamepadDetach);
|
||||
window.addEventListener("gamepadconnected", onFocusOrGamepadAttach);
|
||||
window.addEventListener("blur", onFocusOrGamepadDetach);
|
||||
window.addEventListener("focus", onFocusOrGamepadAttach);
|
||||
|
||||
onFocusOrGamepadAttach();
|
||||
|
||||
// The gamepadInputEmulation is a string property that exists in JavaScript UWAs and in WebViews in UWAs.
|
||||
// It won't exist in Win8.1 style apps or browsers.
|
||||
|
@ -369,4 +405,4 @@ require(['apphost'], function (appHost) {
|
|||
window.navigator.gamepadInputEmulation = "gamepad";
|
||||
}
|
||||
|
||||
});
|
||||
});
|
|
@ -1,8 +1,6 @@
|
|||
define(["inputManager", "layoutManager"], function (inputManager, layoutManager) {
|
||||
"use strict";
|
||||
|
||||
console.log("keyboardnavigation");
|
||||
|
||||
/**
|
||||
* Key name mapping.
|
||||
*/
|
||||
|
@ -45,7 +43,7 @@ define(["inputManager", "layoutManager"], function (inputManager, layoutManager)
|
|||
try {
|
||||
hasFieldKey = "key" in new KeyboardEvent("keydown");
|
||||
} catch (e) {
|
||||
console.log("error checking 'key' field");
|
||||
console.error("error checking 'key' field");
|
||||
}
|
||||
|
||||
if (!hasFieldKey) {
|
||||
|
@ -142,12 +140,23 @@ define(["inputManager", "layoutManager"], function (inputManager, layoutManager)
|
|||
}
|
||||
|
||||
if (capture) {
|
||||
console.log("Disabling default event handling");
|
||||
console.debug("disabling default event handling");
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Gamepad initialisation. No script is required if no gamepads are present at init time, saving a bit of resources.
|
||||
// Whenever the gamepad is connected, we hand all the control of the gamepad to gamepadtokey.js by removing the event handler
|
||||
function attachGamepadScript(e) {
|
||||
console.log("Gamepad connected! Attaching gamepadtokey.js script");
|
||||
window.removeEventListener("gamepadconnected", attachGamepadScript);
|
||||
require(["components/input/gamepadtokey"]);
|
||||
}
|
||||
|
||||
// No need to check for gamepads manually at load time, the eventhandler will be fired for that
|
||||
window.addEventListener("gamepadconnected", attachGamepadScript);
|
||||
|
||||
return {
|
||||
enable: enable,
|
||||
getKeyName: getKeyName,
|
|
@ -166,4 +166,4 @@ define(['inputManager', 'focusManager', 'browser', 'layoutManager', 'events', 'd
|
|||
events.on(layoutManager, 'modechange', initMouse);
|
||||
|
||||
return self;
|
||||
});
|
||||
});
|
|
@ -278,4 +278,4 @@ define(['playbackManager', 'serverNotifications', 'events'], function (playbackM
|
|||
};
|
||||
|
||||
return ItemsRefresher;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -100,4 +100,4 @@ define(['require', 'browser'], function (require, browser) {
|
|||
};
|
||||
|
||||
return LazyLoader;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -186,4 +186,4 @@ define(['visibleinviewport', 'dom', 'browser'], function (visibleinviewport, dom
|
|||
};
|
||||
|
||||
return LazyLoader;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -58,7 +58,7 @@ define(["globalize", "dom", "emby-checkbox", "emby-select", "emby-input"], funct
|
|||
for (var i = 0; i < plugins.length; i++) {
|
||||
var plugin = plugins[i];
|
||||
html += '<div class="listItem localReaderOption sortableOption" data-pluginname="' + plugin.Name + '">';
|
||||
html += '<i class="listItemIcon material-icons">live_tv</i>';
|
||||
html += '<i class="listItemIcon material-icons live_tv"></i>';
|
||||
html += '<div class="listItemBody">';
|
||||
html += '<h3 class="listItemBodyText">';
|
||||
html += plugin.Name;
|
||||
|
@ -463,7 +463,7 @@ define(["globalize", "dom", "emby-checkbox", "emby-select", "emby-input"], funct
|
|||
|
||||
if (!typeOptions) {
|
||||
typeOptions = {
|
||||
Type: type
|
||||
Type: originalTypeOption.Type
|
||||
};
|
||||
options.TypeOptions.push(typeOptions);
|
||||
}
|
||||
|
|
|
@ -147,4 +147,4 @@
|
|||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${SaveSubtitlesIntoMediaFoldersHelp}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -269,7 +269,6 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan
|
|||
|
||||
if (options.image !== false) {
|
||||
var imgUrl = options.imageSource === 'channel' ? getChannelImageUrl(item, downloadWidth) : getImageUrl(item, downloadWidth);
|
||||
console.log(imgUrl);
|
||||
var imageClass = isLargeStyle ? 'listItemImage listItemImage-large' : 'listItemImage';
|
||||
|
||||
if (isLargeStyle && layoutManager.tv) {
|
||||
|
|
|
@ -81,4 +81,4 @@ define(['components/loading/loadingLegacy', 'browser', 'css!./loading'], functio
|
|||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -264,4 +264,4 @@ define(['dom', 'browser', 'events', 'emby-tabs', 'emby-button'], function (dom,
|
|||
getTabsElement: getTabsElement,
|
||||
selectedTabIndex: selectedTabIndex
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -57,7 +57,7 @@ define(['datetime', 'globalize', 'appRouter', 'itemHelper', 'indicators', 'mater
|
|||
|
||||
miscInfo.push(text);
|
||||
} catch (e) {
|
||||
console.log("Error parsing date: " + item.StartDate);
|
||||
console.error("error parsing date: " + item.StartDate);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ define(['datetime', 'globalize', 'appRouter', 'itemHelper', 'indicators', 'mater
|
|||
text = datetime.toLocaleDateString(date);
|
||||
miscInfo.push(text);
|
||||
} catch (e) {
|
||||
console.log("Error parsing date: " + item.PremiereDate);
|
||||
console.error("error parsing date: " + item.PremiereDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ define(['datetime', 'globalize', 'appRouter', 'itemHelper', 'indicators', 'mater
|
|||
miscInfo.push(text);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log("Error parsing date: " + item.StartDate);
|
||||
console.error("error parsing date: " + item.StartDate);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ define(['datetime', 'globalize', 'appRouter', 'itemHelper', 'indicators', 'mater
|
|||
}
|
||||
|
||||
} catch (e) {
|
||||
console.log("Error parsing date: " + item.EndDate);
|
||||
console.error("error parsing date: " + item.EndDate);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ define(['datetime', 'globalize', 'appRouter', 'itemHelper', 'indicators', 'mater
|
|||
text = globalize.translate('OriginalAirDateValue', datetime.toLocaleDateString(date));
|
||||
miscInfo.push(text);
|
||||
} catch (e) {
|
||||
console.log("Error parsing date: " + item.PremiereDate);
|
||||
console.error("error parsing date: " + item.PremiereDate);
|
||||
}
|
||||
} else if (item.ProductionYear) {
|
||||
miscInfo.push(item.ProductionYear);
|
||||
|
@ -267,7 +267,7 @@ define(['datetime', 'globalize', 'appRouter', 'itemHelper', 'indicators', 'mater
|
|||
text = datetime.parseISO8601Date(item.PremiereDate).getFullYear();
|
||||
miscInfo.push(text);
|
||||
} catch (e) {
|
||||
console.log("Error parsing date: " + item.PremiereDate);
|
||||
console.error("error parsing date: " + item.PremiereDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -477,7 +477,7 @@ define(['itemHelper', 'dom', 'layoutManager', 'dialogHelper', 'datetime', 'loadi
|
|||
html += '</div>';
|
||||
|
||||
if (formatString) {
|
||||
html += '<button type="button" is="paper-icon-button-light" class="btnOpenExternalId align-self-flex-end" data-fieldid="' + id + '"><i class="material-icons">open_in_browser</i></button>';
|
||||
html += '<button type="button" is="paper-icon-button-light" class="btnOpenExternalId align-self-flex-end" data-fieldid="' + id + '"><i class="material-icons open_in_browser"></i></button>';
|
||||
}
|
||||
html += '</div>';
|
||||
|
||||
|
@ -917,7 +917,7 @@ define(['itemHelper', 'dom', 'layoutManager', 'dialogHelper', 'datetime', 'loadi
|
|||
for (var i = 0; i < items.length; i++) {
|
||||
html += '<div class="listItem">';
|
||||
|
||||
html += '<i class="material-icons listItemIcon" style="background-color:#333;">live_tv</i>';
|
||||
html += '<i class="material-icons listItemIcon live_tv" style="background-color:#333;"></i>';
|
||||
|
||||
html += '<div class="listItemBody">';
|
||||
|
||||
|
|
|
@ -96,4 +96,4 @@ define(['dialogHelper', 'layoutManager', 'globalize', 'require', 'paper-icon-but
|
|||
return {
|
||||
show: show
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -63,4 +63,4 @@ define(['browser'], function (browser) {
|
|||
download(url);
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -54,7 +54,7 @@ define(['require', 'datetime', 'itemHelper', 'events', 'browser', 'imageLoader',
|
|||
|
||||
html += '<div class="nowPlayingBarRight">';
|
||||
|
||||
html += '<button is="paper-icon-button-light" class="muteButton mediaButton"><i class="material-icons volume_up"></i></button>';
|
||||
html += '<button is="paper-icon-button-light" class="muteButton mediaButton"><i class="material-icons"></i></button>';
|
||||
|
||||
html += '<div class="sliderContainer nowPlayingBarVolumeSliderContainer hide" style="width:9em;vertical-align:middle;display:inline-flex;">';
|
||||
html += '<input type="range" is="emby-slider" pin step="1" min="0" max="100" value="0" class="slider-medium-thumb nowPlayingBarVolumeSlider"/>';
|
||||
|
@ -591,8 +591,7 @@ define(['require', 'datetime', 'itemHelper', 'events', 'browser', 'imageLoader',
|
|||
}
|
||||
|
||||
function onPlaybackStart(e, state) {
|
||||
|
||||
//console.log('nowplaying event: ' + e.type);
|
||||
console.debug('nowplaying event: ' + e.type);
|
||||
|
||||
var player = this;
|
||||
|
||||
|
@ -637,7 +636,7 @@ define(['require', 'datetime', 'itemHelper', 'events', 'browser', 'imageLoader',
|
|||
|
||||
function onPlaybackStopped(e, state) {
|
||||
|
||||
//console.log('nowplaying event: ' + e.type);
|
||||
console.debug('nowplaying event: ' + e.type);
|
||||
var player = this;
|
||||
|
||||
if (player.isLocalPlayer) {
|
||||
|
@ -663,7 +662,7 @@ define(['require', 'datetime', 'itemHelper', 'events', 'browser', 'imageLoader',
|
|||
|
||||
function onStateChanged(event, state) {
|
||||
|
||||
//console.log('nowplaying event: ' + e.type);
|
||||
console.debug('nowplaying event: ' + event.type);
|
||||
var player = this;
|
||||
|
||||
if (!state.NowPlayingItem || layoutManager.tv) {
|
||||
|
|
|
@ -149,4 +149,4 @@ define(['appSettings', 'pluginManager'], function (appSettings, pluginManager) {
|
|||
};
|
||||
|
||||
return new PackageManager();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -43,4 +43,4 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
};
|
||||
|
||||
return PhotoPlayer;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -94,4 +94,4 @@ define(['connectionManager', 'globalize', 'userSettings', 'apphost'], function (
|
|||
};
|
||||
|
||||
return ExpirementalPlaybackWarnings;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -47,4 +47,4 @@ define(['connectionManager', 'globalize'], function (connectionManager, globaliz
|
|||
};
|
||||
|
||||
return PlayAccessValidation;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -57,7 +57,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
addPlaylistToPlaybackReport(playbackManagerInstance, info, player, serverId);
|
||||
}
|
||||
|
||||
//console.log(method + '-' + JSON.stringify(info));
|
||||
console.debug(method + '-' + JSON.stringify(info));
|
||||
var apiClient = connectionManager.getApiClient(serverId);
|
||||
apiClient[method](info);
|
||||
}
|
||||
|
@ -1024,7 +1024,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
currentTargetInfo = targetInfo;
|
||||
|
||||
if (targetInfo) {
|
||||
console.log('Active player: ' + JSON.stringify(targetInfo));
|
||||
console.debug('Active player: ' + JSON.stringify(targetInfo));
|
||||
}
|
||||
|
||||
if (player && player.isLocalPlayer) {
|
||||
|
@ -2828,7 +2828,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
|
||||
if (newItemInfo) {
|
||||
|
||||
console.log('playing next track');
|
||||
console.debug('playing next track');
|
||||
|
||||
var newItemPlayOptions = newItemInfo.item.playOptions || getDefaultPlayOptions();
|
||||
|
||||
|
@ -3118,7 +3118,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
// medianotsupported
|
||||
var errorType = error.type;
|
||||
|
||||
console.log('playbackmanager playback error type: ' + (errorType || ''));
|
||||
console.debug('playbackmanager playback error type: ' + (errorType || ''));
|
||||
|
||||
var streamInfo = error.streamInfo || getPlayerData(player).streamInfo;
|
||||
|
||||
|
@ -3401,7 +3401,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
|
||||
function getLiveStreamMediaInfo(player, streamInfo, mediaSource, liveStreamId, serverId) {
|
||||
|
||||
console.log('getLiveStreamMediaInfo');
|
||||
console.debug('getLiveStreamMediaInfo');
|
||||
|
||||
streamInfo.lastMediaInfoQuery = new Date().getTime();
|
||||
|
||||
|
@ -3961,7 +3961,7 @@ define(['events', 'datetime', 'appSettings', 'itemHelper', 'pluginManager', 'pla
|
|||
};
|
||||
|
||||
PlaybackManager.prototype.sendCommand = function (cmd, player) {
|
||||
console.log('MediaController received command: ' + cmd.Name);
|
||||
console.debug('MediaController received command: ' + cmd.Name);
|
||||
switch (cmd.Name) {
|
||||
case 'SetRepeatMode':
|
||||
this.setRepeatMode(cmd.Arguments.RepeatMode, player);
|
||||
|
|
|
@ -9,7 +9,7 @@ define(['playbackManager', 'layoutManager', 'events'], function (playbackManager
|
|||
|
||||
function onOrientationChangeError(err) {
|
||||
orientationLocked = false;
|
||||
console.log('error locking orientation: ' + err);
|
||||
console.error('error locking orientation: ' + err);
|
||||
}
|
||||
|
||||
events.on(playbackManager, 'playbackstart', function (e, player, state) {
|
||||
|
@ -46,10 +46,10 @@ define(['playbackManager', 'layoutManager', 'events'], function (playbackManager
|
|||
try {
|
||||
unlockOrientation();
|
||||
} catch (err) {
|
||||
console.log('error unlocking orientation: ' + err);
|
||||
console.error('error unlocking orientation: ' + err);
|
||||
}
|
||||
orientationLocked = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -21,4 +21,4 @@ define([], function () {
|
|||
return {
|
||||
getDisplayPlayMethod: getDisplayPlayMethod
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -230,4 +230,4 @@ define([], function () {
|
|||
};
|
||||
|
||||
return PlayQueueManager;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -32,16 +32,16 @@ define(['events', 'playbackManager'], function (events, playbackManager) {
|
|||
}
|
||||
|
||||
if (!oldPlayer.isLocalPlayer) {
|
||||
console.log('Skipping remote control autoplay because oldPlayer is not a local player');
|
||||
console.debug('Skipping remote control autoplay because oldPlayer is not a local player');
|
||||
return;
|
||||
}
|
||||
|
||||
if (newPlayer.isLocalPlayer) {
|
||||
console.log('Skipping remote control autoplay because newPlayer is a local player');
|
||||
console.debug('Skipping remote control autoplay because newPlayer is a local player');
|
||||
return;
|
||||
}
|
||||
|
||||
transferPlayback(oldPlayer, newPlayer);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia
|
|||
function getOsdElementHtml() {
|
||||
var html = '';
|
||||
|
||||
html += '<i class="material-icons iconOsdIcon volume_up"></i>';
|
||||
html += '<i class="material-icons iconOsdIcon"></i>';
|
||||
|
||||
html += '<div class="iconOsdProgressOuter"><div class="iconOsdProgressInner"></div></div>';
|
||||
|
||||
|
|
|
@ -342,4 +342,4 @@ define(['require', 'browser', 'appSettings', 'apphost', 'focusManager', 'quality
|
|||
};
|
||||
|
||||
return PlaybackSettings;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -86,4 +86,4 @@
|
|||
<button is="emby-button" type="submit" class="raised button-submit block btnSave hide">
|
||||
<span>${ButtonSave}</span>
|
||||
</button>
|
||||
</form>
|
||||
</form>
|
||||
|
|
|
@ -72,4 +72,4 @@ define(['actionsheet', 'datetime', 'playbackManager', 'globalize', 'appSettings'
|
|||
return {
|
||||
show: show
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -27,7 +27,7 @@ define(['events'], function (events) {
|
|||
|
||||
PluginManager.prototype.loadPlugin = function (url) {
|
||||
|
||||
console.log('Loading plugin: ' + url);
|
||||
console.debug('Loading plugin: ' + url);
|
||||
var instance = this;
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
@ -146,4 +146,4 @@ define(['events'], function (events) {
|
|||
};
|
||||
|
||||
return new PluginManager();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,6 +12,7 @@ if (HTMLElement.prototype.nativeFocus === undefined) {
|
|||
}, true);
|
||||
|
||||
var opts = Object.defineProperty({}, "preventScroll", {
|
||||
// eslint-disable-next-line getter-return
|
||||
get: function () {
|
||||
supportsPreventScrollOption = true;
|
||||
}
|
||||
|
@ -19,7 +20,7 @@ if (HTMLElement.prototype.nativeFocus === undefined) {
|
|||
|
||||
focusElem.focus(opts);
|
||||
} catch (e) {
|
||||
console.log("error checking preventScroll support");
|
||||
console.error("error checking preventScroll support");
|
||||
}
|
||||
|
||||
if (!supportsPreventScrollOption) {
|
||||
|
|
|
@ -11,6 +11,7 @@ if (typeof Object.assign != 'function') {
|
|||
var source = arguments[index];
|
||||
if (source !== undefined && source !== null) {
|
||||
for (var nextKey in source) {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (source.hasOwnProperty(nextKey)) {
|
||||
output[nextKey] = source[nextKey];
|
||||
}
|
||||
|
|
|
@ -25,4 +25,4 @@ define([], function () {
|
|||
return Promise.reject(result);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -101,4 +101,4 @@ define(['dialogHelper', 'layoutManager', 'scrollHelper', 'globalize', 'dom', 're
|
|||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -160,4 +160,4 @@ define(['globalize'], function (globalize) {
|
|||
getVideoQualityOptions: getVideoQualityOptions,
|
||||
getAudioQualityOptions: getAudioQualityOptions
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -202,4 +202,4 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
|||
return {
|
||||
show: showEditor
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -159,4 +159,4 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
|||
return {
|
||||
show: showEditor
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -214,4 +214,4 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
|
|||
cancelTimerWithConfirmation: cancelTimerWithConfirmation,
|
||||
cancelSeriesTimerWithConfirmation: cancelSeriesTimerWithConfirmation
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -267,4 +267,4 @@ define(['dialogHelper', 'globalize', 'layoutManager', 'mediaInfo', 'apphost', 'c
|
|||
show: showEditor,
|
||||
embed: embed
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageLoader", "playbackManager", "nowPlayingHelper", "events", "connectionManager", "apphost", "globalize", "cardStyle", "emby-itemscontainer", "css!./remotecontrol.css", "emby-ratingbutton"], function (browser, datetime, backdrop, libraryBrowser, listView, imageLoader, playbackManager, nowPlayingHelper, events, connectionManager, appHost, globalize) {
|
||||
define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageLoader", "playbackManager", "nowPlayingHelper", "events", "connectionManager", "apphost", "globalize", "layoutManager", "userSettings", "cardStyle", "emby-itemscontainer", "css!./remotecontrol.css", "emby-ratingbutton"], function (browser, datetime, backdrop, libraryBrowser, listView, imageLoader, playbackManager, nowPlayingHelper, events, connectionManager, appHost, globalize, layoutManager, userSettings) {
|
||||
"use strict";
|
||||
|
||||
function showAudioMenu(context, player, button, item) {
|
||||
|
@ -127,7 +127,7 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
|||
maxHeight: 300
|
||||
}) : null;
|
||||
|
||||
console.log("updateNowPlayingInfo");
|
||||
console.debug("updateNowPlayingInfo");
|
||||
setImageUrl(context, url);
|
||||
if (item) {
|
||||
backdrop.setBackdrops([item]);
|
||||
|
@ -228,6 +228,11 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
|||
buttonVisible(context.querySelector(".btnFastForward"), null != item);
|
||||
var positionSlider = context.querySelector(".nowPlayingPositionSlider");
|
||||
|
||||
if (positionSlider && item && item.RunTimeTicks) {
|
||||
positionSlider.setKeyboardSteps(userSettings.skipBackLength() * 1000000 / item.RunTimeTicks,
|
||||
userSettings.skipForwardLength() * 1000000 / item.RunTimeTicks);
|
||||
}
|
||||
|
||||
if (positionSlider && !positionSlider.dragging) {
|
||||
positionSlider.disabled = !playState.CanSeek;
|
||||
var isProgressClear = state.MediaSource && null == state.MediaSource.RunTimeTicks;
|
||||
|
@ -266,7 +271,7 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
|||
toggleRepeatButton.innerHTML = "<i class='material-icons'>repeat</i>";
|
||||
toggleRepeatButton.classList.add("repeatButton-active");
|
||||
} else if ("RepeatOne" == repeatMode) {
|
||||
toggleRepeatButton.innerHTML = "<i class='material-icons'>repeat_one</i>";
|
||||
toggleRepeatButton.innerHTML = "<i class='material-icons repeat_one'></i>";
|
||||
toggleRepeatButton.classList.add("repeatButton-active");
|
||||
} else {
|
||||
toggleRepeatButton.innerHTML = "<i class='material-icons'>repeat</i>";
|
||||
|
@ -392,7 +397,7 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
|||
}
|
||||
|
||||
function onPlaybackStart(e, state) {
|
||||
console.log("remotecontrol event: " + e.type);
|
||||
console.debug("remotecontrol event: " + e.type);
|
||||
var player = this;
|
||||
onStateChanged.call(player, e, state);
|
||||
}
|
||||
|
@ -420,7 +425,7 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
|||
}
|
||||
|
||||
function onPlaybackStopped(e, state) {
|
||||
console.log("remotecontrol event: " + e.type);
|
||||
console.debug("remotecontrol event: " + e.type);
|
||||
var player = this;
|
||||
|
||||
if (!state.NextMediaType) {
|
||||
|
@ -693,6 +698,12 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
|||
context.querySelector(".sendMessageForm").addEventListener("submit", onMessageSubmit);
|
||||
context.querySelector(".typeTextForm").addEventListener("submit", onSendStringSubmit);
|
||||
events.on(playbackManager, "playerchange", onPlayerChange);
|
||||
|
||||
if (layoutManager.tv) {
|
||||
var positionSlider = context.querySelector(".nowPlayingPositionSlider");
|
||||
positionSlider.classList.add("focusable");
|
||||
positionSlider.enableKeyboardDragging();
|
||||
}
|
||||
}
|
||||
|
||||
function onDialogClosed(e) {
|
||||
|
|
|
@ -4,6 +4,7 @@ define([], function () {
|
|||
'use strict';
|
||||
|
||||
var illegalRe = /[\/\?<>\\:\*\|":]/g;
|
||||
// eslint-disable-next-line no-control-regex
|
||||
var controlRe = /[\x00-\x1f\x80-\x9f]/g;
|
||||
var reservedRe = /^\.+$/;
|
||||
var windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i;
|
||||
|
@ -92,4 +93,4 @@ define([], function () {
|
|||
return truncate(sanitized, 255);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -53,7 +53,7 @@ define(["events", "playbackManager", "pluginManager", "inputManager", "connectio
|
|||
throw new Error("An existing screensaver is already active.");
|
||||
}
|
||||
|
||||
console.log("Showing screensaver " + screensaver.name);
|
||||
console.debug("Showing screensaver " + screensaver.name);
|
||||
|
||||
screensaver.show();
|
||||
activeScreenSaver = screensaver;
|
||||
|
@ -71,7 +71,7 @@ define(["events", "playbackManager", "pluginManager", "inputManager", "connectio
|
|||
|
||||
function hide() {
|
||||
if (activeScreenSaver) {
|
||||
console.log("Hiding screensaver");
|
||||
console.debug("Hiding screensaver");
|
||||
activeScreenSaver.hide();
|
||||
activeScreenSaver = null;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ define(["dom", "browser", "layoutManager"], function (dom, browser, layoutManage
|
|||
var elem = document.createElement("div");
|
||||
|
||||
var opts = Object.defineProperty({}, "behavior", {
|
||||
// eslint-disable-next-line getter-return
|
||||
get: function () {
|
||||
supportsScrollToOptions = true;
|
||||
}
|
||||
|
@ -40,7 +41,7 @@ define(["dom", "browser", "layoutManager"], function (dom, browser, layoutManage
|
|||
|
||||
elem.scrollTo(opts);
|
||||
} catch (e) {
|
||||
console.log("error checking ScrollToOptions support");
|
||||
console.error("error checking ScrollToOptions support");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -392,7 +392,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
|||
var currentStart = self._pos.cur;
|
||||
var currentEnd = currentStart + frameSize;
|
||||
|
||||
//console.log('offset:' + offset + ' currentStart:' + currentStart + ' currentEnd:' + currentEnd);
|
||||
console.debug('offset:' + offset + ' currentStart:' + currentStart + ' currentEnd:' + currentEnd);
|
||||
var isVisible = offset >= currentStart && (offset + size) <= currentEnd;
|
||||
|
||||
return {
|
||||
|
@ -574,8 +574,9 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
|||
* @return {Int}
|
||||
*/
|
||||
function normalizeWheelDelta(event) {
|
||||
// wheelDelta needed only for IE8-
|
||||
scrolling.curDelta = ((o.horizontal ? event.deltaY || event.deltaX : event.deltaY) || -event.wheelDelta);
|
||||
// JELLYFIN MOD: Only use deltaX for horizontal scroll and remove IE8 support
|
||||
scrolling.curDelta = o.horizontal ? event.deltaX : event.deltaY;
|
||||
// END JELLYFIN MOD
|
||||
|
||||
if (transform) {
|
||||
scrolling.curDelta /= event.deltaMode === 1 ? 3 : 100;
|
||||
|
@ -928,4 +929,4 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'ResizeObserver', 'sc
|
|||
};
|
||||
|
||||
return scrollerFactory;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -134,4 +134,4 @@ define(['focusManager', 'dom', 'scrollStyles'], function (focusManager, dom) {
|
|||
toCenter: toCenter,
|
||||
toStart: toStart
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
@ -121,4 +121,4 @@ define(['layoutManager', 'globalize', 'require', 'events', 'browser', 'alphaPick
|
|||
};
|
||||
|
||||
return SearchFields;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="hide verticalSection movieResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Movies}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<div class="hide verticalSection seriesResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Shows}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<div class="hide verticalSection episodeResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Episodes}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<div class="hide verticalSection sportsResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Sports}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<div class="hide verticalSection kidsResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Kids}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<div class="hide verticalSection newsResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${News}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +59,7 @@
|
|||
<div class="hide verticalSection programResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Programs}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -67,7 +67,7 @@
|
|||
<div class="hide verticalSection videoResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Videos}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<div class="hide verticalSection playlistResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Playlists}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<div class="hide verticalSection artistResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Artists}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -91,7 +91,7 @@
|
|||
<div class="hide verticalSection albumResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Albums}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -99,7 +99,7 @@
|
|||
<div class="hide verticalSection songResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Songs}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -107,7 +107,7 @@
|
|||
<div class="hide verticalSection photoAlbumResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${HeaderPhotoAlbums}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -115,7 +115,7 @@
|
|||
<div class="hide verticalSection photoResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Photos}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -123,7 +123,7 @@
|
|||
<div class="hide verticalSection audioBookResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${HeaderAudioBooks}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<div class="hide verticalSection bookResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${Books}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -139,7 +139,7 @@
|
|||
<div class="hide verticalSection peopleResults">
|
||||
<h2 class="sectionTitle sectionTitle-cards focuscontainer-x padded-left padded-right">${People}</h2>
|
||||
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" data-mousewheel="false" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-scroller" data-horizontal="true" data-centerfocus="card" class="padded-top-focusscale padded-bottom-focusscale">
|
||||
<div is="emby-itemscontainer" class="focuscontainer-x itemsContainer scrollSlider"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -33,7 +33,7 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus
|
|||
}
|
||||
|
||||
function processGeneralCommand(cmd, apiClient) {
|
||||
console.log('Received command: ' + cmd.Name);
|
||||
console.debug('Received command: ' + cmd.Name);
|
||||
switch (cmd.Name) {
|
||||
case 'Select':
|
||||
inputManager.trigger('select');
|
||||
|
@ -133,7 +133,7 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus
|
|||
focusManager.sendText(cmd.Arguments.String);
|
||||
break;
|
||||
default:
|
||||
console.log('processGeneralCommand does not recognize: ' + cmd.Name);
|
||||
console.debug('processGeneralCommand does not recognize: ' + cmd.Name);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -191,36 +191,14 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus
|
|||
events.trigger(serverNotifications, msg.MessageType, [apiClient, msg.Data]);
|
||||
}
|
||||
}
|
||||
|
||||
function bindEvents(apiClient) {
|
||||
events.off(apiClient, "message", onMessageReceived);
|
||||
events.on(apiClient, "message", onMessageReceived);
|
||||
}
|
||||
|
||||
function enableNativeGamepadKeyMapping() {
|
||||
if (window.navigator && "string" == typeof window.navigator.gamepadInputEmulation) {
|
||||
window.navigator.gamepadInputEmulation = "keyboard";
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function isGamepadSupported() {
|
||||
return "ongamepadconnected" in window || navigator.getGamepads || navigator.webkitGetGamepads;
|
||||
}
|
||||
|
||||
connectionManager.getApiClients().forEach(bindEvents);
|
||||
|
||||
events.on(connectionManager, 'apiclientcreated', function (e, newApiClient) {
|
||||
bindEvents(newApiClient);
|
||||
});
|
||||
|
||||
if (!enableNativeGamepadKeyMapping() && isGamepadSupported()) {
|
||||
require(["components/serverNotifications/gamepadtokey"]);
|
||||
}
|
||||
|
||||
require(["components/serverNotifications/mouseManager"]);
|
||||
|
||||
return serverNotifications;
|
||||
});
|
|
@ -155,4 +155,4 @@ define(['loading', 'events', 'dialogHelper', 'dom', 'layoutManager', 'scrollHelp
|
|||
};
|
||||
|
||||
return ServerRestartDialog;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-env serviceworker */
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
|
@ -41,4 +42,4 @@
|
|||
|
||||
event.waitUntil(executeAction(action, data, serverId));
|
||||
}, false);
|
||||
})();
|
||||
})();
|
||||
|
|
|
@ -549,4 +549,4 @@ define(['playbackManager', 'events', 'serverNotifications', 'connectionManager']
|
|||
};
|
||||
|
||||
return SessionPlayer;
|
||||
});
|
||||
});
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue