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

use unified theme media player

This commit is contained in:
Luke Pulverenti 2016-08-21 02:59:36 -04:00
parent 50f9d7d4fe
commit d8c4154947
12 changed files with 93 additions and 144 deletions

View file

@ -179,7 +179,7 @@ var Dashboard = {
}
if (url.indexOf('/') != 0) {
if (url.indexOf('http') != 0 && url.indexOf('file:') != 0) {
if (url.indexOf('://') == -1) {
url = '/' + url;
}
}
@ -1528,10 +1528,21 @@ var AppInfo = {};
// mock this for now. not used in this app
define("playbackManager", [], function () {
return {
isPlaying: function () {
return MediaPlayer.currentItem != null;
},
isPlayingVideo: function () {
return false;
return MediaPlayer.currentItem != null;
},
play: function (options) {
if (options.fullscreen === false) {
// theme backdrops - not supported
if (!options.items || options.items[0].MediaType == 'Video') {
return;
}
}
MediaController.play(options);
},
currentPlaylistIndex: function (options) {
@ -1554,6 +1565,9 @@ var AppInfo = {};
},
pause: function () {
return MediaController.pause();
},
stop: function () {
return MediaController.stop();
}
};
});
@ -1645,7 +1659,7 @@ var AppInfo = {};
apiClient.getItem(apiClient.getCurrentUserId(), item).then(showItem);
});
} else {
Dashboard.navigate(LibraryBrowser.getHref(item));
Emby.Page.show('/' + LibraryBrowser.getHref(item), { item: item });
}
}
@ -2726,7 +2740,7 @@ var AppInfo = {};
var postInitDependencies = [];
postInitDependencies.push('scripts/thememediaplayer');
postInitDependencies.push('bower_components/emby-webcomponents/thememediaplayer');
postInitDependencies.push('scripts/remotecontrol');
postInitDependencies.push('css!css/chromecast.css');
postInitDependencies.push('scripts/autobackdrops');