mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update now playing screen
This commit is contained in:
parent
668418e69b
commit
4589e01159
22 changed files with 245 additions and 97 deletions
|
@ -2117,6 +2117,23 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
|||
});
|
||||
}
|
||||
|
||||
function isHostReachable(mediaSource, apiClient) {
|
||||
|
||||
var url = mediaSource.Path;
|
||||
|
||||
var isServerAddress = url.toLowerCase().replace('https:', 'http').indexOf(apiClient.serverAddress().toLowerCase().replace('https:', 'http').substring(0, 14)) === 0;
|
||||
|
||||
if (isServerAddress) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
if (mediaSource.IsRemote) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return Promise.reject();
|
||||
}
|
||||
|
||||
function supportsDirectPlay(apiClient, mediaSource) {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
@ -2130,12 +2147,15 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
|||
resolve(true);
|
||||
}
|
||||
else {
|
||||
var val = mediaSource.Path.toLowerCase().replace('https:', 'http').indexOf(apiClient.serverAddress().toLowerCase().replace('https:', 'http').substring(0, 14)) === 0;
|
||||
resolve(val);
|
||||
isHostReachable(mediaSource, apiClient).then(function () {
|
||||
resolve(true);
|
||||
}, function () {
|
||||
resolve(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (mediaSource.Protocol === 'File') {
|
||||
else if (mediaSource.Protocol === 'File') {
|
||||
|
||||
// Determine if the file can be accessed directly
|
||||
require(['filesystem'], function (filesystem) {
|
||||
|
@ -2241,7 +2261,7 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
|||
}
|
||||
|
||||
function findPlaylistIndex(playlistItemId, list) {
|
||||
|
||||
|
||||
for (var i = 0, length = playlist.length; i < length; i++) {
|
||||
if (list[i].PlaylistItemId === playlistItemId) {
|
||||
return i;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['appSettings', 'events', 'browser', 'loading', 'playbackManager', 'embyRouter', 'globalize'], function (appSettings, events, browser, loading, playbackManager, embyRouter, globalize) {
|
||||
define(['appSettings', 'events', 'browser', 'loading', 'playbackManager', 'embyRouter', 'globalize', 'apphost'], function (appSettings, events, browser, loading, playbackManager, embyRouter, globalize, appHost) {
|
||||
'use strict';
|
||||
|
||||
var currentDisplayInfo;
|
||||
|
@ -79,7 +79,7 @@
|
|||
|
||||
// Unfortunately we can't allow the url to change or chromecast will throw a security error
|
||||
// Might be able to solve this in the future by moving the dialogs to hashbangs
|
||||
if (!((!browser.chrome) || AppInfo.isNativeApp)) {
|
||||
if (!(!browser.chrome || appHost.supports('castmenuhashchange'))) {
|
||||
menuOptions.enableHistory = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue