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-01 18:20:21 -05:00
parent 80b537e30b
commit fd27601fd0
2 changed files with 17 additions and 4 deletions

View file

@ -2430,6 +2430,15 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
events.off(player, 'stopped', onPlaybackStopped);
}
function initLegacyVolumeMethods(player) {
player.getVolume = function() {
return player.volume();
};
player.setVolume = function (val) {
return player.volume(val);
};
}
function initMediaPlayer(player) {
players.push(player);
@ -2444,6 +2453,10 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
player.currentState = {};
if (!player.getVolume || !player.setVolume) {
initLegacyVolumeMethods(player);
}
if (enableLocalPlaylistManagement(player)) {
events.on(player, 'error', onPlaybackError);
}