mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update video osd
This commit is contained in:
parent
93ce8f975b
commit
9511b02112
4 changed files with 36 additions and 56 deletions
|
@ -2579,7 +2579,7 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
|||
|
||||
function acquireResourceLocks(player, mediaType) {
|
||||
|
||||
if (!player.isLocalPlayer) {
|
||||
if (!player.isLocalPlayer || player.hasResourceLocks) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2608,13 +2608,15 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
|||
resourceLockManager.request(resourceType).then(function (resourceLock) {
|
||||
locks[prop] = resourceLock;
|
||||
resourceLock.acquire();
|
||||
}, function () {
|
||||
// not supported or not allowed
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function releaseResourceLocks(player) {
|
||||
|
||||
if (!player.isLocalPlayer) {
|
||||
if (!player.isLocalPlayer || player.hasResourceLocks) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -749,10 +749,6 @@
|
|||
|
||||
return "<img src='css/images/clients/roku.jpg' />";
|
||||
}
|
||||
if (clientLowered == "windows phone") {
|
||||
|
||||
return "<img src='css/images/clients/windowsphone.png' />";
|
||||
}
|
||||
if (clientLowered == "dlna") {
|
||||
|
||||
return "<img src='css/images/clients/dlna.png' />";
|
||||
|
|
|
@ -984,6 +984,7 @@ var AppInfo = {};
|
|||
define("metadataEditor", [embyWebComponentsBowerPath + "/metadataeditor/metadataeditor"], returnFirstDependency);
|
||||
define("personEditor", [embyWebComponentsBowerPath + "/metadataeditor/personeditor"], returnFirstDependency);
|
||||
define("playerSelectionMenu", [embyWebComponentsBowerPath + "/playback/playerselection"], returnFirstDependency);
|
||||
define("playerSettingsMenu", [embyWebComponentsBowerPath + "/playback/playersettingsmenu"], returnFirstDependency);
|
||||
|
||||
define("libraryMenu", ["scripts/librarymenu"], returnFirstDependency);
|
||||
|
||||
|
@ -1406,6 +1407,26 @@ var AppInfo = {};
|
|||
define("fileDownloader", [embyWebComponentsBowerPath + '/filedownloader'], returnFirstDependency);
|
||||
define("localassetmanager", [apiClientBowerPath + "/localassetmanager"], returnFirstDependency);
|
||||
}
|
||||
|
||||
define("screenLock", [embyWebComponentsBowerPath + "/resourcelocks/nullresourcelock"], returnFirstDependency);
|
||||
|
||||
if (Dashboard.isRunningInCordova() && browser.android) {
|
||||
define("resourceLockManager", [embyWebComponentsBowerPath + "/resourcelocks/resourcelockmanager"], returnFirstDependency);
|
||||
define("wakeLock", ["cordova/wakelock"], returnFirstDependency);
|
||||
define("networkLock", ["cordova/networklock"], returnFirstDependency);
|
||||
} else {
|
||||
define("resourceLockManager", [embyWebComponentsBowerPath + "/resourcelocks/resourcelockmanager"], returnFirstDependency);
|
||||
define("wakeLock", [embyWebComponentsBowerPath + "/resourcelocks/nullresourcelock"], returnFirstDependency);
|
||||
define("networkLock", [embyWebComponentsBowerPath + "/resourcelocks/nullresourcelock"], returnFirstDependency);
|
||||
}
|
||||
}
|
||||
|
||||
function getDummyResourceLockManager() {
|
||||
return {
|
||||
request: function (resourceType) {
|
||||
return Promise.reject();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
@ -2441,6 +2462,7 @@ var AppInfo = {};
|
|||
|
||||
var deps = [];
|
||||
|
||||
deps.push('apphost');
|
||||
deps.push('embyRouter');
|
||||
|
||||
if (!(AppInfo.isNativeApp && browserInfo.android)) {
|
||||
|
@ -2468,7 +2490,7 @@ var AppInfo = {};
|
|||
|
||||
console.log('onAppReady - loading dependencies');
|
||||
|
||||
require(deps, function (pageObjects) {
|
||||
require(deps, function (appHost, pageObjects) {
|
||||
|
||||
console.log('Loaded dependencies in onAppReady');
|
||||
|
||||
|
@ -2530,9 +2552,9 @@ var AppInfo = {};
|
|||
|
||||
postInitDependencies.push('playerSelectionMenu');
|
||||
|
||||
//if (appHost.supports('fullscreenchange')) {
|
||||
if (appHost.supports('fullscreenchange')) {
|
||||
require(['fullscreen-doubleclick']);
|
||||
//}
|
||||
}
|
||||
|
||||
require(postInitDependencies);
|
||||
upgradeLayouts();
|
||||
|
@ -2687,4 +2709,3 @@ pageClassOn('viewshow', "page", function () {
|
|||
|
||||
Dashboard.ensureHeader(page);
|
||||
});
|
||||
|
||||
|
|
|
@ -763,52 +763,13 @@
|
|||
function onSettingsButtonClick(e) {
|
||||
|
||||
var btn = this;
|
||||
require(['qualityoptions', 'actionsheet'], function (qualityoptions, actionsheet) {
|
||||
|
||||
//var currentSrc = self.getCurrentSrc(self.currentMediaRenderer).toLowerCase();
|
||||
//var isStatic = currentSrc.indexOf('static=true') != -1;
|
||||
|
||||
var videoStream = playbackManager.currentMediaSource(currentPlayer).MediaStreams.filter(function (stream) {
|
||||
return stream.Type === "Video";
|
||||
})[0];
|
||||
var videoWidth = videoStream ? videoStream.Width : null;
|
||||
|
||||
var options = qualityoptions.getVideoQualityOptions(playbackManager.getMaxStreamingBitrate(currentPlayer), videoWidth);
|
||||
|
||||
//if (isStatic) {
|
||||
// options[0].name = "Direct";
|
||||
//}
|
||||
|
||||
var menuItems = options.map(function (o) {
|
||||
|
||||
var opt = {
|
||||
name: o.name,
|
||||
id: o.bitrate
|
||||
};
|
||||
|
||||
if (o.selected) {
|
||||
opt.selected = true;
|
||||
}
|
||||
|
||||
return opt;
|
||||
require(['playerSettingsMenu'], function (playerSettingsMenu) {
|
||||
playerSettingsMenu.show({
|
||||
mediaType: 'Video',
|
||||
player: currentPlayer,
|
||||
positionTo: btn
|
||||
});
|
||||
|
||||
var selectedId = options.filter(function (o) {
|
||||
return o.selected;
|
||||
});
|
||||
selectedId = selectedId.length ? selectedId[0].bitrate : null;
|
||||
actionsheet.show({
|
||||
items: menuItems,
|
||||
positionTo: btn,
|
||||
callback: function (id) {
|
||||
|
||||
var bitrate = parseInt(id);
|
||||
if (bitrate !== selectedId) {
|
||||
playbackManager.setMaxStreamingBitrate(bitrate, currentPlayer);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue