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

update components

This commit is contained in:
Luke Pulverenti 2017-01-11 23:27:01 -05:00
parent 28bb4ffd62
commit 6fb6168107
12 changed files with 113 additions and 241 deletions

View file

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.462",
"_release": "1.4.462",
"version": "1.4.465",
"_release": "1.4.465",
"_resolution": {
"type": "version",
"tag": "1.4.462",
"commit": "1beaad6a5a112a404e518ad16acfbdc6ca0c57cb"
"tag": "1.4.465",
"commit": "13b0fddbfbc24ac9dff0db7007be0cde3a94aed2"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View file

@ -47,7 +47,8 @@ define(['appStorage', 'events'], function (appStorage, events) {
self.set('maxStaticMusicBitrate', val);
}
return parseInt(self.get('maxStaticMusicBitrate') || '0') || null;
var defaultValue = 384000;
return parseInt(self.get('maxStaticMusicBitrate') || defaultValue.toString()) || defaultValue;
};
self.maxChromecastBitrate = function (val) {

View file

@ -684,7 +684,7 @@
};
self.stop = function () {
castPlayer.sendMessage({
return castPlayer.sendMessage({
options: {},
command: 'Stop'
});
@ -726,7 +726,7 @@
return state.PositionTicks;
};
self.duration = function() {
self.duration = function () {
var state = self.lastPlayerData || {};
state = state.NowPlayingItem || {};
return state.RunTimeTicks;
@ -941,10 +941,11 @@
self.endSession = function () {
self.stop();
setTimeout(function () {
castPlayer.stopApp();
}, 1000);
self.stop().then(function () {
setTimeout(function () {
castPlayer.stopApp();
}, 1000);
});
};
self.volumeUp = function () {
@ -975,7 +976,7 @@
};
function normalizePrimaryImage(state) {
if (state && state.NowPlayingItem) {
if (!state.NowPlayingItem.ImageTags || !state.NowPlayingItem.ImageTags.Primary) {
if (state.NowPlayingItem.PrimaryImageTag) {

View file

@ -514,7 +514,7 @@
html += '<div class="guideProgramNameText">' + program.Name + '</div>';
var indicatorHtml;
var indicatorHtml = null;
if (program.IsLive && options.showLiveIndicator) {
indicatorHtml = '<span class="liveTvProgram guideProgramIndicator">' + globalize.translate('sharedcomponents#Live') + '</span>';
}

View file

@ -180,8 +180,17 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
var list = [];
var video = document.createElement('video');
if (video.webkitSupportsPresentationMode && video.webkitSupportsPresentationMode('picture-in-picture') && typeof video.webkitSetPresentationMode === "function") {
list.push('pictureinpicture');
//if (video.webkitSupportsPresentationMode && video.webkitSupportsPresentationMode('picture-in-picture') && typeof video.webkitSetPresentationMode === "function") {
// list.push('pictureinpicture');
//}
if (browser.ipad) {
// Unfortunately this creates a false positive on devices where its' not actually supported
if (navigator.userAgent.toLowerCase().indexOf('os 9') === -1) {
if (video.webkitSupportsPresentationMode && video.webkitSupportsPresentationMode && typeof video.webkitSetPresentationMode === "function") {
list.push('pictureinpicture');
}
}
}
return list;

View file

@ -0,0 +1,57 @@
define(['playbackManager'], function (playbackManager) {
"use strict";
return function () {
var self = this;
self.name = 'Playback validation';
self.type = 'preplayintercept';
self.id = 'playbackvalidation';
self.order = -1;
self.intercept = function (options) {
// Don't care about video backdrops or any kind of non-fullscreen playback
if (!options.fullscreen && options.mediaType === 'Video') {
return Promise.resolve();
}
return validatePlayback(options);
};
function validatePlayback(options) {
return new Promise(function (resolve, reject) {
require(["registrationServices"], function (registrationServices) {
registrationServices.validateFeature('playback', options).then(resolve, function () {
startAutoStopTimer();
resolve();
});
});
});
}
var autoStopTimeout;
var lockedTimeLimitMs = 63000;
function startAutoStopTimer() {
stopAutoStopTimer();
autoStopTimeout = setTimeout(onAutoStopTimeout, lockedTimeLimitMs);
}
function onAutoStopTimeout() {
stopAutoStopTimer();
playbackManager.stop();
}
function stopAutoStopTimer() {
var timeout = autoStopTimeout;
if (timeout) {
clearTimeout(timeout);
autoStopTimeout = null;
}
}
};
});