From 77d4e55bc9ac8075c27552aac1812db0affa648e Mon Sep 17 00:00:00 2001
From: Luke Pulverenti
Date: Sun, 27 Aug 2017 20:38:06 -0400
Subject: [PATCH 01/28] update remote control
---
dashboard-ui/bower_components/emby-webcomponents/input/api.js | 2 +-
.../bower_components/emby-webcomponents/sessionplayer.js | 2 +-
dashboard-ui/css/librarybrowser.css | 2 +-
dashboard-ui/scripts/dashboardpage.js | 4 ++--
dashboard-ui/strings/en-us.json | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dashboard-ui/bower_components/emby-webcomponents/input/api.js b/dashboard-ui/bower_components/emby-webcomponents/input/api.js
index ba897ddb60..20cbfcb590 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/input/api.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/input/api.js
@@ -1 +1 @@
-define(["connectionManager","playbackManager","events","inputManager","focusManager","appRouter"],function(connectionManager,playbackManager,events,inputManager,focusManager,appRouter){"use strict";function notifyApp(){inputManager.notify()}function displayMessage(cmd){var args=cmd.Arguments;args.TimeoutMs?require(["toast"],function(toast){toast({title:args.Header,text:args.Text})}):require(["alert"],function(alert){alert({title:args.Header,text:args.Text})})}function displayContent(cmd,apiClient){appRouter.showItem(cmd.Arguments.ItemId,apiClient.serverId())}function processGeneralCommand(cmd,apiClient){switch(cmd.Name){case"Select":return void inputManager.trigger("select");case"Back":return void inputManager.trigger("back");case"MoveUp":return void inputManager.trigger("up");case"MoveDown":return void inputManager.trigger("down");case"MoveLeft":return void inputManager.trigger("left");case"MoveRight":return void inputManager.trigger("right");case"PageUp":return void inputManager.trigger("pageup");case"PageDown":return void inputManager.trigger("pagedown");case"SetRepeatMode":playbackManager.setRepeatMode(cmd.Arguments.RepeatMode);break;case"VolumeUp":return void inputManager.trigger("volumeup");case"VolumeDown":return void inputManager.trigger("volumedown");case"ChannelUp":return void inputManager.trigger("channelup");case"ChannelDown":return void inputManager.trigger("channeldown");case"Mute":return void inputManager.trigger("mute");case"Unmute":return void inputManager.trigger("unmute");case"ToggleMute":return void inputManager.trigger("togglemute");case"SetVolume":notifyApp(),playbackManager.setVolume(cmd.Arguments.Volume);break;case"SetAudioStreamIndex":notifyApp(),playbackManager.setAudioStreamIndex(parseInt(cmd.Arguments.Index));break;case"SetSubtitleStreamIndex":notifyApp(),playbackManager.setSubtitleStreamIndex(parseInt(cmd.Arguments.Index));break;case"ToggleFullscreen":return void inputManager.trigger("togglefullscreen");case"GoHome":return void inputManager.trigger("home");case"GoToSettings":return void inputManager.trigger("settings");case"DisplayContent":displayContent(cmd,apiClient);break;case"GoToSearch":return void inputManager.trigger("search");case"DisplayMessage":displayMessage(cmd);break;case"ToggleOsd":break;case"ToggleContextMenu":break;case"TakeScreenShot":break;case"SendKey":break;case"SendString":focusManager.sendText(cmd.Arguments.String);break;default:console.log("processGeneralCommand does not recognize: "+cmd.Name)}notifyApp()}function onWebSocketMessageReceived(e,msg){var apiClient=this;if("Play"===msg.MessageType){notifyApp();var serverId=apiClient.serverInfo().Id;"PlayNext"===msg.Data.PlayCommand?playbackManager.queueNext({ids:msg.Data.ItemIds,serverId:serverId}):"PlayLast"===msg.Data.PlayCommand?playbackManager.queue({ids:msg.Data.ItemIds,serverId:serverId}):playbackManager.play({ids:msg.Data.ItemIds,startPositionTicks:msg.Data.StartPositionTicks,serverId:serverId})}else if("Playstate"===msg.MessageType)"Stop"===msg.Data.Command?inputManager.trigger("stop"):"Pause"===msg.Data.Command?inputManager.trigger("pause"):"Unpause"===msg.Data.Command?inputManager.trigger("play"):"Seek"===msg.Data.Command?playbackManager.seek(msg.Data.SeekPositionTicks):"NextTrack"===msg.Data.Command?inputManager.trigger("next"):"PreviousTrack"===msg.Data.Command?inputManager.trigger("previous"):notifyApp();else if("GeneralCommand"===msg.MessageType){var cmd=msg.Data;processGeneralCommand(cmd,apiClient)}}function bindEvents(apiClient){events.off(apiClient,"websocketmessage",onWebSocketMessageReceived),events.on(apiClient,"websocketmessage",onWebSocketMessageReceived)}connectionManager.getApiClients().forEach(bindEvents),events.on(connectionManager,"apiclientcreated",function(e,newApiClient){bindEvents(newApiClient)})});
\ No newline at end of file
+define(["connectionManager","playbackManager","events","inputManager","focusManager","appRouter"],function(connectionManager,playbackManager,events,inputManager,focusManager,appRouter){"use strict";function notifyApp(){inputManager.notify()}function displayMessage(cmd){var args=cmd.Arguments;args.TimeoutMs?require(["toast"],function(toast){toast({title:args.Header,text:args.Text})}):require(["alert"],function(alert){alert({title:args.Header,text:args.Text})})}function displayContent(cmd,apiClient){appRouter.showItem(cmd.Arguments.ItemId,apiClient.serverId())}function processGeneralCommand(cmd,apiClient){switch(cmd.Name){case"Select":return void inputManager.trigger("select");case"Back":return void inputManager.trigger("back");case"MoveUp":return void inputManager.trigger("up");case"MoveDown":return void inputManager.trigger("down");case"MoveLeft":return void inputManager.trigger("left");case"MoveRight":return void inputManager.trigger("right");case"PageUp":return void inputManager.trigger("pageup");case"PageDown":return void inputManager.trigger("pagedown");case"SetRepeatMode":playbackManager.setRepeatMode(cmd.Arguments.RepeatMode);break;case"VolumeUp":return void inputManager.trigger("volumeup");case"VolumeDown":return void inputManager.trigger("volumedown");case"ChannelUp":return void inputManager.trigger("channelup");case"ChannelDown":return void inputManager.trigger("channeldown");case"Mute":return void inputManager.trigger("mute");case"Unmute":return void inputManager.trigger("unmute");case"ToggleMute":return void inputManager.trigger("togglemute");case"SetVolume":notifyApp(),playbackManager.setVolume(cmd.Arguments.Volume);break;case"SetAudioStreamIndex":notifyApp(),playbackManager.setAudioStreamIndex(parseInt(cmd.Arguments.Index));break;case"SetSubtitleStreamIndex":notifyApp(),playbackManager.setSubtitleStreamIndex(parseInt(cmd.Arguments.Index));break;case"ToggleFullscreen":return void inputManager.trigger("togglefullscreen");case"GoHome":return void inputManager.trigger("home");case"GoToSettings":return void inputManager.trigger("settings");case"DisplayContent":displayContent(cmd,apiClient);break;case"GoToSearch":return void inputManager.trigger("search");case"DisplayMessage":displayMessage(cmd);break;case"ToggleOsd":break;case"ToggleContextMenu":break;case"TakeScreenShot":break;case"SendKey":break;case"SendString":focusManager.sendText(cmd.Arguments.String);break;default:console.log("processGeneralCommand does not recognize: "+cmd.Name)}notifyApp()}function onWebSocketMessageReceived(e,msg){var apiClient=this;if("Play"===msg.MessageType){notifyApp();var serverId=apiClient.serverInfo().Id;"PlayNext"===msg.Data.PlayCommand?playbackManager.queueNext({ids:msg.Data.ItemIds,serverId:serverId}):"PlayLast"===msg.Data.PlayCommand?playbackManager.queue({ids:msg.Data.ItemIds,serverId:serverId}):playbackManager.play({ids:msg.Data.ItemIds,startPositionTicks:msg.Data.StartPositionTicks,serverId:serverId})}else if("Playstate"===msg.MessageType)"Stop"===msg.Data.Command?inputManager.trigger("stop"):"Pause"===msg.Data.Command?inputManager.trigger("pause"):"Unpause"===msg.Data.Command?inputManager.trigger("play"):"PlayPause"===msg.Data.Command?inputManager.trigger("playpause"):"Seek"===msg.Data.Command?playbackManager.seek(msg.Data.SeekPositionTicks):"NextTrack"===msg.Data.Command?inputManager.trigger("next"):"PreviousTrack"===msg.Data.Command?inputManager.trigger("previous"):notifyApp();else if("GeneralCommand"===msg.MessageType){var cmd=msg.Data;processGeneralCommand(cmd,apiClient)}}function bindEvents(apiClient){events.off(apiClient,"websocketmessage",onWebSocketMessageReceived),events.on(apiClient,"websocketmessage",onWebSocketMessageReceived)}connectionManager.getApiClients().forEach(bindEvents),events.on(connectionManager,"apiclientcreated",function(e,newApiClient){bindEvents(newApiClient)})});
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js b/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js
index 85c8af520b..670cecc650 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js
@@ -1 +1 @@
-define(["playbackManager","events","serverNotifications","connectionManager"],function(playbackManager,events,serverNotifications,connectionManager){"use strict";function getActivePlayerId(){var info=playbackManager.getPlayerInfo();return info?info.id:null}function sendPlayCommand(apiClient,options,playType){var sessionId=getActivePlayerId(),ids=options.ids||options.items.map(function(i){return i.Id}),remoteOptions={ItemIds:ids.join(","),PlayCommand:playType};return options.startPositionTicks&&(remoteOptions.startPositionTicks=options.startPositionTicks),apiClient.sendPlayCommand(sessionId,remoteOptions)}function sendPlayStateCommand(apiClient,command,options){var sessionId=getActivePlayerId();apiClient.sendPlayStateCommand(sessionId,command,options)}function getCurrentApiClient(instance){var currentServerId=instance.currentServerId;return currentServerId?connectionManager.getApiClient(currentServerId):connectionManager.currentApiClient()}function sendCommandByName(instance,name,options){var command={Name:name};options&&(command.Arguments=options),instance.sendCommand(command)}function unsubscribeFromPlayerUpdates(instance){instance.isUpdating=!0;var apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()&&apiClient.sendWebSocketMessage("SessionsStop"),instance.pollInterval&&(clearInterval(instance.pollInterval),instance.pollInterval=null)}function processUpdatedSessions(instance,sessions,apiClient){var serverId=apiClient.serverId();sessions.map(function(s){s.NowPlayingItem&&(s.NowPlayingItem.ServerId=serverId)});var currentTargetId=getActivePlayerId(),session=sessions.filter(function(s){return s.Id===currentTargetId})[0],state=getPlayerState(session);normalizeImages(state,apiClient),instance.lastPlayerData=state,session&&(firePlaybackEvent(instance,"statechange",session,apiClient),firePlaybackEvent(instance,"timeupdate",session,apiClient),firePlaybackEvent(instance,"pause",session,apiClient))}function onPollIntervalFired(){var instance=this,apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()||apiClient&&apiClient.getSessions().then(function(sessions){processUpdatedSessions(instance,sessions,apiClient)})}function subscribeToPlayerUpdates(instance){instance.isUpdating=!0;var apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()&&apiClient.sendWebSocketMessage("SessionsStart","100,800"),instance.pollInterval&&(clearInterval(instance.pollInterval),instance.pollInterval=null),instance.pollInterval=setInterval(onPollIntervalFired.bind(instance),5e3)}function getPlayerState(session){return session}function normalizeImages(state,apiClient){if(state&&state.NowPlayingItem){var item=state.NowPlayingItem;item.ImageTags&&item.ImageTags.Primary||item.PrimaryImageTag&&(item.ImageTags=item.ImageTags||{},item.ImageTags.Primary=item.PrimaryImageTag),item.BackdropImageTag&&item.BackdropItemId===item.Id&&(item.BackdropImageTags=[item.BackdropImageTag]),item.BackdropImageTag&&item.BackdropItemId!==item.Id&&(item.ParentBackdropImageTags=[item.BackdropImageTag],item.ParentBackdropItemId=item.BackdropItemId),item.ServerId||(item.ServerId=apiClient.serverId())}}function firePlaybackEvent(instance,name,session,apiClient){var state=getPlayerState(session);normalizeImages(state,apiClient),instance.lastPlayerData=state,events.trigger(instance,name,[state])}function SessionPlayer(){var self=this;this.name="Remote Control",this.type="mediaplayer",this.isLocalPlayer=!1,this.id="remoteplayer",events.on(serverNotifications,"Sessions",function(e,apiClient,data){processUpdatedSessions(self,data,apiClient)}),events.on(serverNotifications,"SessionEnded",function(e,apiClient,data){console.log("Server reports another session ended"),getActivePlayerId()===data.Id&&playbackManager.setDefaultPlayerActive()}),events.on(serverNotifications,"PlaybackStart",function(e,apiClient,data){data.DeviceId!==apiClient.deviceId()&&getActivePlayerId()===data.Id&&firePlaybackEvent(self,"playbackstart",data,apiClient)}),events.on(serverNotifications,"PlaybackStopped",function(e,apiClient,data){data.DeviceId!==apiClient.deviceId()&&getActivePlayerId()===data.Id&&firePlaybackEvent(self,"playbackstop",data,apiClient)})}return SessionPlayer.prototype.beginPlayerUpdates=function(){this.playerListenerCount=this.playerListenerCount||0,this.playerListenerCount<=0&&(this.playerListenerCount=0,subscribeToPlayerUpdates(this)),this.playerListenerCount++},SessionPlayer.prototype.endPlayerUpdates=function(){this.playerListenerCount=this.playerListenerCount||0,this.playerListenerCount--,this.playerListenerCount<=0&&(unsubscribeFromPlayerUpdates(this),this.playerListenerCount=0)},SessionPlayer.prototype.getPlayerState=function(){return Promise.resolve(this.lastPlayerData||{})},SessionPlayer.prototype.getTargets=function(){var apiClient=getCurrentApiClient(this),sessionQuery={ControllableByUserId:apiClient.getCurrentUserId()};if(apiClient){var name=this.name;return apiClient.getSessions(sessionQuery).then(function(sessions){return sessions.filter(function(s){return s.DeviceId!==apiClient.deviceId()}).map(function(s){return{name:s.DeviceName,deviceName:s.DeviceName,id:s.Id,playerName:name,appName:s.Client,playableMediaTypes:s.PlayableMediaTypes,isLocalPlayer:!1,supportedCommands:s.SupportedCommands}})})}return Promise.resolve([])},SessionPlayer.prototype.sendCommand=function(command){var sessionId=getActivePlayerId(),apiClient=getCurrentApiClient(this);apiClient.sendCommand(sessionId,command)},SessionPlayer.prototype.play=function(options){var playOptions={};return playOptions.ids=options.ids||options.items.map(function(i){return i.Id}),options.startPositionTicks&&(playOptions.startPositionTicks=options.startPositionTicks),sendPlayCommand(getCurrentApiClient(this),playOptions,"PlayNow")},SessionPlayer.prototype.shuffle=function(item){sendPlayCommand(getCurrentApiClient(this),{ids:[item.Id]},"PlayShuffle")},SessionPlayer.prototype.instantMix=function(item){sendPlayCommand(getCurrentApiClient(this),{ids:[item.Id]},"PlayInstantMix")},SessionPlayer.prototype.queue=function(options){sendPlayCommand(getCurrentApiClient(this),options,"PlayNext")},SessionPlayer.prototype.queueNext=function(options){sendPlayCommand(getCurrentApiClient(this),options,"PlayLast")},SessionPlayer.prototype.canPlayMediaType=function(mediaType){return mediaType=(mediaType||"").toLowerCase(),"audio"===mediaType||"video"===mediaType},SessionPlayer.prototype.canQueueMediaType=function(mediaType){return this.canPlayMediaType(mediaType)},SessionPlayer.prototype.stop=function(){sendPlayStateCommand(getCurrentApiClient(this),"stop")},SessionPlayer.prototype.nextTrack=function(){sendPlayStateCommand(getCurrentApiClient(this),"nextTrack")},SessionPlayer.prototype.previousTrack=function(){sendPlayStateCommand(getCurrentApiClient(this),"previousTrack")},SessionPlayer.prototype.seek=function(positionTicks){sendPlayStateCommand(getCurrentApiClient(this),"seek",{SeekPositionTicks:positionTicks})},SessionPlayer.prototype.currentTime=function(val){if(null!=val)return this.seek(val);var state=this.lastPlayerData||{};return state=state.PlayState||{},state.PositionTicks},SessionPlayer.prototype.duration=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},state.RunTimeTicks},SessionPlayer.prototype.paused=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.IsPaused},SessionPlayer.prototype.getVolume=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.VolumeLevel},SessionPlayer.prototype.pause=function(){sendPlayStateCommand(getCurrentApiClient(this),"Pause")},SessionPlayer.prototype.unpause=function(){sendPlayStateCommand(getCurrentApiClient(this),"Unpause")},SessionPlayer.prototype.playPause=function(){this.paused()?this.unpause():this.pause()},SessionPlayer.prototype.setMute=function(isMuted){isMuted?sendCommandByName(this,"Mute"):sendCommandByName(this,"Unmute")},SessionPlayer.prototype.toggleMute=function(){sendCommandByName(this,"ToggleMute")},SessionPlayer.prototype.setVolume=function(vol){sendCommandByName(this,"SetVolume",{Volume:vol})},SessionPlayer.prototype.volumeUp=function(){sendCommandByName(this,"VolumeUp")},SessionPlayer.prototype.volumeDown=function(){sendCommandByName(this,"VolumeDown")},SessionPlayer.prototype.toggleFullscreen=function(){sendCommandByName(this,"ToggleFullscreen")},SessionPlayer.prototype.audioTracks=function(){var state=this.lastPlayerData||{};state=state.NowPlayingItem||{};var streams=state.MediaStreams||[];return streams.filter(function(s){return"Audio"===s.Type})},SessionPlayer.prototype.getAudioStreamIndex=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.AudioStreamIndex},SessionPlayer.prototype.setAudioStreamIndex=function(index){sendCommandByName(this,"SetAudioStreamIndex",{Index:index})},SessionPlayer.prototype.subtitleTracks=function(){var state=this.lastPlayerData||{};state=state.NowPlayingItem||{};var streams=state.MediaStreams||[];return streams.filter(function(s){return"Subtitle"===s.Type})},SessionPlayer.prototype.getSubtitleStreamIndex=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.SubtitleStreamIndex},SessionPlayer.prototype.setSubtitleStreamIndex=function(index){sendCommandByName(this,"SetSubtitleStreamIndex",{Index:index})},SessionPlayer.prototype.getMaxStreamingBitrate=function(){},SessionPlayer.prototype.setMaxStreamingBitrate=function(options){},SessionPlayer.prototype.isFullscreen=function(){},SessionPlayer.prototype.toggleFullscreen=function(){},SessionPlayer.prototype.getRepeatMode=function(){},SessionPlayer.prototype.setRepeatMode=function(mode){sendCommandByName(this,"SetRepeatMode",{RepeatMode:mode})},SessionPlayer.prototype.displayContent=function(options){sendCommandByName(this,"DisplayContent",options)},SessionPlayer.prototype.isPlaying=function(){var state=this.lastPlayerData||{};return null!=state.NowPlayingItem},SessionPlayer.prototype.isPlayingVideo=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},"Video"===state.MediaType},SessionPlayer.prototype.isPlayingAudio=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},"Audio"===state.MediaType},SessionPlayer.prototype.getPlaylist=function(){return Promise.resolve([])},SessionPlayer.prototype.getCurrentPlaylistItemId=function(){},SessionPlayer.prototype.setCurrentPlaylistItem=function(playlistItemId){return Promise.resolve()},SessionPlayer.prototype.removeFromPlaylist=function(playlistItemIds){return Promise.resolve()},SessionPlayer.prototype.tryPair=function(target){return Promise.resolve()},SessionPlayer});
\ No newline at end of file
+define(["playbackManager","events","serverNotifications","connectionManager"],function(playbackManager,events,serverNotifications,connectionManager){"use strict";function getActivePlayerId(){var info=playbackManager.getPlayerInfo();return info?info.id:null}function sendPlayCommand(apiClient,options,playType){var sessionId=getActivePlayerId(),ids=options.ids||options.items.map(function(i){return i.Id}),remoteOptions={ItemIds:ids.join(","),PlayCommand:playType};return options.startPositionTicks&&(remoteOptions.startPositionTicks=options.startPositionTicks),apiClient.sendPlayCommand(sessionId,remoteOptions)}function sendPlayStateCommand(apiClient,command,options){var sessionId=getActivePlayerId();apiClient.sendPlayStateCommand(sessionId,command,options)}function getCurrentApiClient(instance){var currentServerId=instance.currentServerId;return currentServerId?connectionManager.getApiClient(currentServerId):connectionManager.currentApiClient()}function sendCommandByName(instance,name,options){var command={Name:name};options&&(command.Arguments=options),instance.sendCommand(command)}function unsubscribeFromPlayerUpdates(instance){instance.isUpdating=!0;var apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()&&apiClient.sendWebSocketMessage("SessionsStop"),instance.pollInterval&&(clearInterval(instance.pollInterval),instance.pollInterval=null)}function processUpdatedSessions(instance,sessions,apiClient){var serverId=apiClient.serverId();sessions.map(function(s){s.NowPlayingItem&&(s.NowPlayingItem.ServerId=serverId)});var currentTargetId=getActivePlayerId(),session=sessions.filter(function(s){return s.Id===currentTargetId})[0],state=getPlayerState(session);normalizeImages(state,apiClient),instance.lastPlayerData=state,session&&(firePlaybackEvent(instance,"statechange",session,apiClient),firePlaybackEvent(instance,"timeupdate",session,apiClient),firePlaybackEvent(instance,"pause",session,apiClient))}function onPollIntervalFired(){var instance=this,apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()||apiClient&&apiClient.getSessions().then(function(sessions){processUpdatedSessions(instance,sessions,apiClient)})}function subscribeToPlayerUpdates(instance){instance.isUpdating=!0;var apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()&&apiClient.sendWebSocketMessage("SessionsStart","100,800"),instance.pollInterval&&(clearInterval(instance.pollInterval),instance.pollInterval=null),instance.pollInterval=setInterval(onPollIntervalFired.bind(instance),5e3)}function getPlayerState(session){return session}function normalizeImages(state,apiClient){if(state&&state.NowPlayingItem){var item=state.NowPlayingItem;item.ImageTags&&item.ImageTags.Primary||item.PrimaryImageTag&&(item.ImageTags=item.ImageTags||{},item.ImageTags.Primary=item.PrimaryImageTag),item.BackdropImageTag&&item.BackdropItemId===item.Id&&(item.BackdropImageTags=[item.BackdropImageTag]),item.BackdropImageTag&&item.BackdropItemId!==item.Id&&(item.ParentBackdropImageTags=[item.BackdropImageTag],item.ParentBackdropItemId=item.BackdropItemId),item.ServerId||(item.ServerId=apiClient.serverId())}}function firePlaybackEvent(instance,name,session,apiClient){var state=getPlayerState(session);normalizeImages(state,apiClient),instance.lastPlayerData=state,events.trigger(instance,name,[state])}function SessionPlayer(){var self=this;this.name="Remote Control",this.type="mediaplayer",this.isLocalPlayer=!1,this.id="remoteplayer",events.on(serverNotifications,"Sessions",function(e,apiClient,data){processUpdatedSessions(self,data,apiClient)}),events.on(serverNotifications,"SessionEnded",function(e,apiClient,data){console.log("Server reports another session ended"),getActivePlayerId()===data.Id&&playbackManager.setDefaultPlayerActive()}),events.on(serverNotifications,"PlaybackStart",function(e,apiClient,data){data.DeviceId!==apiClient.deviceId()&&getActivePlayerId()===data.Id&&firePlaybackEvent(self,"playbackstart",data,apiClient)}),events.on(serverNotifications,"PlaybackStopped",function(e,apiClient,data){data.DeviceId!==apiClient.deviceId()&&getActivePlayerId()===data.Id&&firePlaybackEvent(self,"playbackstop",data,apiClient)})}return SessionPlayer.prototype.beginPlayerUpdates=function(){this.playerListenerCount=this.playerListenerCount||0,this.playerListenerCount<=0&&(this.playerListenerCount=0,subscribeToPlayerUpdates(this)),this.playerListenerCount++},SessionPlayer.prototype.endPlayerUpdates=function(){this.playerListenerCount=this.playerListenerCount||0,this.playerListenerCount--,this.playerListenerCount<=0&&(unsubscribeFromPlayerUpdates(this),this.playerListenerCount=0)},SessionPlayer.prototype.getPlayerState=function(){return Promise.resolve(this.lastPlayerData||{})},SessionPlayer.prototype.getTargets=function(){var apiClient=getCurrentApiClient(this),sessionQuery={ControllableByUserId:apiClient.getCurrentUserId()};if(apiClient){var name=this.name;return apiClient.getSessions(sessionQuery).then(function(sessions){return sessions.filter(function(s){return s.DeviceId!==apiClient.deviceId()}).map(function(s){return{name:s.DeviceName,deviceName:s.DeviceName,id:s.Id,playerName:name,appName:s.Client,playableMediaTypes:s.PlayableMediaTypes,isLocalPlayer:!1,supportedCommands:s.SupportedCommands}})})}return Promise.resolve([])},SessionPlayer.prototype.sendCommand=function(command){var sessionId=getActivePlayerId(),apiClient=getCurrentApiClient(this);apiClient.sendCommand(sessionId,command)},SessionPlayer.prototype.play=function(options){var playOptions={};return playOptions.ids=options.ids||options.items.map(function(i){return i.Id}),options.startPositionTicks&&(playOptions.startPositionTicks=options.startPositionTicks),sendPlayCommand(getCurrentApiClient(this),playOptions,"PlayNow")},SessionPlayer.prototype.shuffle=function(item){sendPlayCommand(getCurrentApiClient(this),{ids:[item.Id]},"PlayShuffle")},SessionPlayer.prototype.instantMix=function(item){sendPlayCommand(getCurrentApiClient(this),{ids:[item.Id]},"PlayInstantMix")},SessionPlayer.prototype.queue=function(options){sendPlayCommand(getCurrentApiClient(this),options,"PlayNext")},SessionPlayer.prototype.queueNext=function(options){sendPlayCommand(getCurrentApiClient(this),options,"PlayLast")},SessionPlayer.prototype.canPlayMediaType=function(mediaType){return mediaType=(mediaType||"").toLowerCase(),"audio"===mediaType||"video"===mediaType},SessionPlayer.prototype.canQueueMediaType=function(mediaType){return this.canPlayMediaType(mediaType)},SessionPlayer.prototype.stop=function(){sendPlayStateCommand(getCurrentApiClient(this),"stop")},SessionPlayer.prototype.nextTrack=function(){sendPlayStateCommand(getCurrentApiClient(this),"nextTrack")},SessionPlayer.prototype.previousTrack=function(){sendPlayStateCommand(getCurrentApiClient(this),"previousTrack")},SessionPlayer.prototype.seek=function(positionTicks){sendPlayStateCommand(getCurrentApiClient(this),"seek",{SeekPositionTicks:positionTicks})},SessionPlayer.prototype.currentTime=function(val){if(null!=val)return this.seek(val);var state=this.lastPlayerData||{};return state=state.PlayState||{},state.PositionTicks},SessionPlayer.prototype.duration=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},state.RunTimeTicks},SessionPlayer.prototype.paused=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.IsPaused},SessionPlayer.prototype.getVolume=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.VolumeLevel},SessionPlayer.prototype.pause=function(){sendPlayStateCommand(getCurrentApiClient(this),"Pause")},SessionPlayer.prototype.unpause=function(){sendPlayStateCommand(getCurrentApiClient(this),"Unpause")},SessionPlayer.prototype.playPause=function(){sendPlayStateCommand(getCurrentApiClient(this),"PlayPause")},SessionPlayer.prototype.setMute=function(isMuted){isMuted?sendCommandByName(this,"Mute"):sendCommandByName(this,"Unmute")},SessionPlayer.prototype.toggleMute=function(){sendCommandByName(this,"ToggleMute")},SessionPlayer.prototype.setVolume=function(vol){sendCommandByName(this,"SetVolume",{Volume:vol})},SessionPlayer.prototype.volumeUp=function(){sendCommandByName(this,"VolumeUp")},SessionPlayer.prototype.volumeDown=function(){sendCommandByName(this,"VolumeDown")},SessionPlayer.prototype.toggleFullscreen=function(){sendCommandByName(this,"ToggleFullscreen")},SessionPlayer.prototype.audioTracks=function(){var state=this.lastPlayerData||{};state=state.NowPlayingItem||{};var streams=state.MediaStreams||[];return streams.filter(function(s){return"Audio"===s.Type})},SessionPlayer.prototype.getAudioStreamIndex=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.AudioStreamIndex},SessionPlayer.prototype.setAudioStreamIndex=function(index){sendCommandByName(this,"SetAudioStreamIndex",{Index:index})},SessionPlayer.prototype.subtitleTracks=function(){var state=this.lastPlayerData||{};state=state.NowPlayingItem||{};var streams=state.MediaStreams||[];return streams.filter(function(s){return"Subtitle"===s.Type})},SessionPlayer.prototype.getSubtitleStreamIndex=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.SubtitleStreamIndex},SessionPlayer.prototype.setSubtitleStreamIndex=function(index){sendCommandByName(this,"SetSubtitleStreamIndex",{Index:index})},SessionPlayer.prototype.getMaxStreamingBitrate=function(){},SessionPlayer.prototype.setMaxStreamingBitrate=function(options){},SessionPlayer.prototype.isFullscreen=function(){},SessionPlayer.prototype.toggleFullscreen=function(){},SessionPlayer.prototype.getRepeatMode=function(){},SessionPlayer.prototype.setRepeatMode=function(mode){sendCommandByName(this,"SetRepeatMode",{RepeatMode:mode})},SessionPlayer.prototype.displayContent=function(options){sendCommandByName(this,"DisplayContent",options)},SessionPlayer.prototype.isPlaying=function(){var state=this.lastPlayerData||{};return null!=state.NowPlayingItem},SessionPlayer.prototype.isPlayingVideo=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},"Video"===state.MediaType},SessionPlayer.prototype.isPlayingAudio=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},"Audio"===state.MediaType},SessionPlayer.prototype.getPlaylist=function(){return Promise.resolve([])},SessionPlayer.prototype.getCurrentPlaylistItemId=function(){},SessionPlayer.prototype.setCurrentPlaylistItem=function(playlistItemId){return Promise.resolve()},SessionPlayer.prototype.removeFromPlaylist=function(playlistItemIds){return Promise.resolve()},SessionPlayer.prototype.tryPair=function(target){return Promise.resolve()},SessionPlayer});
\ No newline at end of file
diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css
index 43c1e494a5..f351a21781 100644
--- a/dashboard-ui/css/librarybrowser.css
+++ b/dashboard-ui/css/librarybrowser.css
@@ -1 +1 @@
-.headerUserImage,.navMenuOption,.pageTitle{vertical-align:middle}.headerSelectedPlayer,.itemMiscInfo{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.alphabetPicker,.detailButton-mobile,.itemLinks,.listPaging,.sectionTabs,.viewSettings{text-align:center}.clearLink,.itemTag,.navMenuOption{text-decoration:none}.libraryPage,.standalonePage{padding-top:5.5em!important}.wizardPage{padding-top:7em!important}.libraryPage:not(.noSecondaryNavPage){padding-top:9.2em!important}.absolutePageTabContent{position:absolute;left:0;right:0;bottom:0;z-index:1;margin:0!important;top:6.9em!important;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.pageTabContent:not(.is-active){display:none!important}.navMenuDivider{height:1px;margin:.5em 0}.headerUserImage{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center center;-webkit-border-radius:100em;border-radius:100em;display:inline-block}.headerUserButtonRound img{-webkit-border-radius:100em;border-radius:100em}.headerButton{-webkit-flex-shrink:0;flex-shrink:0;font-size:108%}.hideMainDrawer .mainDrawerButton{display:none}.noHeaderRight .headerRight,.noHomeButtonHeader .headerHomeButton{display:none!important}.pageTitle{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;margin:0 0 0 .5em;height:1.7em;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-shrink:1;flex-shrink:1}.detailButton-mobile,.skinHeader{-webkit-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal}.pageTitleWithLogo{background-position:left center;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;width:13.2em}.pageTitleWithDefaultLogo{height:1.22em}.skinHeader{position:fixed;right:0;left:0;z-index:999;top:0;border:0;display:-webkit-box;display:-webkit-flex;display:flex;flex-direction:column;background-color:#121212;color:#ccc}.hiddenViewMenuBar .skinHeader{display:none}.headerLeft,.headerRight{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.headerTop{padding:1em 0}.headerLeft{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;overflow:hidden}.sectionTabs{width:100%}.headerRight{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.selectedMediaFolder{background-color:#f2f2f2!important}.navMenuOption{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;color:inherit;font-weight:400!important;padding:1em 0 1em 2.4em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.navMenuOptionIcon{margin-right:1em;-webkit-flex-shrink:0;flex-shrink:0}.sidebarHeader{padding-left:1.4em;margin:1.2em 0 .7em;font-weight:500}body:not(.dashboardDocument) .btnNotifications{display:none!important}.dashboardDocument .skinBody{-webkit-transition:left ease-in-out .3s,padding ease-in-out .3s;-o-transition:left ease-in-out .3s,padding ease-in-out .3s;transition:left ease-in-out .3s,padding ease-in-out .3s;position:absolute;top:0;right:0;bottom:0;left:0}@media all and (max-width:40em){.navMenuOption{font-size:110%}}.mainDrawer-scrollContainer{padding-bottom:10vh}@media all and (min-width:40em){.dashboardDocument .adminDrawerLogo,.dashboardDocument .mainDrawerButton,.dashboardDocument .tmla-mask{display:none!important}.dashboardDocument .mainDrawer{z-index:inherit!important;left:0!important;top:0!important;-webkit-transform:none!important;transform:none!important;width:20.07em!important;font-size:92%}.dashboardDocument .mainDrawer-scrollContainer{margin-top:4.9em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:8.5em!important}.dashboardDocument .skinBody{left:20em}}@media all and (min-width:40em) and (max-width:84em){.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:7em!important}}@media all and (max-width:84em){.withSectionTabs .headerTop{padding-bottom:.2em}}@media all and (max-width:84em) and (max-height:36em){.sectionTabs{font-size:88%}}@media all and (min-width:84em){.headerTabs{-webkit-align-self:center;align-self:center;width:auto;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;margin-top:-3.34em;position:relative;top:-.55em}.libraryPage:not(.noSecondaryNavPage){padding-top:5.3em!important}.pageWithAbsoluteTabs:not(.noSecondaryNavPage){padding-top:7.6em!important}.absolutePageTabContent{top:4.8em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:4.9em!important}}.headerSelectedPlayer{font-weight:400;max-width:10em;white-space:nowrap}.itemName,.itemTag{font-weight:400!important}@media all and (max-width:37.5em){.headerSelectedPlayer{display:none}}.hidingAnimatedTab{visibility:hidden}.headerArrowImage{height:20px;margin-left:.5em}.backdropContainer{position:fixed;top:0;left:0;right:0;bottom:0;z-index:-1}.libraryPage .header{padding-bottom:0}.pageTabContent{contain:style}.flexPageTabContent.is-active{display:-webkit-box!important;display:-webkit-flex!important;display:flex!important}.viewSettings{margin:0 0 .25em}.viewControls+.listTopPaging{margin-left:.5em!important}.criticReview{margin:1.5em 0;background:#222;padding:.8em .8em .8em 3em;-webkit-border-radius:.3em;border-radius:.3em;position:relative}.detailLogo,.itemBackdrop{background-repeat:no-repeat;background-position:center center}.criticReview:first-child{margin-top:.5em}.criticReview img{width:2.4em}.criticRatingScore{margin-bottom:.5em}.itemTag{display:inline-block;background-color:#333;-webkit-border-radius:.25em;border-radius:.25em;padding:.3em .5em;margin:0 .3em .3em 0;color:#fff!important}.itemOverview{white-space:pre-wrap}.itemLinks{padding:0}.itemLinks p{margin:.5em 0}.reviewLink,.reviewerName{margin-top:.5em}.reviewerName{color:#ccc}.reviewDate{margin-left:1em}.reviewScore{position:absolute;left:.8em}.itemBackdrop{-webkit-background-size:cover;background-size:cover;height:45vh;position:relative}.itemBackdropProgressBar{position:absolute!important;bottom:0;left:0;right:0}.itemBackdropFader{position:absolute;bottom:-1px;left:0;right:0;height:15vh}.desktopMiscInfoContainer{position:absolute;bottom:.75em}.detailImageContainer{margin-right:2em;width:280px;-webkit-flex-shrink:0;flex-shrink:0}.detailPagePrimaryContent{position:relative;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.detailLogo{width:21.3em;height:5em;position:absolute;top:13.5%;right:19.5%;-webkit-background-size:contain;background-size:contain}@media all and (max-width:87.5em){.detailLogo{right:5%}}@media all and (max-width:75em){.detailLogo{right:2%}}@media all and (max-width:68.75em){.detailLogo{width:14.91em;height:3.5em;right:5%;bottom:5%;top:auto;background-position:center right;display:none}}.itemDetailImage{border:1px solid transparent;width:100%}.thumbDetailImageContainer{width:400px}.itemDetailImage.loaded{-webkit-box-shadow:0 0 1.5em #000;box-shadow:0 0 1.5em #000;border:1px solid #222}.itemDetailGalleryLink img:hover{border-color:#52B54B}@media all and (max-width:62.5em){.detailPageContent{position:relative}.detailImageContainer{position:absolute;top:-90px;left:5%;width:auto}.itemDetailImage{height:120px;width:auto!important}.btnPlaySimple,.mainDetailButtons-nonmobile{display:none!important}}@media all and (min-width:62.5em){.itemBackdrop{display:none}.detailPagePrimaryContainer{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:3.6em}.mainDetailButtons-mobile{display:none!important}}@media all and (max-width:75em){.lnkSibling{display:none!important}}.parentName{display:block;margin-bottom:.5em}.emby-button.detailFloatingButton{position:absolute;background-color:rgba(0,0,0,.5)!important;z-index:1;top:50%;left:50%;margin:-2.2em 0 0 -2.2em;border:2.7px solid rgba(255,255,255,.6);padding:.38em!important;color:rgba(255,255,255,.76)}.emby-button.detailFloatingButton i{font-size:3.5em}@media all and (max-width:62.5em){.parentName{margin-bottom:1em}.itemDetailPage{padding-top:0!important}.detailimg-hidemobile{display:none}}@media all and (min-width:31.25em){.mobileDetails{display:none}}@media all and (max-width:31.25em){.desktopDetails{display:none!important}}.detailButton-mobile,.mainDetailButtons{display:-webkit-box;display:-webkit-flex}.itemName{margin:.5em 0}.empty{margin:0}.detailCollapsibleSection:not(.hide)+.detailCollapsibleSection{margin-top:-2em}.detailPageCollabsible{margin-top:0}.mainDetailButtons{display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-.5em}.recordingFields button{margin-left:0;margin-right:.5em;-webkit-flex-shrink:0;flex-shrink:0}.mainDetailButtons.hide+.recordingFields{margin-top:1.5em!important}.mainDetailButtons>.raised{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}@media all and (min-width:25em){.mainDetailButtons>.raised{padding-left:1.5em;padding-right:1.5em}}.detailButton-mobile{display:flex;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:0 .3em 0 0!important;padding-top:.5em!important;padding-bottom:.5em!important}.detailButton-mobile-content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.detailButton-mobile-icon{font-size:1.9em!important}.detailButton-mobile-text{margin-top:.7em;font-size:80%;font-weight:400;color:#aaa}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}.listTopPaging,.viewControls{display:inline-block}@media all and (max-width:50em){.editorMenuLink{display:none}}.itemMiscInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:31.25em){.mobileDetails .itemMiscInfo{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.itemMiscInfo .endsAt{display:none}}.layout-tv .detailVerticalSection{margin-bottom:3.4em!important}.detailPageContent{border-spacing:0;border-collapse:collapse;padding-top:3em}@media all and (max-width:62.5em){.detailPageContent-nodetailimg{padding-top:0;margin-top:-3em}}@media all and (min-width:75em){.itemDetailPage .padded-left{padding-left:4%!important}.itemDetailPage .padded-right{padding-right:4%!important}}.detailPageParentLink{font-weight:inherit!important}.mediaInfoContent{line-height:1.5em}.mediaInfoStream{margin:1em 3em 1em 0;display:inline-block;vertical-align:top}.mediaInfoStreamType{display:block;margin-bottom:1em}.mediaInfoAttribute,.mediaInfoLabel{display:inline-block}.mediaInfoLabel{margin-right:1em;font-weight:500}.recordingProgressBar::-moz-progress-bar{background-color:#c33}.recordingProgressBar::-webkit-progress-value{background-color:#c33}.recordingProgressBar[aria-valuenow]:before{background-color:#c33}.timelineHeader{margin-bottom:.25em;line-height:1.25em;line-height:initial}.itemsContainer{margin:0 auto}.alphabetPicker{position:fixed;left:.4em;bottom:48px;display:none;line-height:1}.alphabetPicker-right{right:.4em;left:auto}.layout-desktop .absolutePageTabContent .alphabetPicker{right:1.5em}@media all and (max-height:31.25em){.alphabetPicker{display:none!important}.itemBackdrop{height:52vh}}.alphaPicker-vertical .alphaPickerButton{padding-top:2px!important;padding-bottom:2px!important}@media all and (max-height:43.75em){.alphaPicker-vertical .alphaPickerButton{padding-top:1px!important;padding-bottom:1px!important}}@media all and (max-height:37.5em){.alphaPicker-vertical .alphaPickerButton{padding-top:0!important;padding-bottom:0!important}}@media all and (max-height:33.125em){.alphabetPicker{font-size:80%!important}}@media all and (max-height:30em){.alphabetPicker{font-size:76%!important}}@media all and (min-height:37.5em){.alphabetPicker{bottom:70px}}@media all and (min-height:56.25em){.alphabetPicker{bottom:120px}}@media all and (min-height:62.5em){.alphabetPicker{bottom:200px}}@media all and (max-width:75em){.listViewUserDataButtons{display:none!important}}.userProfileSettingsForm{max-width:700px}@media all and (max-width:43.75em){.userProfileSettingsForm .detailSection{margin-left:.5em;margin-right:.5em}}@media all and (max-width:62.5em){.detailsHiddenOnMobile{display:none}}#criticReviewsContent.hiddenScrollX{white-space:nowrap}#criticReviewsContent.hiddenScrollX .paperList{min-width:240px;width:90%;max-width:500px;display:inline-block;vertical-align:top;margin:0 .35em 0 0}.btnSyncComplete{background:#673AB7!important}.btnSyncComplete i{-webkit-border-radius:1000px;border-radius:1000px}.bulletSeparator{margin:0 .35em}.mediaInfoIcons{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:1.5em 0 1em;-webkit-flex-wrap:wrap;flex-wrap:wrap}.mediaInfoText{padding:.3em .5em!important;margin-right:.5em;margin-bottom:.5em;font-size:94%!important}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.mediaInfoText-upper{text-transform:uppercase}.verticalSection{margin-bottom:1.9em}@media all and (max-width:500px),(max-height:720px){.verticalSection{margin-bottom:1.3em}}.layout-tv .verticalSection{margin-bottom:1.7em}.sectionTitleContainer{margin-bottom:.3em}.layout-tv .sectionTitleContainer{margin-bottom:0}.sectionTitle{margin-bottom:.07em}.sectionTitleContainer>.sectionTitle{margin-top:0;margin-bottom:0;display:inline-block;vertical-align:middle}.sectionTitleButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0}.sectionTitleButton+.sectionTitleButton{margin-left:.5em!important}.sectionTitleIconButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0;color:#aaa!important;font-size:84%!important;padding:.5em!important}.sectionTitle-cards{margin-left:.3em}.verticalSection .sectionTitle{margin-top:0}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.sectionTitleTextButton{margin:0 0 .1em!important;display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:inline-flex!important;color:inherit!important}.sectionTitleTextButton:not(.padded-left){padding:0!important}.sectionTitleTextButton.padded-left{padding-bottom:0!important;padding-right:0!important;padding-top:0!important}.sectionTitleTextButton>.sectionTitle{margin-bottom:0}.padded-left{padding-left:2%}.padded-right{padding-right:2%}.padded-top{padding-top:1em}.padded-bottom{padding-bottom:1em}.layout-tv .padded-top-focusscale{padding-top:1.6em;margin-top:-1.6em}.layout-tv .padded-bottom-focusscale{padding-bottom:1.6em;margin-bottom:-1.6em}@media all and (min-height:500px){.padded-left-withalphapicker{padding-left:6%}.padded-right-withalphapicker{padding-right:6%}}@media all and (min-width:600px){.padded-left{padding-left:3%}.padded-right{padding-right:3%}}@media all and (min-width:800px){.padded-left{padding-left:3.2%}.padded-right{padding-right:3.2%}}@media all and (min-width:1280px){.padded-left{padding-left:3.3%}.padded-right{padding-right:3.3%}}@media all and (min-width:800px){.layout-tv .padded-left-withalphapicker{padding-left:4.4%}.layout-tv .padded-right-withalphapicker{padding-right:4.4%}}@media all and (min-width:1280px){.layout-tv .padded-left-withalphapicker{padding-left:5%}.layout-tv .padded-right-withalphapicker{padding-right:5%}}.homeLibraryButton{min-width:18%;margin:.5em!important}@media all and (max-width:50em){.homeLibraryButton{width:46%!important}}.searchfields-icon{color:#aaa}.button-accent-flat{color:#52B54B!important}.clearLink{font-weight:inherit!important;vertical-align:middle;color:inherit!important}
\ No newline at end of file
+.headerUserImage,.navMenuOption,.pageTitle{vertical-align:middle}.headerSelectedPlayer,.itemMiscInfo{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.alphabetPicker,.detailButton-mobile,.itemLinks,.listPaging,.sectionTabs,.viewSettings{text-align:center}.clearLink,.itemTag,.navMenuOption{text-decoration:none}.libraryPage,.standalonePage{padding-top:5.5em!important}.wizardPage{padding-top:7em!important}.libraryPage:not(.noSecondaryNavPage){padding-top:9.2em!important}.absolutePageTabContent{position:absolute;left:0;right:0;bottom:0;z-index:1;margin:0!important;top:6.9em!important;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.pageTabContent:not(.is-active){display:none!important}.navMenuDivider{height:1px;margin:.5em 0}.headerUserImage{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center center;-webkit-border-radius:100em;border-radius:100em;display:inline-block}.headerUserButtonRound img{-webkit-border-radius:100em;border-radius:100em}.headerButton{-webkit-flex-shrink:0;flex-shrink:0;font-size:108%}.hideMainDrawer .mainDrawerButton{display:none}.noHeaderRight .headerRight,.noHomeButtonHeader .headerHomeButton{display:none!important}.pageTitle{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;margin:0 0 0 .5em;height:1.7em;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-shrink:1;flex-shrink:1}.detailButton-mobile,.skinHeader{-webkit-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal}.pageTitleWithLogo{background-position:left center;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;width:13.2em}.pageTitleWithDefaultLogo{height:1.22em}.skinHeader{position:fixed;right:0;left:0;z-index:999;top:0;border:0;display:-webkit-box;display:-webkit-flex;display:flex;flex-direction:column;background-color:#121212;color:#ccc}.hiddenViewMenuBar .skinHeader{display:none}.headerLeft,.headerRight{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.headerTop{padding:1em 0}.headerLeft{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;overflow:hidden}.sectionTabs{width:100%}.headerRight{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.selectedMediaFolder{background-color:#f2f2f2!important}.navMenuOption{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;color:inherit;font-weight:400!important;padding:1em 0 1em 2.4em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.navMenuOptionIcon{margin-right:1em;-webkit-flex-shrink:0;flex-shrink:0}.sidebarHeader{padding-left:1.4em;margin:1.2em 0 .7em;font-weight:500}body:not(.dashboardDocument) .btnNotifications{display:none!important}.dashboardDocument .skinBody{-webkit-transition:left ease-in-out .3s,padding ease-in-out .3s;-o-transition:left ease-in-out .3s,padding ease-in-out .3s;transition:left ease-in-out .3s,padding ease-in-out .3s;position:absolute;top:0;right:0;bottom:0;left:0}@media all and (max-width:40em){.navMenuOption{font-size:110%}}.mainDrawer-scrollContainer{padding-bottom:10vh}@media all and (min-width:40em){.dashboardDocument .adminDrawerLogo,.dashboardDocument .mainDrawerButton,.dashboardDocument .tmla-mask{display:none!important}.dashboardDocument .mainDrawer{z-index:inherit!important;left:0!important;top:0!important;-webkit-transform:none!important;transform:none!important;width:20.07em!important;font-size:92%}.dashboardDocument .mainDrawer-scrollContainer{margin-top:4.9em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:8.5em!important}.dashboardDocument .skinBody{left:20em}}@media all and (min-width:40em) and (max-width:84em){.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:7em!important}}@media all and (max-width:84em){.withSectionTabs .headerTop{padding-bottom:.2em}}@media all and (max-width:84em) and (max-height:36em){.sectionTabs{font-size:88%}}@media all and (min-width:84em){.headerTabs{-webkit-align-self:center;align-self:center;width:auto;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;margin-top:-3.34em;position:relative;top:-.55em}.libraryPage:not(.noSecondaryNavPage){padding-top:5.3em!important}.pageWithAbsoluteTabs:not(.noSecondaryNavPage){padding-top:7.2em!important}.absolutePageTabContent{top:4.8em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:4.9em!important}}.headerSelectedPlayer{font-weight:400;max-width:10em;white-space:nowrap}.itemName,.itemTag{font-weight:400!important}@media all and (max-width:37.5em){.headerSelectedPlayer{display:none}}.hidingAnimatedTab{visibility:hidden}.headerArrowImage{height:20px;margin-left:.5em}.backdropContainer{position:fixed;top:0;left:0;right:0;bottom:0;z-index:-1}.libraryPage .header{padding-bottom:0}.pageTabContent{contain:style}.flexPageTabContent.is-active{display:-webkit-box!important;display:-webkit-flex!important;display:flex!important}.viewSettings{margin:0 0 .25em}.viewControls+.listTopPaging{margin-left:.5em!important}.criticReview{margin:1.5em 0;background:#222;padding:.8em .8em .8em 3em;-webkit-border-radius:.3em;border-radius:.3em;position:relative}.detailLogo,.itemBackdrop{background-repeat:no-repeat;background-position:center center}.criticReview:first-child{margin-top:.5em}.criticReview img{width:2.4em}.criticRatingScore{margin-bottom:.5em}.itemTag{display:inline-block;background-color:#333;-webkit-border-radius:.25em;border-radius:.25em;padding:.3em .5em;margin:0 .3em .3em 0;color:#fff!important}.itemOverview{white-space:pre-wrap}.itemLinks{padding:0}.itemLinks p{margin:.5em 0}.reviewLink,.reviewerName{margin-top:.5em}.reviewerName{color:#ccc}.reviewDate{margin-left:1em}.reviewScore{position:absolute;left:.8em}.itemBackdrop{-webkit-background-size:cover;background-size:cover;height:45vh;position:relative}.itemBackdropProgressBar{position:absolute!important;bottom:0;left:0;right:0}.itemBackdropFader{position:absolute;bottom:-1px;left:0;right:0;height:15vh}.desktopMiscInfoContainer{position:absolute;bottom:.75em}.detailImageContainer{margin-right:2em;width:280px;-webkit-flex-shrink:0;flex-shrink:0}.detailPagePrimaryContent{position:relative;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.detailLogo{width:21.3em;height:5em;position:absolute;top:13.5%;right:19.5%;-webkit-background-size:contain;background-size:contain}@media all and (max-width:87.5em){.detailLogo{right:5%}}@media all and (max-width:75em){.detailLogo{right:2%}}@media all and (max-width:68.75em){.detailLogo{width:14.91em;height:3.5em;right:5%;bottom:5%;top:auto;background-position:center right;display:none}}.itemDetailImage{border:1px solid transparent;width:100%}.thumbDetailImageContainer{width:400px}.itemDetailImage.loaded{-webkit-box-shadow:0 0 1.5em #000;box-shadow:0 0 1.5em #000;border:1px solid #222}.itemDetailGalleryLink img:hover{border-color:#52B54B}@media all and (max-width:62.5em){.detailPageContent{position:relative}.detailImageContainer{position:absolute;top:-90px;left:5%;width:auto}.itemDetailImage{height:120px;width:auto!important}.btnPlaySimple,.mainDetailButtons-nonmobile{display:none!important}}@media all and (min-width:62.5em){.itemBackdrop{display:none}.detailPagePrimaryContainer{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:3.6em}.mainDetailButtons-mobile{display:none!important}}@media all and (max-width:75em){.lnkSibling{display:none!important}}.parentName{display:block;margin-bottom:.5em}.emby-button.detailFloatingButton{position:absolute;background-color:rgba(0,0,0,.5)!important;z-index:1;top:50%;left:50%;margin:-2.2em 0 0 -2.2em;border:2.7px solid rgba(255,255,255,.6);padding:.38em!important;color:rgba(255,255,255,.76)}.emby-button.detailFloatingButton i{font-size:3.5em}@media all and (max-width:62.5em){.parentName{margin-bottom:1em}.itemDetailPage{padding-top:0!important}.detailimg-hidemobile{display:none}}@media all and (min-width:31.25em){.mobileDetails{display:none}}@media all and (max-width:31.25em){.desktopDetails{display:none!important}}.detailButton-mobile,.mainDetailButtons{display:-webkit-box;display:-webkit-flex}.itemName{margin:.5em 0}.empty{margin:0}.detailCollapsibleSection:not(.hide)+.detailCollapsibleSection{margin-top:-2em}.detailPageCollabsible{margin-top:0}.mainDetailButtons{display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-.5em}.recordingFields button{margin-left:0;margin-right:.5em;-webkit-flex-shrink:0;flex-shrink:0}.mainDetailButtons.hide+.recordingFields{margin-top:1.5em!important}.mainDetailButtons>.raised{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}@media all and (min-width:25em){.mainDetailButtons>.raised{padding-left:1.5em;padding-right:1.5em}}.detailButton-mobile{display:flex;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:0 .3em 0 0!important;padding-top:.5em!important;padding-bottom:.5em!important}.detailButton-mobile-content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.detailButton-mobile-icon{font-size:1.9em!important}.detailButton-mobile-text{margin-top:.7em;font-size:80%;font-weight:400;color:#aaa}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}.listTopPaging,.viewControls{display:inline-block}@media all and (max-width:50em){.editorMenuLink{display:none}}.itemMiscInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:31.25em){.mobileDetails .itemMiscInfo{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.itemMiscInfo .endsAt{display:none}}.layout-tv .detailVerticalSection{margin-bottom:3.4em!important}.detailPageContent{border-spacing:0;border-collapse:collapse;padding-top:3em}@media all and (max-width:62.5em){.detailPageContent-nodetailimg{padding-top:0;margin-top:-3em}}@media all and (min-width:75em){.itemDetailPage .padded-left{padding-left:4%!important}.itemDetailPage .padded-right{padding-right:4%!important}}.detailPageParentLink{font-weight:inherit!important}.mediaInfoContent{line-height:1.5em}.mediaInfoStream{margin:1em 3em 1em 0;display:inline-block;vertical-align:top}.mediaInfoStreamType{display:block;margin-bottom:1em}.mediaInfoAttribute,.mediaInfoLabel{display:inline-block}.mediaInfoLabel{margin-right:1em;font-weight:500}.recordingProgressBar::-moz-progress-bar{background-color:#c33}.recordingProgressBar::-webkit-progress-value{background-color:#c33}.recordingProgressBar[aria-valuenow]:before{background-color:#c33}.timelineHeader{margin-bottom:.25em;line-height:1.25em;line-height:initial}.itemsContainer{margin:0 auto}.alphabetPicker{position:fixed;left:.4em;bottom:48px;display:none;line-height:1}.alphabetPicker-right{right:.4em;left:auto}.layout-desktop .absolutePageTabContent .alphabetPicker{right:1.5em}@media all and (max-height:31.25em){.alphabetPicker{display:none!important}.itemBackdrop{height:52vh}}.alphaPicker-vertical .alphaPickerButton{padding-top:2px!important;padding-bottom:2px!important}@media all and (max-height:43.75em){.alphaPicker-vertical .alphaPickerButton{padding-top:1px!important;padding-bottom:1px!important}}@media all and (max-height:37.5em){.alphaPicker-vertical .alphaPickerButton{padding-top:0!important;padding-bottom:0!important}}@media all and (max-height:33.125em){.alphabetPicker{font-size:80%!important}}@media all and (max-height:30em){.alphabetPicker{font-size:76%!important}}@media all and (min-height:37.5em){.alphabetPicker{bottom:70px}}@media all and (min-height:56.25em){.alphabetPicker{bottom:120px}}@media all and (min-height:62.5em){.alphabetPicker{bottom:200px}}@media all and (max-width:75em){.listViewUserDataButtons{display:none!important}}.userProfileSettingsForm{max-width:700px}@media all and (max-width:43.75em){.userProfileSettingsForm .detailSection{margin-left:.5em;margin-right:.5em}}@media all and (max-width:62.5em){.detailsHiddenOnMobile{display:none}}#criticReviewsContent.hiddenScrollX{white-space:nowrap}#criticReviewsContent.hiddenScrollX .paperList{min-width:240px;width:90%;max-width:500px;display:inline-block;vertical-align:top;margin:0 .35em 0 0}.btnSyncComplete{background:#673AB7!important}.btnSyncComplete i{-webkit-border-radius:1000px;border-radius:1000px}.bulletSeparator{margin:0 .35em}.mediaInfoIcons{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:1.5em 0 1em;-webkit-flex-wrap:wrap;flex-wrap:wrap}.mediaInfoText{padding:.3em .5em!important;margin-right:.5em;margin-bottom:.5em;font-size:94%!important}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.mediaInfoText-upper{text-transform:uppercase}.verticalSection{margin-bottom:1.9em}@media all and (max-width:500px),(max-height:720px){.verticalSection{margin-bottom:1.3em}}.layout-tv .verticalSection{margin-bottom:1.7em}.sectionTitleContainer{margin-bottom:.3em}.layout-tv .sectionTitleContainer{margin-bottom:0}.sectionTitle{margin-bottom:.07em}.sectionTitleContainer>.sectionTitle{margin-top:0;margin-bottom:0;display:inline-block;vertical-align:middle}.sectionTitleButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0}.sectionTitleButton+.sectionTitleButton{margin-left:.5em!important}.sectionTitleIconButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0;color:#aaa!important;font-size:84%!important;padding:.5em!important}.sectionTitle-cards{margin-left:.3em}.verticalSection .sectionTitle{margin-top:0}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.sectionTitleTextButton{margin:0 0 .1em!important;display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:inline-flex!important;color:inherit!important}.sectionTitleTextButton:not(.padded-left){padding:0!important}.sectionTitleTextButton.padded-left{padding-bottom:0!important;padding-right:0!important;padding-top:0!important}.sectionTitleTextButton>.sectionTitle{margin-bottom:0}.padded-left{padding-left:2%}.padded-right{padding-right:2%}.padded-top{padding-top:1em}.padded-bottom{padding-bottom:1em}.layout-tv .padded-top-focusscale{padding-top:1.6em;margin-top:-1.6em}.layout-tv .padded-bottom-focusscale{padding-bottom:1.6em;margin-bottom:-1.6em}@media all and (min-height:500px){.padded-left-withalphapicker{padding-left:6%}.padded-right-withalphapicker{padding-right:6%}}@media all and (min-width:600px){.padded-left{padding-left:3%}.padded-right{padding-right:3%}}@media all and (min-width:800px){.padded-left{padding-left:3.2%}.padded-right{padding-right:3.2%}}@media all and (min-width:1280px){.padded-left{padding-left:3.3%}.padded-right{padding-right:3.3%}}@media all and (min-width:800px){.layout-tv .padded-left-withalphapicker{padding-left:4.4%}.layout-tv .padded-right-withalphapicker{padding-right:4.4%}}@media all and (min-width:1280px){.layout-tv .padded-left-withalphapicker{padding-left:5%}.layout-tv .padded-right-withalphapicker{padding-right:5%}}.homeLibraryButton{min-width:18%;margin:.5em!important}@media all and (max-width:50em){.homeLibraryButton{width:46%!important}}.searchfields-icon{color:#aaa}.button-accent-flat{color:#52B54B!important}.clearLink{font-weight:inherit!important;vertical-align:middle;color:inherit!important}
\ No newline at end of file
diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js
index 6df64934c5..81c424cd62 100644
--- a/dashboard-ui/scripts/dashboardpage.js
+++ b/dashboard-ui/scripts/dashboardpage.js
@@ -1,2 +1,2 @@
-define(["datetime","jQuery","events","dom","globalize","loading","connectionManager","playMethodHelper","libraryBrowser","cardBuilder","imageLoader","humanedate","listViewStyle","emby-linkbutton","flexStyles","buttonenabled","emby-button","emby-itemscontainer"],function(datetime,$,events,dom,globalize,loading,connectionManager,playMethodHelper,libraryBrowser,cardBuilder,imageLoader){"use strict";function onConnectionHelpClick(e){return e.preventDefault(),!1}function onEditServerNameClick(e){var page=dom.parentWithClass(this,"page");return require(["prompt"],function(prompt){prompt({label:globalize.translate("LabelFriendlyServerName"),description:globalize.translate("LabelFriendlyServerNameHelp"),value:page.querySelector(".serverNameHeader").innerHTML,confirmText:globalize.translate("ButtonSave")}).then(function(value){loading.show(),ApiClient.getServerConfiguration().then(function(config){config.ServerName=value,ApiClient.updateServerConfiguration(config).then(function(){page.querySelector(".serverNameHeader").innerHTML=value,loading.hide()})})})}),e.preventDefault(),!1}function showPlaybackInfo(btn,session){require(["alert"],function(alert){var showTranscodeReasons,title,text=[],displayPlayMethod=playMethodHelper.getDisplayPlayMethod(session),isDirectStream="DirectStream"===displayPlayMethod,isTranscode="Transcode"===displayPlayMethod;isDirectStream?(title=globalize.translate("sharedcomponents#DirectStreaming"),text.push(globalize.translate("sharedcomponents#DirectStreamHelp1")),text.push(" "),text.push(globalize.translate("sharedcomponents#DirectStreamHelp2"))):isTranscode&&(title=globalize.translate("sharedcomponents#Transcoding"),text.push(globalize.translate("sharedcomponents#MediaIsBeingConverted")),session.TranscodingInfo&&session.TranscodingInfo.TranscodeReasons&&session.TranscodingInfo.TranscodeReasons.length&&(text.push(" "),text.push(globalize.translate("sharedcomponents#LabelReasonForTranscoding")),showTranscodeReasons=!0)),showTranscodeReasons&&session.TranscodingInfo.TranscodeReasons.forEach(function(t){text.push(globalize.translate("sharedcomponents#"+t))}),alert({text:text.join(" "),title:title})})}function showSendMessageForm(btn,session){require(["prompt"],function(prompt){prompt({title:globalize.translate("HeaderSendMessage"),label:globalize.translate("LabelMessageText"),confirmText:globalize.translate("ButtonSend")}).then(function(text){if(text){var apiClient=connectionManager.getApiClient(session.ServerId);apiClient.sendMessageCommand(session.Id,{Text:text,TimeoutMs:5e3})}})})}function showOptionsMenu(btn,session){require(["actionsheet"],function(actionsheet){var menuItems=[];return session.ServerId&&session.DeviceId!==connectionManager.deviceId()&&menuItems.push({name:globalize.translate("SendMessage"),id:"sendmessage"}),session.TranscodingInfo&&session.TranscodingInfo.TranscodeReasons&&session.TranscodingInfo.TranscodeReasons.length&&menuItems.push({name:globalize.translate("ViewPlaybackInfo"),id:"transcodinginfo"}),actionsheet.show({items:menuItems,positionTo:btn}).then(function(id){switch(id){case"sendmessage":showSendMessageForm(btn,session);break;case"transcodinginfo":showPlaybackInfo(btn,session)}})})}function onActiveDevicesClick(e){var btn=dom.parentWithClass(e.target,"sessionCardButton");if(btn){var card=dom.parentWithClass(btn,"card");if(card){var sessionId=card.id,session=(DashboardPage.sessionsList||[]).filter(function(s){return"session"+s.Id===sessionId})[0];session&&(btn.classList.contains("btnCardOptions")?showOptionsMenu(btn,session):btn.classList.contains("btnSessionInfo")?showPlaybackInfo(btn,session):btn.classList.contains("btnSessionSendMessage")?showSendMessageForm(btn,session):btn.classList.contains("btnSessionStop")?connectionManager.getApiClient(session.ServerId).sendPlayStateCommand(session.Id,"Stop"):btn.classList.contains("btnSessionPlayPause")&&session.PlayState&&(session.PlayState.IsPaused?connectionManager.getApiClient(session.ServerId).sendPlayStateCommand(session.Id,"Unpause"):connectionManager.getApiClient(session.ServerId).sendPlayStateCommand(session.Id,"Pause")))}}}function filterSessions(sessions){for(var list=[],i=0,length=sessions.length;i'+globalize.translate("PleaseUpdateManually")+""),DashboardPage.renderPaths(page,systemInfo),DashboardPage.renderHasPendingRestart(page,systemInfo.HasPendingRestart)})},reloadNews:function(page){var query={StartIndex:DashboardPage.newsStartIndex,Limit:4};ApiClient.getProductNews(query).then(function(result){var html=result.Items.map(function(item){var itemHtml="";itemHtml+='',itemHtml+='
A beautiful app for your TV and large screen tablet. '+nameText+" runs on Windows, Xbox One, Raspberry Pi, Samsung Smart TVs, Sony PS4, Web Browsers, and more.
",elem.innerHTML=html,imageLoader.lazyChildren(elem)})}return{loadLatestChannelMedia:loadLatestChannelMedia,loadLibraryTiles:loadLibraryTiles,loadResumeVideo:loadResumeVideo,loadResumeAudio:loadResumeAudio,loadActiveRecordings:loadActiveRecordings,loadNextUp:loadNextUp,loadLatestChannelItems:loadLatestChannelItems,loadLatestLiveTvRecordings:loadLatestLiveTvRecordings,getDefaultSection:getDefaultSection,loadSections:loadSections}});
\ No newline at end of file
+define(["cardBuilder","appSettings","dom","apphost","layoutManager","imageLoader","globalize","itemShortcuts","itemHelper","appRouter","emby-button","paper-icon-button-light","emby-itemscontainer","emby-scroller","emby-linkbutton","css!./homesections"],function(cardBuilder,appSettings,dom,appHost,layoutManager,imageLoader,globalize,itemShortcuts,itemHelper,appRouter){"use strict";function getDefaultSection(index){switch(index){case 0:return"smalllibrarytiles";case 1:return"resume";case 2:return"resumeaudio";case 3:return"livetv";case 4:return"nextup";case 5:return"latestmedia";case 6:return"none";default:return""}}function getAllSectionsToShow(userSettings,sectionCount){for(var sections=[],i=0,length=sectionCount;i
A beautiful app for your TV and large screen tablet. '+nameText+" runs on Windows, Xbox One, Raspberry Pi, Samsung Smart TVs, Sony PS4, Web Browsers, and more.
",dlg.innerHTML=html;var i,length,isRejected=!0,timeTextInterval=setInterval(function(){seconds-=1,seconds<=0?(dlg.querySelector(".continueTimeText").classList.add("hide"),dlg.querySelector(".btnContinue").classList.remove("hide")):dlg.querySelector(".continueTimeText").innerHTML=globalize.translate("sharedcomponents#ContinueInSecondsValue",seconds)},1e3),btnPurchases=dlg.querySelectorAll(".buttonPremiereInfo");for(i=0,length=btnPurchases.length;iintervalMs?connectionManager.currentApiClient().getPluginSecurityInfo().then(function(regInfo){return regInfo.IsMBSupporter?(appSettings.set(settingsKey,(new Date).getTime()),Promise.resolve()):showPeriodicMessage(feature,settingsKey)},function(){return showPeriodicMessage(feature,settingsKey)}):Promise.resolve():(appSettings.set(settingsKey,(new Date).getTime()),Promise.resolve())}function validateFeature(feature,options){return options=options||{},console.log("validateFeature: "+feature),iapManager.isUnlockedByDefault(feature,options).then(function(){return showPeriodicMessageIfNeeded(feature)},function(){var unlockableFeatureCacheKey="featurepurchased-"+feature;if("1"===appSettings.get(unlockableFeatureCacheKey))return showPeriodicMessageIfNeeded(feature);var unlockableProduct=iapManager.getProductInfo(feature);if(unlockableProduct){var unlockableCacheKey="productpurchased-"+unlockableProduct.id;if(unlockableProduct.owned)return appSettings.set(unlockableFeatureCacheKey,"1"),appSettings.set(unlockableCacheKey,"1"),showPeriodicMessageIfNeeded(feature);if("1"===appSettings.get(unlockableCacheKey))return showPeriodicMessageIfNeeded(feature)}var unlockableProductInfo=unlockableProduct?{enableAppUnlock:!0,id:unlockableProduct.id,price:unlockableProduct.price,feature:feature}:null;return iapManager.getSubscriptionOptions().then(function(subscriptionOptions){return subscriptionOptions.filter(function(p){return p.owned}).length>0?Promise.resolve():connectionManager.getRegistrationInfo(iapManager.getAdminFeatureName(feature),connectionManager.currentApiClient()).catch(function(errorResult){if(options.showDialog===!1)return Promise.reject();if("overlimit"===errorResult)return showOverLimitAlert();var dialogOptions={title:globalize.translate("sharedcomponents#HeaderUnlockFeature"),feature:feature};return showInAppPurchaseInfo(subscriptionOptions,unlockableProductInfo,dialogOptions)})})})}function showOverLimitAlert(){return alertText("Your Emby Premiere device limit has been exceeded. Please check with the owner of your Emby Server and have them contact Emby support at apps@emby.media if necessary.").then(function(){return Promise.reject()})}function cancelInAppPurchase(){var elem=document.querySelector(".inAppPurchaseOverlay");elem&&dialogHelper.close(elem)}function clearCurrentDisplayingInfo(){currentDisplayingProductInfos=[],currentDisplayingResolve=null}function showExternalPremiereInfo(){shell.openUrl("https://emby.media/premiere")}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function getPurchaseTermHtml(term){return"
",dlg.innerHTML=html,document.body.appendChild(dlg),loading.hide(),layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!0),dlg.querySelector(".btnCloseDialog").addEventListener("click",function(){dialogHelper.close(dlg)}),dlg.querySelector(".btnRestoreSub").addEventListener("click",function(){dialogHelper.close(dlg),alertText({text:globalize.translate("sharedcomponents#MessageToValidateSupporter"),title:"Emby Premiere"})});var btnRestoreUnlock=dlg.querySelector(".btnRestoreUnlock");btnRestoreUnlock&&btnRestoreUnlock.addEventListener("click",function(){dialogHelper.close(dlg),iapManager.restorePurchase()}),dialogHelper.open(dlg).then(function(){layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!1)})}function getUserEmail(){if(connectionManager.isLoggedIntoConnect()){var connectUser=connectionManager.connectUser();if(connectUser&&connectUser.Email)return Promise.resolve(connectUser.Email)}return new Promise(function(resolve,reject){require(["prompt"],function(prompt){prompt({label:globalize.translate("sharedcomponents#LabelEmailAddress")}).then(resolve,reject)})})}function onProductUpdated(e,product){if(product.owned){var resolve=currentDisplayingResolve;resolve&¤tDisplayingProductInfos.filter(function(p){return product.id===p.id}).length&&(cancelInAppPurchase(),resolve())}}function showPremiereInfo(){return appHost.supports("externalpremium")?(showExternalPremiereInfo(),Promise.resolve()):iapManager.getSubscriptionOptions().then(function(subscriptionOptions){var dialogOptions={title:"Emby Premiere",feature:"sync"};return showInAppPurchaseInfo(subscriptionOptions,null,dialogOptions)})}var currentDisplayingProductInfos=[],currentDisplayingResolve=null;return events.on(iapManager,"productupdated",onProductUpdated),{validateFeature:validateFeature,showPremiereInfo:showPremiereInfo}});
\ No newline at end of file
+define(["appSettings","loading","apphost","iapManager","events","shell","globalize","dialogHelper","connectionManager","layoutManager","emby-button","emby-linkbutton"],function(appSettings,loading,appHost,iapManager,events,shell,globalize,dialogHelper,connectionManager,layoutManager){"use strict";function alertText(options){return new Promise(function(resolve,reject){require(["alert"],function(alert){alert(options).then(resolve,reject)})})}function showInAppPurchaseInfo(subscriptionOptions,unlockableProductInfo,dialogOptions){return new Promise(function(resolve,reject){require(["listViewStyle","formDialogStyle"],function(){showInAppPurchaseElement(subscriptionOptions,unlockableProductInfo,dialogOptions,resolve,reject),currentDisplayingResolve=resolve})})}function showPeriodicMessage(feature,settingsKey){return new Promise(function(resolve,reject){require(["listViewStyle","emby-button","formDialogStyle"],function(){var dlg=dialogHelper.createDialog({size:layoutManager.tv?"fullscreen":"fullscreen-border",removeOnClose:!0,scrollY:!1});dlg.classList.add("formDialog");var html="";html+='
",dlg.innerHTML=html;var i,length,isRejected=!0,timeTextInterval=setInterval(function(){seconds-=1,seconds<=0?(dlg.querySelector(".continueTimeText").classList.add("hide"),dlg.querySelector(".btnContinue").classList.remove("hide")):dlg.querySelector(".continueTimeText").innerHTML=globalize.translate("sharedcomponents#ContinueInSecondsValue",seconds)},1e3),btnPurchases=dlg.querySelectorAll(".buttonPremiereInfo");for(i=0,length=btnPurchases.length;iintervalMs?connectionManager.currentApiClient().getPluginSecurityInfo().then(function(regInfo){return regInfo.IsMBSupporter?(appSettings.set(settingsKey,(new Date).getTime()),Promise.resolve()):showPeriodicMessage(feature,settingsKey)},function(){return showPeriodicMessage(feature,settingsKey)}):Promise.resolve():(appSettings.set(settingsKey,(new Date).getTime()),Promise.resolve())}function validateFeature(feature,options){return options=options||{},console.log("validateFeature: "+feature),iapManager.isUnlockedByDefault(feature,options).then(function(){return showPeriodicMessageIfNeeded(feature)},function(){var unlockableFeatureCacheKey="featurepurchased-"+feature;if("1"===appSettings.get(unlockableFeatureCacheKey))return showPeriodicMessageIfNeeded(feature);var unlockableProduct=iapManager.getProductInfo(feature);if(unlockableProduct){var unlockableCacheKey="productpurchased-"+unlockableProduct.id;if(unlockableProduct.owned)return appSettings.set(unlockableFeatureCacheKey,"1"),appSettings.set(unlockableCacheKey,"1"),showPeriodicMessageIfNeeded(feature);if("1"===appSettings.get(unlockableCacheKey))return showPeriodicMessageIfNeeded(feature)}var unlockableProductInfo=unlockableProduct?{enableAppUnlock:!0,id:unlockableProduct.id,price:unlockableProduct.price,feature:feature}:null;return iapManager.getSubscriptionOptions().then(function(subscriptionOptions){if(subscriptionOptions.filter(function(p){return p.owned}).length>0)return Promise.resolve();var registrationOptions={viewOnly:options.viewOnly};return connectionManager.getRegistrationInfo(iapManager.getAdminFeatureName(feature),connectionManager.currentApiClient(),registrationOptions).catch(function(errorResult){if(options.showDialog===!1)return Promise.reject();if("overlimit"===errorResult)return showOverLimitAlert();var dialogOptions={title:globalize.translate("sharedcomponents#HeaderUnlockFeature"),feature:feature};return showInAppPurchaseInfo(subscriptionOptions,unlockableProductInfo,dialogOptions)})})})}function showOverLimitAlert(){return alertText("Your Emby Premiere device limit has been exceeded. Please check with the owner of your Emby Server and have them contact Emby support at apps@emby.media if necessary.").then(function(){return Promise.reject()})}function cancelInAppPurchase(){var elem=document.querySelector(".inAppPurchaseOverlay");elem&&dialogHelper.close(elem)}function clearCurrentDisplayingInfo(){currentDisplayingProductInfos=[],currentDisplayingResolve=null}function showExternalPremiereInfo(){shell.openUrl("https://emby.media/premiere")}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function getPurchaseTermHtml(term){return"
"),installedPluginsElement.innerHTML=html),loading.hide()}function showPluginMenu(page,elem){var card=dom.parentWithClass(elem,"card"),id=card.getAttribute("data-id"),name=card.getAttribute("data-name"),configHref=card.querySelector(".cardContent").getAttribute("href"),menuItems=[];configHref&&menuItems.push({name:Globalize.translate("ButtonSettings"),id:"open",ironIcon:"mode-edit"}),menuItems.push({name:Globalize.translate("ButtonUninstall"),id:"delete",ironIcon:"delete"}),require(["actionsheet"],function(actionsheet){actionsheet.show({items:menuItems,positionTo:elem,callback:function(resultId){switch(resultId){case"open":Dashboard.navigate(configHref);break;case"delete":deletePlugin(page,id,name)}}})})}function reloadList(page){loading.show(),ApiClient.getInstalledPlugins().then(function(plugins){renderPlugins(page,plugins,!0)})}function getTabs(){return[{href:"plugins.html",name:Globalize.translate("TabMyPlugins")},{href:"plugincatalog.html",name:Globalize.translate("TabCatalog")}]}function onInstalledPluginsClick(e){if(dom.parentWithClass(e.target,"noConfigPluginCard"))showNoConfigurationMessage();else if(dom.parentWithClass(e.target,"connectModePluginCard"))showConnectMessage();else{var btnCardMenu=dom.parentWithClass(e.target,"btnCardMenu");btnCardMenu&&showPluginMenu(dom.parentWithClass(btnCardMenu,"page"),btnCardMenu)}}pageIdOn("pageinit","pluginsPage",function(){this.querySelector(".installedPlugins").addEventListener("click",onInstalledPluginsClick)}),pageIdOn("pageshow","pluginsPage",function(){libraryMenu.setTabs("plugins",0,getTabs),reloadList(this)}),window.PluginsPage={renderPlugins:renderPlugins}});
\ No newline at end of file
diff --git a/dashboard-ui/strings/be-by.json b/dashboard-ui/strings/be-by.json
index c78be85a92..53d8823f5d 100644
--- a/dashboard-ui/strings/be-by.json
+++ b/dashboard-ui/strings/be-by.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/bg-bg.json b/dashboard-ui/strings/bg-bg.json
index aaa6422f98..4ee1f27496 100644
--- a/dashboard-ui/strings/bg-bg.json
+++ b/dashboard-ui/strings/bg-bg.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/ca.json b/dashboard-ui/strings/ca.json
index f490827bff..2e05e58fce 100644
--- a/dashboard-ui/strings/ca.json
+++ b/dashboard-ui/strings/ca.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Reprodueix el seg\u00fcent episodi autom\u00e0ticament",
diff --git a/dashboard-ui/strings/de-de.json b/dashboard-ui/strings/de-de.json
index 0ed52a8ebb..127efa19fe 100644
--- a/dashboard-ui/strings/de-de.json
+++ b/dashboard-ui/strings/de-de.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/el.json b/dashboard-ui/strings/el.json
index 86979dc3a6..c7fc73f26d 100644
--- a/dashboard-ui/strings/el.json
+++ b/dashboard-ui/strings/el.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/es-ar.json b/dashboard-ui/strings/es-ar.json
index 35879a371f..c898ab92cf 100644
--- a/dashboard-ui/strings/es-ar.json
+++ b/dashboard-ui/strings/es-ar.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/es-es.json b/dashboard-ui/strings/es-es.json
index 8b9a079f92..7d67ef214d 100644
--- a/dashboard-ui/strings/es-es.json
+++ b/dashboard-ui/strings/es-es.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/es-mx.json b/dashboard-ui/strings/es-mx.json
index 4fed447045..c17d5d308e 100644
--- a/dashboard-ui/strings/es-mx.json
+++ b/dashboard-ui/strings/es-mx.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Ruta de intros de Codec:",
"LabelCodecIntrosPathHelp": "Carpeta que contiene archivos de video. Si un nombre de archivo de video de entrada coincide con el c\u00f3dec de video, c\u00f3dec de audio, perf\u00edl de audio, o una etiqueta, entonces se reproducir\u00e1 antes de la funci\u00f3n principal.",
"OptionConvertRecordingsToStreamingFormat": "Convertir autom\u00e1ticamente las grabaciones a un formato amigable para transmisi\u00f3n",
- "OptionConvertRecordingsToStreamingFormatHelp": "Las grabaciones ser\u00e1n convertidas en tiempo real a MP4 o MKV para una f\u00e1cil reproducci\u00f3n en sus dispositivos.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Las grabaciones ser\u00e1n convertidas en tiempo real a MKV para una f\u00e1cil reproducci\u00f3n en sus dispositivos.",
"FeatureRequiresEmbyPremiere": "Esta caracter\u00edstica requiere de una suscripci\u00f3n activa de Emby Premiere.",
"FileExtension": "Extensi\u00f3n del archivo",
"OptionPlayNextEpisodeAutomatically": "Reproducir el siguiente episodio autom\u00e1ticamente",
diff --git a/dashboard-ui/strings/fa.json b/dashboard-ui/strings/fa.json
index 9dfef4978c..2f1a92fdfc 100644
--- a/dashboard-ui/strings/fa.json
+++ b/dashboard-ui/strings/fa.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/fi.json b/dashboard-ui/strings/fi.json
index 62a1381921..2250a81e1b 100644
--- a/dashboard-ui/strings/fi.json
+++ b/dashboard-ui/strings/fi.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/fr-ca.json b/dashboard-ui/strings/fr-ca.json
index de5cdce0aa..bdc668c683 100644
--- a/dashboard-ui/strings/fr-ca.json
+++ b/dashboard-ui/strings/fr-ca.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/fr.json b/dashboard-ui/strings/fr.json
index 54945a30de..7604acd51c 100644
--- a/dashboard-ui/strings/fr.json
+++ b/dashboard-ui/strings/fr.json
@@ -1401,7 +1401,7 @@
"MessageDirectoryPickerLinuxInstruction": "Pour Linux sur Arch Linux, CentOS, Debian, Fedora, OpenSuse ou Ubuntu, vous devez au moins autoriser l'acc\u00e8s en lecture \u00e0 vos r\u00e9pertoires de stockage pour l'utilisateur Emby .",
"HeaderMenu": "Menu",
"ButtonOpen": "Ouvrir",
- "ButtonShuffle": "Au hasard",
+ "ButtonShuffle": "Al\u00e9atoire",
"ButtonResume": "Reprendre",
"HeaderAudioTracks": "Pistes audio",
"HeaderLibraries": "M\u00e9diath\u00e8ques",
diff --git a/dashboard-ui/strings/gsw.json b/dashboard-ui/strings/gsw.json
index 64169cefc6..48a70c3331 100644
--- a/dashboard-ui/strings/gsw.json
+++ b/dashboard-ui/strings/gsw.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/he.json b/dashboard-ui/strings/he.json
index fb4389ca86..79aa8a63fe 100644
--- a/dashboard-ui/strings/he.json
+++ b/dashboard-ui/strings/he.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/hu.json b/dashboard-ui/strings/hu.json
index 8a6dec79aa..ba10281fb4 100644
--- a/dashboard-ui/strings/hu.json
+++ b/dashboard-ui/strings/hu.json
@@ -148,7 +148,7 @@
"HeaderFilters": "Sz\u0171r\u0151k",
"ButtonFilter": "Sz\u0171r\u0151",
"OptionFavorite": "Kedvencek",
- "OptionLikes": "Kedvel\u00e9sek",
+ "OptionLikes": "Kedveltek",
"OptionDislikes": "Nemtetsz\u00e9sek",
"OptionActors": "Sz\u00edn\u00e9szek",
"OptionGuestStars": "Megh\u00edvott szt\u00e1rok",
@@ -174,8 +174,8 @@
"OptionDescending": "Cs\u00f6kken\u0151",
"OptionRuntime": "J\u00e1t\u00e9kid\u0151",
"OptionReleaseDate": "Megjelen\u00e9s d\u00e1tuma",
- "OptionPlayCount": "Play Count",
- "OptionDatePlayed": "Date Played",
+ "OptionPlayCount": "Lej\u00e1tsz\u00e1sok sz\u00e1ma",
+ "OptionDatePlayed": "Lej\u00e1tsz\u00e1si d\u00e1tum",
"OptionDateAdded": "Hozz\u00e1adva",
"OptionAlbumArtist": "Album Artist",
"OptionArtist": "Artist",
@@ -191,9 +191,9 @@
"OptionThumb": "Thumb",
"OptionThumbCard": "Thumb card",
"OptionBanner": "Banner",
- "OptionCriticRating": "Critic Rating",
+ "OptionCriticRating": "Kritikusok \u00e9rt\u00e9kel\u00e9se",
"OptionVideoBitrate": "Vide\u00f3 bitr\u00e1ta",
- "OptionResumable": "Resumable",
+ "OptionResumable": "Folytathat\u00f3",
"ScheduledTasksHelp": "Click a task to adjust its schedule.",
"TabMyPlugins": "Telep\u00edtett b\u0151v\u00edtm\u00e9nyek",
"TabCatalog": "Katal\u00f3gus",
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "Ez a szolg\u00e1ltat\u00e1s akt\u00edv Emby Premier el\u0151fizet\u00e9st ig\u00e9nyel.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "K\u00f6vetkez\u0151 epiz\u00f3d automatikus lej\u00e1tsz\u00e1sa ",
@@ -1773,7 +1773,7 @@
"HeaderTopPlugins": "Legjobb b\u0151v\u00edtm\u00e9nyek",
"ButtonOther": "Other",
"HeaderSortBy": "Megjelen\u00edt\u00e9s",
- "HeaderSortOrder": "Sort Order",
+ "HeaderSortOrder": "Sorrend",
"ButtonMenu": "Menu",
"ForAdditionalLiveTvOptions": "For additional Live TV providers, click on the Services tab to see the available options.",
"ButtonGuide": "Guide",
@@ -1871,7 +1871,7 @@
"SyncToOtherDevices": "Sync to other devices",
"ManageOfflineDownloads": "Manage offline downloads",
"MessageDownloadScheduled": "Download scheduled",
- "RememberMe": "Remember me",
+ "RememberMe": "Eml\u00e9kezz r\u00e1m",
"HeaderOfflineSync": "Offline Sync",
"LabelMaxAudioFileBitrate": "Max audio file bitrate:",
"LabelMaxAudioFileBitrateHelp": "Audio files with a higher bitrate will be converted by Emby Server. Select a higher value for better quality, or a lower value to conserve local storage space.",
diff --git a/dashboard-ui/strings/id.json b/dashboard-ui/strings/id.json
index 1006d149f1..d5f04fa8ca 100644
--- a/dashboard-ui/strings/id.json
+++ b/dashboard-ui/strings/id.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/it.json b/dashboard-ui/strings/it.json
index c31db8e3cb..2ceae9638c 100644
--- a/dashboard-ui/strings/it.json
+++ b/dashboard-ui/strings/it.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Percorso intro codec:",
"LabelCodecIntrosPathHelp": "Una cartella contenente file video. Se un nome di file video introdotto corrisponde al codec video, al codec audio, al profilo audio oa un tag, verr\u00e0 eseguito prima della funzionalit\u00e0 principale.",
"OptionConvertRecordingsToStreamingFormat": "Converti automaticamente le registrazioni in un formato adatto allo streaming",
- "OptionConvertRecordingsToStreamingFormatHelp": "Le registrazioni saranno convertite istantaneamente ad MP4 o MKV per facilitarne la riproduzione sui tuoi dispositivi.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Le registrazioni saranno convertite istantaneamente ad MKV per facilitarne la riproduzione sui tuoi dispositivi.",
"FeatureRequiresEmbyPremiere": "Questa funzionalit\u00e0 richiede un abbonamento ad Emby Premiere.",
"FileExtension": "Estensione file",
"OptionPlayNextEpisodeAutomatically": "Riproduci automaticamente l'episodio successivo",
@@ -1944,10 +1944,10 @@
"Themes": "Temi",
"LabelTheme": "Tema:",
"LabelDashboardTheme": "Tema dashboard del server:",
- "MessagePremiereStatusGood": "Hai un piano di {0} Emby Premiere e l'utilizzo del tuo dispositivo \u00e8 ben al di sopra del tuo limite.",
- "MessagePremiereStatusClose": "Hai un piano di {0} Emby Premiere, ma l'utilizzo del tuo dispositivo \u00e8 vicino al limite.",
+ "MessagePremiereStatusGood": "Hai un piano {0} di Emby Premiere e l'utilizzo del tuo dispositivo \u00e8 dentro il tuo limite.",
+ "MessagePremiereStatusClose": "Hai un piano {0} di Emby Premiere, ma l'utilizzo del tuo dispositivo \u00e8 vicino al limite.",
"MessagePremiereExtendedPlans": "Considera un {0} piano esteso del dispositivo {1}",
- "MessagePremiereStatusOver": "Hai un piano di {0} Emby Premiere, ma sei al di sopra del tuo limite del dispositivo!",
+ "MessagePremiereStatusOver": "Hai un piano {0} di Emby Premiere, ma sei al di sopra del tuo limite del dispositivo!",
"ListItemPremiereSub": "{0} abbonamento acquistato tramite {2} scade {1}",
"LabelClickToCancel": "Fai clic per annullare questo abbonamento",
"LabelCancelInfo": "Puoi gestire questo abbonamento direttamente con {0}",
diff --git a/dashboard-ui/strings/ko.json b/dashboard-ui/strings/ko.json
index 99d4a2564b..46a5174c17 100644
--- a/dashboard-ui/strings/ko.json
+++ b/dashboard-ui/strings/ko.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/lt-lt.json b/dashboard-ui/strings/lt-lt.json
index 303dc40583..8d4ef551a4 100644
--- a/dashboard-ui/strings/lt-lt.json
+++ b/dashboard-ui/strings/lt-lt.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/ms.json b/dashboard-ui/strings/ms.json
index c98e3acc1b..05a60b64e2 100644
--- a/dashboard-ui/strings/ms.json
+++ b/dashboard-ui/strings/ms.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/ro.json b/dashboard-ui/strings/ro.json
index ab5551a171..3022976a86 100644
--- a/dashboard-ui/strings/ro.json
+++ b/dashboard-ui/strings/ro.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/ru.json b/dashboard-ui/strings/ru.json
index 3672a49896..5c4c9ed537 100644
--- a/dashboard-ui/strings/ru.json
+++ b/dashboard-ui/strings/ru.json
@@ -1089,7 +1089,7 @@
"OptionAllowMediaPlaybackTranscodingHelp": "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430\u043c\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f.",
"TabStreaming": "\u0422\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044f",
"LabelRemoteClientBitrateLimit": "\u041f\u0440\u0435\u0434\u0435\u043b \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438, \u041c\u0431\u0438\u0442\/\u0441:",
- "LabelRemoteClientBitrateLimitHelp": "\u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 \u043f\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u042d\u0442\u043e \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u0447\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u043d\u0430 \u043b\u0435\u0442\u0443 \u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438.",
+ "LabelRemoteClientBitrateLimitHelp": "\u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 \u043f\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u042d\u0442\u043e \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u0447\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043f\u0440\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u0438\u0434\u0435\u043e \u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438.",
"LabelUserRemoteClientBitrateLimitHelp": "\u042d\u0442\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430.",
"LabelConversionCpuCoreLimit": "\u041b\u0438\u043c\u0438\u0442 \u044f\u0434\u0435\u0440 \u0426\u041f:",
"LabelConversionCpuCoreLimitHelp": "\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e \u044f\u0434\u0435\u0440 \u0426\u041f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f.",
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "\u041f\u0443\u0442\u044c \u043a \u0437\u0430\u0441\u0442\u0430\u0432\u043a\u0430\u043c \u043a\u043e\u0434\u0435\u043a\u0430:",
"LabelCodecIntrosPathHelp": "\u041f\u0430\u043f\u043a\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u044b. \u0415\u0441\u043b\u0438 \u0438\u043c\u044f \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b\u0430 \u0437\u0430\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u0434\u0435\u043a\u0443, \u0430\u0443\u0434\u0438\u043e\u043a\u043e\u0434\u0435\u043a\u0443, \u0430\u0443\u0434\u0438\u043e\u043f\u0440\u043e\u0444\u0438\u043b\u044e \u0438\u043b\u0438 \u0442\u0435\u0433\u0443, \u0442\u043e \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0444\u0438\u043b\u044c\u043c\u043e\u043c.",
"OptionConvertRecordingsToStreamingFormat": "\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 \u0444\u043e\u0440\u043c\u0430\u0442",
- "OptionConvertRecordingsToStreamingFormatHelp": "\u0417\u0430\u043f\u0438\u0441\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 MP4 \u0438\u043b\u0438 MKV \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "\u0417\u0430\u043f\u0438\u0441\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 MKV \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445.",
"FeatureRequiresEmbyPremiere": "\u0414\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 Emby Premiere.",
"FileExtension": "\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430",
"OptionPlayNextEpisodeAutomatically": "\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u043f\u0438\u0437\u043e\u0434 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438",
@@ -1948,18 +1948,18 @@
"MessagePremiereStatusClose": "You have a {0} Emby Premiere plan, but your device usage is close to the limit.",
"MessagePremiereExtendedPlans": "Consider an {0}extended device plan{1}",
"MessagePremiereStatusOver": "You have a {0} Emby Premiere plan, but you are over your device limit!",
- "ListItemPremiereSub": "{0} subscription purchased via {2} expires {1}",
- "LabelClickToCancel": "Click to cancel this subscription",
+ "ListItemPremiereSub": "\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0430 {0}, \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0451\u043d\u043d\u043e\u0435 \u0447\u0435\u0440\u0435\u0437 {2} \u0438\u0441\u0442\u0435\u043a\u0430\u0435\u0442 {1}",
+ "LabelClickToCancel": "\u0429\u0451\u043b\u043a\u043d\u0443\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443",
"LabelCancelInfo": "You can manage this subscription directly with {0}",
"LabelAlreadyCanceled": "This subscription has been canceled. Key will remain valid until expiration.",
- "HeaderCancelSub": "Cancel Emby Premiere",
+ "HeaderCancelSub": "\u041e\u0442\u043c\u0435\u043d\u0430 Emby Premiere",
"MessageConfirmSubCancel": "NO, Please don't go... You will miss out on all the great features of Emby Premiere!",
- "ButtonCancelSub": "I know, cancel it anyway",
- "ButtonDontCancelSub": "Keep Emby Premiere",
+ "ButtonCancelSub": "\u042f \u0437\u043d\u0430\u044e, \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c",
+ "ButtonDontCancelSub": "\u041e\u0441\u0442\u0430\u0432\u0438\u0442\u044c Emby Premiere",
"MessageSubCancelReqSent": "An email has been sent to the owner of the key. Please follow the instructions in that email to complete the cancellation of this subscription. We hope to see you back soon!",
"MessageSubCancelError": "Something went wrong trying to cancel. Please send an email to {0} and we'll get you squared away.",
"LabelAlreadyCancelled": "This subscription has been cancelled. You will not be charged again but the features will work until the date above.",
- "AllowOnTheFlySubtitleExtraction": "Allow subtitle extraction on the fly",
+ "AllowOnTheFlySubtitleExtraction": "\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043e\u0432",
"AllowOnTheFlySubtitleExtractionHelp": "Embedded subtitles can be extracted from videos and delivered to Emby apps in plain text in order to help prevent video transcoding. On some systems this can take a long time and cause video playback to stall during the extraction process. Disable this to have embedded subtitles burned in with video transcoding when they are not natively supported by the client device.",
"ButtonStopRecording": "\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c",
"StopRecording": "\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c",
diff --git a/dashboard-ui/strings/sk.json b/dashboard-ui/strings/sk.json
index ddcd17026e..7f6ba97e10 100644
--- a/dashboard-ui/strings/sk.json
+++ b/dashboard-ui/strings/sk.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/sl-si.json b/dashboard-ui/strings/sl-si.json
index c6cdc38cf0..ed75b21409 100644
--- a/dashboard-ui/strings/sl-si.json
+++ b/dashboard-ui/strings/sl-si.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "Uporaba te funkcionalnosti zahteva aktivno Emby Premiere narocnino.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/tr.json b/dashboard-ui/strings/tr.json
index 50d6c20dd6..10bda7d474 100644
--- a/dashboard-ui/strings/tr.json
+++ b/dashboard-ui/strings/tr.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/uk.json b/dashboard-ui/strings/uk.json
index 06eee639fb..96363a8b61 100644
--- a/dashboard-ui/strings/uk.json
+++ b/dashboard-ui/strings/uk.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/vi.json b/dashboard-ui/strings/vi.json
index 9e04c2d3b6..0a216263ae 100644
--- a/dashboard-ui/strings/vi.json
+++ b/dashboard-ui/strings/vi.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/zh-cn.json b/dashboard-ui/strings/zh-cn.json
index cd7ada7c0e..03680e7546 100644
--- a/dashboard-ui/strings/zh-cn.json
+++ b/dashboard-ui/strings/zh-cn.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "\u6587\u4ef6\u540e\u7f00",
"OptionPlayNextEpisodeAutomatically": "\u81ea\u52a8\u64ad\u653e\u4e0b\u4e00\u96c6",
diff --git a/dashboard-ui/strings/zh-hk.json b/dashboard-ui/strings/zh-hk.json
index e60cab6f80..c2019d545d 100644
--- a/dashboard-ui/strings/zh-hk.json
+++ b/dashboard-ui/strings/zh-hk.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
diff --git a/dashboard-ui/strings/zh-tw.json b/dashboard-ui/strings/zh-tw.json
index 9b3ea36087..ae0257c0e0 100644
--- a/dashboard-ui/strings/zh-tw.json
+++ b/dashboard-ui/strings/zh-tw.json
@@ -1188,7 +1188,7 @@
"LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
- "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV for easy playback on your devices.",
+ "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MKV for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically",
From dd1c3b42255a0f585b10668cf867e2777c41e4fb Mon Sep 17 00:00:00 2001
From: Luke Pulverenti
Date: Sat, 2 Sep 2017 16:37:04 -0400
Subject: [PATCH 04/28] 3.2.30.5
---
dashboard-ui/bower_components/hlsjs/dist/hls.min.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dashboard-ui/bower_components/hlsjs/dist/hls.min.js b/dashboard-ui/bower_components/hlsjs/dist/hls.min.js
index fb3f4ab967..8ef0539fcc 100644
--- a/dashboard-ui/bower_components/hlsjs/dist/hls.min.js
+++ b/dashboard-ui/bower_components/hlsjs/dist/hls.min.js
@@ -1 +1 @@
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Hls=e()}}(function(){return function e(t,r,a){function i(s,o){if(!r[s]){if(!t[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(n)return n(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var d=r[s]={exports:{}};t[s][0].call(d.exports,function(e){var r=t[s][1][e];return i(r||e)},d,d.exports,e,t,r,a)}return r[s].exports}for(var n="function"==typeof require&&require,s=0;s0&&this._events[e].length>r&&(this._events[e].warned=!0,console.trace),this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(e,t){function r(){this.removeListener(e,r),a||(a=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var a=!1;return r.listener=t,this.on(e,r),this},a.prototype.removeListener=function(e,t){var r,a,n,o;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],n=r.length,a=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(o=n;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){a=o;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},a.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},a.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},a.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},a.listenerCount=function(e,t){return e.listenerCount(t)}},{}],2:[function(e,t,r){!function(e){var a=/^((?:[^\/;?#]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/;?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var a=this.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");return a.path=o.normalizePath(a.path),o.buildURLFromParts(a)}var n=this.parseURL(t);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return r.alwaysNormalize?(n.path=o.normalizePath(n.path),o.buildURLFromParts(n)):t;var s=this.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=i.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(u.netLoc=s.netLoc,"/"!==n.path[0]))if(n.path){var d=s.path,f=d.substring(0,d.lastIndexOf("/")+1)+n.path;u.path=o.normalizePath(f)}else u.path=s.path,n.params||(u.params=s.params,n.query||(u.query=s.query));return null===u.path&&(u.path=r.alwaysNormalize?o.normalizePath(n.path):n.path),o.buildURLFromParts(u)},parseURL:function(e){var t=a.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(s,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};"object"==typeof r&&"object"==typeof t?t.exports=o:"object"==typeof r?r.URLToolkit=o:e.URLToolkit=o}(this)},{}],3:[function(e,t,r){var a=arguments[3],i=arguments[4],n=arguments[5],s=JSON.stringify;t.exports=function(e,t){function r(e){p[e]=!0;for(var t in i[e][1]){var a=i[e][1][t];p[a]||r(a)}}for(var o,l=Object.keys(n),u=0,d=l.length;u500*r.duration/o){var u=e.levels,f=Math.max(1,n.bw?n.bw/8:1e3*n.loaded/s),h=u[r.level],g=h.realBitrate?Math.max(h.realBitrate,h.bitrate):h.bitrate,v=n.total?n.total:Math.max(n.loaded,Math.round(r.duration*g/8)),p=t.currentTime,y=(v-n.loaded)/f,m=(d.default.bufferInfo(t,p,e.config.maxBufferHole).end-p)/o;if(m<2*r.duration/o&&y>m){var E=void 0,b=void 0;for(b=r.level-1;b>i;b--){var T=u[b].realBitrate?Math.max(u[b].realBitrate,u[b].bitrate):u[b].bitrate;if((E=r.duration*T/(6.4*f))=a;u--){var d=l[u].details,f=d?d.totalduration/d.fragments.length:t,h=!!d&&d.live,g=void 0;g=u<=e?s*r:o*r;var v=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,p=v*f/g;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(g)+"/"+v+"/"+f+"/"+n+"/"+p),g>v&&(!p||h&&!this.bitrateTestDelay||p=0)return g;c.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var v=o?Math.min(o,a.maxStarvationDelay):a.maxStarvationDelay,p=a.abrBandWidthFactor,y=a.abrBandWidthUpFactor;if(0===h){var m=this.bitrateTestDelay;m&&(v=(o?Math.min(o,a.maxLoadingDelay):a.maxLoadingDelay)-m,c.logger.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*v)+" ms"),p=y=1)}return g=this._findBestLevel(s,o,f,i,t,h+v,p,y,r),Math.max(g,0)}}]),t}(u.default);r.default=g},{33:33,34:34,35:35,37:37,52:52,54:54}],6:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r0&&-1===e?(p.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=m.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=m.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=m.STOPPED}},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=m.STOPPED}},{key:"tick",value:function(){1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){var e,t,r,a=this.hls,i=a.config;switch(this.state){case m.ERROR:case m.PAUSED:case m.BUFFER_FLUSHING:break;case m.STARTING:this.state=m.WAITING_TRACK,this.loadedmetadata=!1;break;case m.IDLE:var n=this.tracks;if(!n)break;if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;if(this.loadedmetadata)e=this.media.currentTime;else if(void 0===(e=this.nextLoadPosition))break;var s=this.mediaBuffer?this.mediaBuffer:this.media,o=u.default.bufferInfo(s,e,i.maxBufferHole),d=o.len,c=o.end,h=this.fragPrevious,g=i.maxMaxBufferLength,E=this.audioSwitch,b=this.trackId;if((d_||o.nextStart))return;p.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=_+.05}if(r.initSegment&&!r.initSegment.data)S=r.initSegment;else if(c<=_){if(S=T[0],null!==this.videoTrackCC&&S.cc!==this.videoTrackCC&&(S=(0,y.findFragWithCC)(T,this.videoTrackCC)),r.live&&S.loadIdx&&S.loadIdx===this.fragLoadIdx){var A=o.nextStart?o.nextStart:_;return p.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(A+.05)),void(this.media.currentTime=A+.05)}}else{var L=void 0,w=i.maxFragLookUpTolerance,D=h?T[h.sn-T[0].sn+1]:void 0,O=function(e){var t=Math.min(w,e.duration);return e.start+e.duration-t<=c?1:e.start-t>c&&e.start?-1:0};cR-w&&(w=0),L=D&&!O(D)?D:l.default.search(T,O)):L=T[k-1],L&&(S=L,_=L.start,h&&S.level===h.level&&S.sn===h.sn&&(S.snI&&Math.abs(this.fragLoadIdx-S.loadIdx)=C||x)&&(p.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=m.IDLE);break;case m.WAITING_INIT_PTS:var F=this.videoTrackCC;if(void 0===this.initPTS[F])break;var M=this.waitingFragment;if(M){var N=M.frag.cc;F!==N?(t=this.tracks[this.trackId]).details&&t.details.live&&(p.logger.warn("Waiting fragment CC ("+N+") does not match video track CC ("+F+")"),this.waitingFragment=null,this.state=m.IDLE):(this.state=m.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=m.IDLE;break;case m.STOPPED:case m.FRAG_LOADING:case m.PARSING:case m.PARSED:case m.ENDED:}}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(p.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.tracks;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){this.state===m.ENDED&&(this.state=m.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaEnded",value:function(){this.startPosition=this.lastCurrentTime=0}},{key:"onAudioTracksUpdated",value:function(e){p.logger.log("audio tracks updated"),this.tracks=e.audioTracks}},{key:"onAudioTrackSwitching",value:function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=m.PAUSED,this.waitingFragment=null,t?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=m.IDLE,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold)),this.tick()}},{key:"onAudioTrackLoaded",value:function(e){var t=e.details,r=e.id,a=this.tracks[r],i=t.totalduration,n=0;if(p.logger.log("track "+r+" loaded ["+t.startSN+","+t.endSN+"],duration:"+i),t.live){var s=a.details;s&&t.fragments.length>0?(h.default.mergeDetails(s,t),n=t.fragments[0].start,t.PTSKnown?p.logger.log("live audio playlist sliding:"+n.toFixed(3)):p.logger.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,p.logger.log("live audio playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(a.details=t,!this.startFragRequested){if(-1===this.startPosition){var o=t.startTimeOffset;isNaN(o)?this.startPosition=0:(p.logger.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o)}this.nextLoadPosition=this.startPosition}this.state===m.WAITING_TRACK&&(this.state=m.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===m.KEY_LOADING&&(this.state=m.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent,r=e.frag;if(this.state===m.FRAG_LOADING&&t&&"audio"===r.type&&r.level===t.level&&r.sn===t.sn){var a=this.tracks[this.trackId],i=a.details,n=i.totalduration,s=t.level,o=t.sn,l=t.cc,u=this.config.defaultAudioCodec||a.audioCodec||"mp4a.40.2",c=this.stats=e.stats;if("initSegment"===o)this.state=m.IDLE,c.tparsed=c.tbuffered=performance.now(),i.initSegment.data=e.payload,this.hls.trigger(f.default.FRAG_BUFFERED,{stats:c,frag:t,id:"audio"}),this.tick();else{this.state=m.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new d.default(this.hls,"audio"));var h=this.initPTS[l],g=i.initSegment?i.initSegment.data:[];if(i.initSegment||void 0!==h){this.pendingBuffering=!0,p.logger.log("Demuxing "+o+" of ["+i.startSN+" ,"+i.endSN+"],track "+s);this.demuxer.push(e.payload,g,u,null,t,n,!1,h)}else p.logger.log("unknown video PTS for continuity counter "+l+", waiting for video PTS before demuxing audio frag "+o+" of ["+i.startSN+" ,"+i.endSN+"],track "+s),this.waitingFragment=e,this.state=m.WAITING_INIT_PTS}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent,r=e.frag;if(t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===m.PARSING){var a=e.tracks,i=void 0;if(a.video&&delete a.video,i=a.audio){i.levelCodec=i.codec,i.id=e.id,this.hls.trigger(f.default.BUFFER_CODECS,a),p.logger.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var n=i.initSegment;if(n){var s={type:"audio",data:n,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[s]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(f.default.BUFFER_APPENDING,s))}this.tick()}}}},{key:"onFragParsingData",value:function(e){var t=this,r=this.fragCurrent,a=e.frag;if(r&&"audio"===e.id&&"audio"===e.type&&a.sn===r.sn&&a.level===r.level&&this.state===m.PARSING){var i=this.trackId,n=this.tracks[i],s=this.hls;isNaN(e.endPTS)&&(e.endPTS=e.startPTS+r.duration,e.endDTS=e.startDTS+r.duration),p.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),h.default.updateFragPTSDTS(n.details,r,e.startPTS,e.endPTS);var o=this.audioSwitch,l=this.media,u=!1;if(o&&l)if(l.readyState){var d=l.currentTime;p.logger.log("switching audio track : currentTime:"+d),d>=e.startPTS&&(p.logger.log("switching audio track : flushing all audio"),this.state=m.BUFFER_FLUSHING,s.trigger(f.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),u=!0,this.audioSwitch=!1,s.trigger(f.default.AUDIO_TRACK_SWITCHED,{id:i}))}else this.audioSwitch=!1,s.trigger(f.default.AUDIO_TRACK_SWITCHED,{id:i});var c=this.pendingData;this.audioSwitch||([e.data1,e.data2].forEach(function(t){t&&t.length&&c.push({type:e.type,data:t,parent:"audio",content:"data"})}),!u&&c.length&&(c.forEach(function(e){t.state===m.PARSING&&(t.pendingBuffering=!0,t.hls.trigger(f.default.BUFFER_APPENDING,e))}),this.pendingData=[],this.appended=!0)),this.tick()}}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent,r=e.frag;t&&"audio"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===m.PARSING&&(this.stats.tparsed=performance.now(),this.state=m.PARSED,this._checkAppendedParsed())}},{key:"onBufferCreated",value:function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0)}},{key:"onBufferAppended",value:function(e){if("audio"===e.parent){var t=this.state;t!==m.PARSING&&t!==m.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}}},{key:"_checkAppendedParsed",value:function(){if(!(this.state!==m.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,r=this.hls;if(e){this.fragPrevious=e,t.tbuffered=performance.now(),r.trigger(f.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var a=this.mediaBuffer?this.mediaBuffer:this.media;p.logger.log("audio buffered : "+g.default.toString(a.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(f.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=m.IDLE}this.tick()}}},{key:"onError",value:function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!e.fatal){var r=this.fragLoadError;r?r++:r=1;var a=this.config;if(r<=a.fragLoadingMaxRetry){this.fragLoadError=r,t.loadCounter=0;var i=Math.min(Math.pow(2,r-1)*a.fragLoadingRetryDelay,a.fragLoadingMaxRetryTimeout);p.logger.warn("audioStreamController: frag loading failed, retry in "+i+" ms"),this.retryDate=performance.now()+i,this.state=m.FRAG_LOADING_WAITING_RETRY}else p.logger.error("audioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=m.ERROR}break;case v.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case v.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==m.ERROR&&(this.state=e.fatal?m.ERROR:m.IDLE,p.logger.warn("audioStreamController: "+e.details+" while loading frag,switch to "+this.state+" state ..."));break;case v.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===m.PARSING||this.state===m.PARSED)){var n=this.mediaBuffer,s=this.media.currentTime;if(n&&u.default.isBuffered(n,s)&&u.default.isBuffered(n,s+.5)){var o=this.config;o.maxMaxBufferLength>=o.maxBufferLength&&(o.maxMaxBufferLength/=2,p.logger.warn("audio:reduce max buffer length to "+o.maxMaxBufferLength+"s"),this.fragLoadIdx+=2*o.fragLoadingLoopThreshold),this.state=m.IDLE}else p.logger.warn("buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=m.BUFFER_FLUSHING,this.hls.trigger(f.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}}},{key:"onBufferFlushed",value:function(){var e=this,t=this.pendingData;t&&t.length?(p.logger.log("appending pending audio data on Buffer Flushed"),t.forEach(function(t){e.hls.trigger(f.default.BUFFER_APPENDING,t)}),this.appended=!0,this.pendingData=[],this.state=m.PARSED):(this.state=m.IDLE,this.fragPrevious=null,this.tick())}},{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,p.logger.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}]),t}(c.default);r.default=E},{25:25,33:33,34:34,35:35,37:37,38:38,48:48,51:51,54:54,55:55}],7:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){this.updateTrack(this.trackId)}},{key:"onError",value:function(e){e.fatal&&e.type===f.ErrorTypes.NETWORK_ERROR&&this.cleanTimer()}},{key:"onManifestLoading",value:function(){this.tracks=[],this.trackId=-1}},{key:"onManifestLoaded",value:function(e){var t=this,r=e.audioTracks||[],a=!1;this.tracks=r,this.hls.trigger(l.default.AUDIO_TRACKS_UPDATED,{audioTracks:r});var i=0;r.forEach(function(e){if(e.default&&!a)return t.audioTrack=i,void(a=!0);i++}),!1===a&&r.length&&(d.logger.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)}},{key:"onAudioTrackLoaded",value:function(e){e.id=0&&e=0&&e.1){var i=a.updating;try{a.abort()}catch(e){i=!0,d.logger.warn("can not abort audio buffer: "+e)}i?this.audioTimestampOffset=e.start:(d.logger.warn("change mpeg audio timestamp offset from "+a.timestampOffset+" to "+e.start),a.timestampOffset=e.start)}}}},{key:"onManifestParsed",value:function(e){var t=e.audio,r=e.video||e.levels.length&&e.audio,a=0;e.altAudio&&(t||r)&&(a=(t?1:0)+(r?1:0),d.logger.log(a+" sourceBuffer(s) expected")),this.sourceBufferNb=a}},{key:"onMediaAttaching",value:function(e){var t=this.media=e.media;if(t){var r=this.mediaSource=new MediaSource;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),r.addEventListener("sourceopen",this.onmso),r.addEventListener("sourceended",this.onmse),r.addEventListener("sourceclose",this.onmsc),t.src=URL.createObjectURL(r)}}},{key:"onMediaDetaching",value:function(){d.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){d.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this.onmso),e.removeEventListener("sourceended",this.onmse),e.removeEventListener("sourceclose",this.onmsc),this.media&&(URL.revokeObjectURL(this.media.src),this.media.removeAttribute("src"),this.media.load()),this.mediaSource=null,this.media=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(l.default.MEDIA_DETACHED)}},{key:"onMediaSourceOpen",value:function(){d.logger.log("media source opened"),this.hls.trigger(l.default.MEDIA_ATTACHED,{media:this.media});var e=this.mediaSource;e&&e.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()}},{key:"checkPendingTracks",value:function(){var e=this.pendingTracks,t=Object.keys(e).length;t&&(this.sourceBufferNb<=t||0===this.sourceBufferNb)&&(this.createSourceBuffers(e),this.pendingTracks={},this.doAppending())}},{key:"onMediaSourceClose",value:function(){d.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){d.logger.log("media source ended")}},{key:"onSBUpdateEnd",value:function(){if(this.audioTimestampOffset){var e=this.sourceBuffer.audio;d.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+this.audioTimestampOffset),e.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var t=this.parent,r=this.segments.reduce(function(e,r){return r.parent===t?e+1:e},0);this.hls.trigger(l.default.BUFFER_APPENDED,{parent:t,pending:r}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()}},{key:"onSBUpdateError",value:function(e){d.logger.error("sourceBuffer error:",e),this.hls.trigger(l.default.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{key:"onBufferReset",value:function(){var e=this.sourceBuffer;for(var t in e){var r=e[t];try{this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this.onsbue),r.removeEventListener("error",this.onsbe)}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}},{key:"onBufferCodecs",value:function(e){if(0===Object.keys(this.sourceBuffer).length){for(var t in e)this.pendingTracks[t]=e[t];var r=this.mediaSource;r&&"open"===r.readyState&&this.checkPendingTracks()}}},{key:"createSourceBuffers",value:function(e){var t=this.sourceBuffer,r=this.mediaSource;for(var a in e)if(!t[a]){var i=e[a],n=i.levelCodec||i.codec,s=i.container+";codecs="+n;d.logger.log("creating sourceBuffer("+s+")");try{var o=t[a]=r.addSourceBuffer(s);o.addEventListener("updateend",this.onsbue),o.addEventListener("error",this.onsbe),this.tracks[a]={codec:n,container:i.container},i.buffer=o}catch(e){d.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(l.default.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:s})}}this.hls.trigger(l.default.BUFFER_CREATED,{tracks:e})}},{key:"onBufferAppending",value:function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())}},{key:"onBufferAppendFail",value:function(e){d.logger.error("sourceBuffer error:",e.event),this.hls.trigger(l.default.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{key:"onBufferEos",value:function(e){var t=this.sourceBuffer,r=e.type;for(var a in t)r&&a!==r||t[a].ended||(t[a].ended=!0,d.logger.log(a+" sourceBuffer now EOS"));this.checkEos()}},{key:"checkEos",value:function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var r in e){var a=e[r];if(!a.ended)return;if(a.updating)return void(this._needsEos=!0)}d.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){d.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1}},{key:"onBufferFlushing",value:function(e){this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}),this.flushBufferCounter=0,this.doFlush()}},{key:"onLevelUpdated",value:function(e){var t=e.details;0!==t.fragments.length&&(this._levelDuration=t.totalduration+t.fragments[0].start,this.updateMediaElementDuration())}},{key:"updateMediaElementDuration",value:function(){var e=this.media,t=this.mediaSource,r=this.sourceBuffer,a=this._levelDuration;if(null!==a&&e&&t&&r&&0!==e.readyState&&"open"===t.readyState){for(var i in r)if(r[i].updating)return;null===this._msDuration&&(this._msDuration=t.duration);var n=e.duration;(a>this._msDuration&&a>n||n===1/0||isNaN(n))&&(d.logger.log("Updating mediasource duration to "+a.toFixed(3)),this._msDuration=t.duration=a)}}},{key:"doFlush",value:function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,r=this.sourceBuffer;try{for(var a in r)t+=r[a].buffered.length}catch(e){d.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(l.default.BUFFER_FLUSHED)}}},{key:"doAppending",value:function(){var e=this.hls,t=this.sourceBuffer,r=this.segments;if(Object.keys(t).length){if(this.media.error)return this.segments=[],void d.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(r&&r.length){var a=r.shift();try{var i=t[a.type];i?i.updating?r.unshift(a):(i.ended=!1,this.parent=a.parent,i.appendBuffer(a.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(t){d.logger.error("error while trying to append buffer:"+t.message),r.unshift(a);var n={type:f.ErrorTypes.MEDIA_ERROR,parent:a.parent};if(22===t.code)return this.segments=[],n.details=f.ErrorDetails.BUFFER_FULL_ERROR,n.fatal=!1,void e.trigger(l.default.ERROR,n);if(this.appendError?this.appendError++:this.appendError=1,n.details=f.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>e.config.appendErrorMaxRetry)return d.logger.log("fail "+e.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),r=[],n.fatal=!0,void e.trigger(l.default.ERROR,n);n.fatal=!1,e.trigger(l.default.ERROR,n)}}}}},{key:"flushBuffer",value:function(e,t,r){var a,i,n,s,o,l,u=this.sourceBuffer;if(Object.keys(u).length){if(d.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+e+"/"+t),this.flushBufferCounter.5)return this.flushBufferCounter++,d.logger.log("flush "+f+" ["+o+","+l+"], of ["+n+","+s+"], pos:"+this.media.currentTime),a.remove(o,l),!1}catch(e){d.logger.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else d.logger.warn("abort flushing too many retries");d.logger.log("buffer flushed")}return!0}}]),t}(u.default);r.default=c},{33:33,34:34,35:35,54:54}],9:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;rthis.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}},{key:"getMaxLevel",value:function(e){var r=this;if(!this.levels)return-1;var a=this.levels.filter(function(a,i){return t.isLevelAllowed(i,r.restrictedLevels)&&i<=e});return t.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)}},{key:"mediaWidth",get:function(){var e=void 0,r=this.media;return r&&(e=r.width||r.clientWidth||r.offsetWidth,e*=t.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e=void 0,r=this.media;return r&&(e=r.height||r.clientHeight||r.offsetHeight,e*=t.contentScaleFactor),e}}],[{key:"isLevelAllowed",value:function(e){return-1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).indexOf(e)}},{key:"getMaxLevelByMediaSize",value:function(e,t,r){if(!e||e&&!e.length)return-1;for(var a=e.length-1,i=0;i=t||n.height>=r)&&function(e,t){return!t||e.width!==t.width||e.height!==t.height}(n,e[i+1])){a=i;break}}return a}},{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}}]),t}(a(e(34)).default);r.default=u},{34:34,35:35}],10:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r0&&n>u.config.fpsDroppedMonitoringThreshold*s){var f=u.currentLevel;d.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+f),f>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=f)&&(f-=1,u.trigger(l.default.FPS_DROP_LEVEL_CAPPING,{level:f,droppedLevel:u.currentLevel}),u.autoLevelCapping=f,u.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=r,this.lastDecodedFrames=t}}},{key:"checkFPSInterval",value:function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}]),t}(u.default);r.default=f},{34:34,35:35,54:54}],11:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r0})}else o.trigger(l.default.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:o.url,reason:"no level with compatible codecs found in manifest"})}},{key:"setLevelInternal",value:function(e){var t=this._levels,r=this.hls;if(e>=0&&e1&&i.loadErrore&&(this._level===e&&void 0!==t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this._manualLevel},set:function(e){this._manualLevel=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this._manualLevel?this._manualLevel:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this._manualLevel&&(this.hls.nextAutoLevel=e)}}]),t}(u.default);r.default=h},{33:33,34:34,35:35,37:37,54:54}],13:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r0&&-1===e&&(p.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=y.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=y.STOPPED}},{key:"stopLoad",value:function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=y.STOPPED,this.forceStartLoad=!1}},{key:"tick",value:function(){1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){switch(this.state){case y.ERROR:break;case y.BUFFER_FLUSHING:this.fragLoadError=0;break;case y.IDLE:this._doTickIdle();break;case y.WAITING_LEVEL:var e=this.levels[this.level];e&&e.details&&(this.state=y.IDLE);break;case y.FRAG_LOADING_WAITING_RETRY:var t=performance.now(),r=this.retryDate;(!r||t>=r||this.media&&this.media.seeking)&&(p.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=y.IDLE);break;case y.ERROR:case y.STOPPED:case y.FRAG_LOADING:case y.PARSING:case y.PARSED:case y.ENDED:}this._checkBuffer(),this._checkFragmentChanged()}},{key:"_doTickIdle",value:function(){var e=this.hls,t=e.config,r=this.media;if(void 0===this.levelLastLoaded||r||!this.startFragRequested&&t.startFragPrefetch){var a=void 0;a=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var i=e.nextLoadLevel,n=this.levels[i];if(n){var s=n.bitrate,o=void 0;o=s?Math.max(8*t.maxBufferSize/s,t.maxBufferLength):t.maxBufferLength,o=Math.min(o,t.maxMaxBufferLength);var l=u.default.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,a,t.maxBufferHole),d=l.len;if(!(d>=o)){p.logger.trace("buffer length of "+d.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=i;var c=n.details;if(void 0===c||c.live&&this.levelLastLoaded!==i)this.state=y.WAITING_LEVEL;else{var h=this.fragPrevious;if(!c.live&&h&&h.sn===c.endSN&&d&&!l.nextStart&&Math.min(r.duration,h.start+h.duration)-Math.max(l.end,h.start)<=Math.max(.2,h.duration)){var g={};return this.altAudio&&(g.type="video"),this.hls.trigger(f.default.BUFFER_EOS,g),void(this.state=y.ENDED)}this._fetchPayloadOrEos(a,l,c)}}}}}},{key:"_fetchPayloadOrEos",value:function(e,t,r){var a=this.fragPrevious,i=this.level,n=r.fragments,s=n.length;if(0!==s){var o=n[0].start,l=n[s-1].start+n[s-1].duration,u=t.end,d=void 0;if(r.initSegment&&!r.initSegment.data)d=r.initSegment;else if(r.live){var f=this.config.initialLiveManifestSize;if(sc&&(u.currentTime=c),this.nextLoadPosition=c}if(e.PTSKnown&&t>a&&u&&u.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(i){var h=i.sn+1;if(h>=e.startSN&&h<=e.endSN){var g=n[h-e.startSN];i.cc===g.cc&&(d=g,p.logger.log("live playlist, switching playlist, load frag with next SN: "+d.sn))}d||(d=l.default.search(n,function(e){return i.cc-e.cc}))&&p.logger.log("live playlist, switching playlist, load frag with same CC: "+d.sn)}d||(d=n[Math.min(s-1,Math.round(s/2))],p.logger.log("live playlist, switching playlist, unknown, load middle frag : "+d.sn))}return d}},{key:"_findFragment",value:function(e,t,r,a,i,n,s){var o=this.hls.config,u=void 0,d=void 0,f=o.maxFragLookUpTolerance,c=t?a[t.sn-a[0].sn+1]:void 0,h=function(e){var t=Math.min(f,e.duration);return e.start+e.duration-t<=i?1:e.start-t>i&&e.start?-1:0};if(in-f&&(f=0),d=c&&!h(c)?c:l.default.search(a,h)):d=a[r-1],d){var g=(u=d).sn-s.startSN,v=t&&u.level===t.level,y=a[g-1],m=a[g+1];if(t&&u.sn===t.sn)if(v&&!u.backtracked)if(u.sno.maxBufferHole&&t.dropped&&g?(u=y,p.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),t.loadCounter--):(u=m,p.logger.log("SN just loaded, load next one: "+u.sn))}else u=null;else u.backtracked&&(m&&m.backtracked?(p.logger.warn("Already backtracked from fragment "+m.sn+", will not backtrack to fragment "+u.sn+". Loading fragment "+m.sn),u=m):(p.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),u.dropped=0,y?(y.loadCounter&&y.loadCounter--,(u=y).backtracked=!0):g&&(u=null)))}return u}},{key:"_loadFragmentOrKey",value:function(e,t,r,a,i){var n=this.hls,s=n.config;if(!e.decryptdata||null==e.decryptdata.uri||null!=e.decryptdata.key){if(p.logger.log("Loading "+e.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+t+", currentTime:"+a.toFixed(3)+",bufferEnd:"+i.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,e.loadCounter){e.loadCounter++;var o=s.fragLoadingLoopThreshold;if(e.loadCounter>o&&Math.abs(this.fragLoadIdx-e.loadIdx)t.endPTS?1:0})}},{key:"followingBufferedFrag",value:function(e){return e?this.getBufferedFrag(e.endPTS+.5):null}},{key:"_checkFragmentChanged",value:function(){var e,t,r=this.media;if(r&&r.readyState&&!1===r.seeking&&((t=r.currentTime)>r.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=t),u.default.isBuffered(r,t)?e=this.getBufferedFrag(t):u.default.isBuffered(r,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var a=e;if(a!==this.fragPlaying){this.hls.trigger(f.default.FRAG_CHANGED,{frag:a});var i=a.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(f.default.LEVEL_SWITCHED,{level:i}),this.fragPlaying=a}}}},{key:"immediateLevelSwitch",value:function(){if(p.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e=this.media,t=void 0;e?(t=e.paused,e.pause()):t=!0,this.previouslyPaused=t}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}},{key:"immediateLevelSwitchEnd",value:function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,u.default.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())}},{key:"nextLevelSwitch",value:function(){var e=this.media;if(e&&e.readyState){var t=void 0,r=void 0,a=void 0;if(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,(r=this.getBufferedFrag(e.currentTime))&&r.startPTS>1&&this.flushMainBuffer(0,r.startPTS-1),e.paused)t=0;else{var i=this.hls.nextLoadLevel,n=this.levels[i],s=this.fragLastKbps;t=s&&this.fragCurrent?this.fragCurrent.duration*n.bitrate/(1e3*s)+1:0}if((a=this.getBufferedFrag(e.currentTime+t))&&(a=this.followingBufferedFrag(a))){var o=this.fragCurrent;o&&o.loader&&o.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(a.maxStartPTS,Number.POSITIVE_INFINITY)}}}},{key:"flushMainBuffer",value:function(e,t){this.state=y.BUFFER_FLUSHING;var r={startOffset:e,endOffset:t};this.altAudio&&(r.type="video"),this.hls.trigger(f.default.BUFFER_FLUSHING,r)}},{key:"onMediaAttached",value:function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition)}},{key:"onMediaDetaching",value:function(){var e=this.media;e&&e.ended&&(p.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach(function(e){e.details&&e.details.fragments.forEach(function(e){e.loadCounter=void 0,e.backtracked=void 0})}),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){var e=this.media,t=e?e.currentTime:void 0,r=this.config;isNaN(t)||p.logger.log("media seeking to "+t.toFixed(3));var a=this.mediaBuffer?this.mediaBuffer:e,i=u.default.bufferInfo(a,t,this.config.maxBufferHole);if(this.state===y.FRAG_LOADING){var n=this.fragCurrent;if(0===i.len&&n){var s=r.maxFragLookUpTolerance,o=n.start-s,l=n.start+n.duration+s;tl?(n.loader&&(p.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=y.IDLE):p.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===y.ENDED&&(0===i.len&&(this.fragPrevious=0),this.state=y.IDLE);e&&(this.lastCurrentTime=t),this.state!==y.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*r.fragLoadingLoopThreshold),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=t),this.tick()}},{key:"onMediaSeeked",value:function(){var e=this.media,t=e?e.currentTime:void 0;isNaN(t)||p.logger.log("media seeked to "+t.toFixed(3)),this.tick()}},{key:"onMediaEnded",value:function(){p.logger.log("media ended"),this.startPosition=this.lastCurrentTime=0}},{key:"onManifestLoading",value:function(){p.logger.log("trigger BUFFER_RESET"),this.hls.trigger(f.default.BUFFER_RESET),this._bufferedFrags=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0}},{key:"onManifestParsed",value:function(e){var t,r=!1,a=!1;e.levels.forEach(function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(r=!0),-1!==t.indexOf("mp4a.40.5")&&(a=!0))}),this.audioCodecSwitch=r&&a,this.audioCodecSwitch&&p.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startLevelLoaded=!1,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)}},{key:"onLevelLoaded",value:function(e){var t=e.details,r=e.level,a=this.levels[r],i=t.totalduration,n=0;if(p.logger.log("level "+r+" loaded ["+t.startSN+","+t.endSN+"],duration:"+i),this.levelLastLoaded=r,t.live){var s=a.details;s&&t.fragments.length>0?(h.default.mergeDetails(s,t),n=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(n,s),t.PTSKnown?p.logger.log("live playlist sliding:"+n.toFixed(3)):p.logger.log("live playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,p.logger.log("live playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(a.details=t,this.hls.trigger(f.default.LEVEL_UPDATED,{details:t,level:r}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var o=t.startTimeOffset;isNaN(o)?t.live?(this.startPosition=this.computeLivePosition(n,t),p.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(o<0&&(p.logger.log("negative start time offset "+o+", count from end of last fragment"),o=n+i+o),p.logger.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===y.WAITING_LEVEL&&(this.state=y.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===y.KEY_LOADING&&(this.state=y.IDLE,this.tick())}},{key:"onFragLoaded",value:function(e){var t=this.fragCurrent,r=e.frag;if(this.state===y.FRAG_LOADING&&t&&"main"===r.type&&r.level===t.level&&r.sn===t.sn){var a=e.stats,i=this.levels[t.level],n=i.details;if(p.logger.log("Loaded "+t.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+t.level),this.bitrateTest=!1,this.stats=a,!0===r.bitrateTest&&this.hls.nextLoadLevel)this.state=y.IDLE,this.startFragRequested=!1,a.tparsed=a.tbuffered=performance.now(),this.hls.trigger(f.default.FRAG_BUFFERED,{stats:a,frag:t,id:"main"}),this.tick();else if("initSegment"===r.sn)this.state=y.IDLE,a.tparsed=a.tbuffered=performance.now(),n.initSegment.data=e.payload,this.hls.trigger(f.default.FRAG_BUFFERED,{stats:a,frag:t,id:"main"}),this.tick();else{this.state=y.PARSING;var s=n.totalduration,o=t.level,l=t.sn,u=this.config.defaultAudioCodec||i.audioCodec;this.audioCodecSwap&&(p.logger.log("swapping playlist audio codec"),void 0===u&&(u=this.lastAudioCodec),u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,p.logger.log("Parsing "+l+" of ["+n.startSN+" ,"+n.endSN+"],level "+o+", cc "+t.cc);var c=this.demuxer;c||(c=this.demuxer=new d.default(this.hls,"main"));var h=this.media,g=!(h&&h.seeking)&&(n.PTSKnown||!n.live),v=n.initSegment?n.initSegment.data:[];c.push(e.payload,v,u,i.videoCodec,t,s,g,void 0)}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(e){var t=this.fragCurrent,r=e.frag;if(t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===y.PARSING){var a,i,n=e.tracks;if(n.audio&&this.altAudio&&delete n.audio,i=n.audio){var s=this.levels[this.level].audioCodec,o=navigator.userAgent.toLowerCase();s&&this.audioCodecSwap&&(p.logger.log("swapping playlist audio codec"),s=-1!==s.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&-1===o.indexOf("firefox")&&(s="mp4a.40.5"),-1!==o.indexOf("android")&&"audio/mpeg"!==i.container&&(s="mp4a.40.2",p.logger.log("Android: force audio codec to "+s)),i.levelCodec=s,i.id=e.id}(i=n.video)&&(i.levelCodec=this.levels[this.level].videoCodec,i.id=e.id),this.hls.trigger(f.default.BUFFER_CODECS,n);for(a in n){i=n[a],p.logger.log("main track:"+a+",container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var l=i.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(f.default.BUFFER_APPENDING,{type:a,data:l,parent:"main",content:"initSegment"}))}this.tick()}}},{key:"onFragParsingData",value:function(e){var t=this,r=this.fragCurrent,a=e.frag;if(r&&"main"===e.id&&a.sn===r.sn&&a.level===r.level&&("audio"!==e.type||!this.altAudio)&&this.state===y.PARSING){var i=this.levels[this.level],n=r;if(isNaN(e.endPTS)&&(e.endPTS=e.startPTS+r.duration,e.endDTS=e.startDTS+r.duration),p.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0)),"video"===e.type)if(n.dropped=e.dropped,n.dropped){if(!n.backtracked)return p.logger.warn("missing video frame(s), backtracking fragment"),n.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=y.IDLE,this.fragPrevious=n,void this.tick();p.logger.warn("Already backtracked on this fragment, appending with the gap")}else n.backtracked=!1;var s=h.default.updateFragPTSDTS(i.details,n,e.startPTS,e.endPTS,e.startDTS,e.endDTS),o=this.hls;o.trigger(f.default.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:s,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach(function(r){r&&r.length&&t.state===y.PARSING&&(t.appended=!0,t.pendingBuffering=!0,o.trigger(f.default.BUFFER_APPENDING,{type:e.type,data:r,parent:"main",content:"data"}))}),this.tick()}}},{key:"onFragParsed",value:function(e){var t=this.fragCurrent,r=e.frag;t&&"main"===e.id&&r.sn===t.sn&&r.level===t.level&&this.state===y.PARSING&&(this.stats.tparsed=performance.now(),this.state=y.PARSED,this._checkAppendedParsed())}},{key:"onAudioTrackSwitching",value:function(e){var t=!!e.url,r=e.id;if(!t){if(this.mediaBuffer!==this.media){p.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;a.loader&&(p.logger.log("switching to main audio track, cancel main fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=y.IDLE}var i=this.hls;i.trigger(f.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),i.trigger(f.default.AUDIO_TRACK_SWITCHED,{id:r}),this.altAudio=!1}}},{key:"onAudioTrackSwitched",value:function(e){var t=e.id,r=!!this.hls.audioTracks[t].url;if(r){var a=this.videoBuffer;a&&this.mediaBuffer!==a&&(p.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=a)}this.altAudio=r,this.tick()}},{key:"onBufferCreated",value:function(e){var t=e.tracks,r=void 0,a=void 0,i=!1;for(var n in t){var s=t[n];"main"===s.id?(a=n,r=s,"video"===n&&(this.videoBuffer=t[n].buffer)):i=!0}i&&r?(p.logger.log("alternate track found, use "+a+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}},{key:"onBufferAppended",value:function(e){if("main"===e.parent){var t=this.state;t!==y.PARSING&&t!==y.PARSED||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}}},{key:"_checkAppendedParsed",value:function(){if(!(this.state!==y.PARSED||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;p.logger.log("main buffered : "+g.default.toString(t.buffered));var r=this._bufferedFrags.filter(function(e){return u.default.isBuffered(t,(e.startPTS+e.endPTS)/2)});r.push(e),this._bufferedFrags=r.sort(function(e,t){return e.startPTS-t.startPTS}),this.fragPrevious=e;var a=this.stats;a.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*a.total/(a.tbuffered-a.tfirst)),this.hls.trigger(f.default.FRAG_BUFFERED,{stats:a,frag:e,id:"main"}),this.state=y.IDLE}this.tick()}}},{key:"onError",value:function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var r=this.media,a=r&&u.default.isBuffered(r,r.currentTime)&&u.default.isBuffered(r,r.currentTime+.5);switch(e.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal){var i=this.fragLoadError;i?i++:i=1;var n=this.config;if(i<=n.fragLoadingMaxRetry||a||t.autoLevel&&t.level){this.fragLoadError=i,t.loadCounter=0;var s=Math.min(Math.pow(2,i-1)*n.fragLoadingRetryDelay,n.fragLoadingMaxRetryTimeout);p.logger.warn("mediaController: frag loading failed, retry in "+s+" ms"),this.retryDate=performance.now()+s,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.state=y.FRAG_LOADING_WAITING_RETRY}else p.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=y.ERROR}break;case v.ErrorDetails.FRAG_LOOP_LOADING_ERROR:e.fatal||(a?(this._reduceMaxBufferLength(t.duration),this.state=y.IDLE):t.autoLevel&&0!==t.level||(e.fatal=!0,this.state=y.ERROR));break;case v.ErrorDetails.LEVEL_LOAD_ERROR:case v.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==y.ERROR&&(e.fatal?(this.state=y.ERROR,p.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):e.levelRetry||this.state!==y.WAITING_LEVEL||(this.state=y.IDLE));break;case v.ErrorDetails.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==y.PARSING&&this.state!==y.PARSED||(a?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=y.IDLE):(p.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}}},{key:"_reduceMaxBufferLength",value:function(e){var t=this.config;t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,p.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),this.fragLoadIdx+=2*t.fragLoadingLoopThreshold)}},{key:"_checkBuffer",value:function(){var e=this.media,t=this.config;if(e&&e.readyState){var r=e.currentTime,a=this.mediaBuffer?this.mediaBuffer:e,i=a.buffered;if(!this.loadedmetadata&&i.length){this.loadedmetadata=!0;var n=e.seeking?r:this.startPosition,s=u.default.isBuffered(a,n),o=i.start(0);(r!==n||!s&&Math.abs(n-o)1e3*t.lowBufferWatchdogPeriod){this.stallReported||(this.stallReported=!0,p.logger.warn("playback stalling in low buffer @"+r),h.trigger(f.default.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:y}));var E=l.nextStart,b=E-r;if(E&&b0){this.nudgeRetry=++m;var T=m*t.nudgeOffset;p.logger.log("adjust currentTime from "+e.currentTime+" to next buffered @ "+E+" + nudge "+T),e.currentTime=E+T,this.stalled=void 0,h.trigger(f.default.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:E+T-r})}}else if(y>.5&&g>1e3*t.highBufferWatchdogPeriod)if(this.stallReported||(this.stallReported=!0,p.logger.warn("playback stalling in high buffer @"+r),h.trigger(f.default.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:y})),this.stalled=void 0,this.nudgeRetry=++m,m"+e),this.hls.trigger(f.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}]),t}(c.default);r.default=m},{25:25,33:33,34:34,35:35,37:37,38:38,48:48,54:54,55:55}],14:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r-1&&this.vttFragQueues[this.currentTrackId].length){var e=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.hls.trigger(l.default.FRAG_LOADING,{frag:e})}}},{key:"onSubtitleFragProcessed",value:function(e){e.success&&this.vttFragSNsProcessed[e.frag.trackId].push(e.frag.sn),this.currentlyProcessing=null,this.nextFrag()}},{key:"onError",value:function(e){var t=e.frag;t&&"subtitle"!==t.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())}},{key:"onSubtitleTracksUpdated",value:function(e){var t=this;d.logger.log("subtitle tracks updated"),this.tracks=e.subtitleTracks,this.clearVttFragQueues(),this.vttFragSNsProcessed={},this.tracks.forEach(function(e){t.vttFragSNsProcessed[e.id]=[]})}},{key:"onSubtitleTrackSwitch",value:function(e){this.currentTrackId=e.id,this.clearVttFragQueues()}},{key:"onSubtitleTrackLoaded",value:function(e){var t=this.vttFragSNsProcessed[e.id],r=this.vttFragQueues[e.id],a=this.currentlyProcessing?this.currentlyProcessing.sn:-1,i=function(e){return t.indexOf(e.sn)>-1},n=function(e){return r.some(function(t){return t.sn===e.sn})};e.details.fragments.forEach(function(t){i(t)||t.sn===a||n(t)||(t.trackId=e.id,r.push(t))}),this.nextFrag()}}]),t}(u.default);r.default=f},{34:34,35:35,54:54}],15:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e){for(var t=[],r=0;r=0&&e0;)e.removeCue(e.cues[0])}function l(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}function u(e,t,r,a){return Math.min(t,a)-Math.max(e,r)}Object.defineProperty(r,"__esModule",{value:!0});var d=function(){function e(e,t){for(var r=0;r=0&&(o[0]=Math.min(o[0],t),o[1]=Math.max(o[1],r),n=!0,l/(r-t)>.5))return}n||i.push([t,r]),this.Cues.newCue(this[e],t,r,a)}},{key:"onInitPtsFound",value:function(e){var t=this;void 0===this.initPTS&&(this.initPTS=e.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(e){t.onFragLoaded(e)}),this.unparsedVttFrags=[])}},{key:"getExistingTrack",value:function(e){var t=this.media;if(t)for(var r=0;r>>8^255&p^99,e[h]=p,t[p]=h;var y=c[h],m=c[y],E=c[m],b=257*c[p]^16843008*p;a[h]=b<<24|b>>>8,i[h]=b<<16|b>>>16,n[h]=b<<8|b>>>24,s[h]=b,b=16843009*E^65537*m^257*y^16843008*h,l[p]=b<<24|b>>>8,u[p]=b<<16|b>>>16,d[p]=b<<8|b>>>24,f[p]=b,h?(h=y^c[c[c[E^y]]],g^=c[c[g]]):h=g=1}}},{key:"expandKey",value:function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,a=0;a>8|e>>>24}},{key:"decrypt",value:function(e,t,r){for(var a,i,n=this.keySize+6,s=this.invKeySchedule,o=this.invSBox,l=this.invSubMix,u=l[0],d=l[1],f=l[2],c=l[3],h=this.uint8ArrayToUint32Array_(r),g=h[0],v=h[1],p=h[2],y=h[3],m=new Int32Array(e),E=new Int32Array(m.length),b=void 0,T=void 0,k=void 0,_=void 0,R=void 0,S=void 0,A=void 0,L=void 0,w=void 0,D=void 0,O=void 0,I=void 0,P=this.networkToHostOrderSwap;t>>24]^d[S>>16&255]^f[A>>8&255]^c[255&L]^s[a],T=u[S>>>24]^d[A>>16&255]^f[L>>8&255]^c[255&R]^s[a+1],k=u[A>>>24]^d[L>>16&255]^f[R>>8&255]^c[255&S]^s[a+2],_=u[L>>>24]^d[R>>16&255]^f[S>>8&255]^c[255&A]^s[a+3],R=b,S=T,A=k,L=_,a+=4;b=o[R>>>24]<<24^o[S>>16&255]<<16^o[A>>8&255]<<8^o[255&L]^s[a],T=o[S>>>24]<<24^o[A>>16&255]<<16^o[L>>8&255]<<8^o[255&R]^s[a+1],k=o[A>>>24]<<24^o[L>>16&255]<<16^o[R>>8&255]<<8^o[255&S]^s[a+2],_=o[L>>>24]<<24^o[R>>16&255]<<16^o[S>>8&255]<<8^o[255&A]^s[a+3],a+=3,E[t]=P(b^g),E[t+1]=P(_^v),E[t+2]=P(k^p),E[t+3]=P(T^y),g=w,v=D,p=O,y=I,t+=4}return E.buffer}},{key:"destroy",value:function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0}}]),e}();r.default=n},{}],19:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r>>6),!((o=(60&t[r+2])>>>2)>h.length-1))return u=(1&t[r+2])<<2,u|=(192&t[r+3])>>>6,a.logger.log("manifest codec:"+n+",ADTS data:type:"+s+",sampleingIndex:"+o+"["+h[o]+"Hz],channelConfig:"+u),/firefox/i.test(f)?o>=6?(s=5,d=new Array(4),l=o-3):(s=2,d=new Array(2),l=o):-1!==f.indexOf("android")?(s=2,d=new Array(2),l=o):(s=5,d=new Array(4),n&&(-1!==n.indexOf("mp4a.40.29")||-1!==n.indexOf("mp4a.40.5"))||!n&&o>=6?l=o-3:((n&&-1!==n.indexOf("mp4a.40.2")&&(o>=6&&1===u||/vivaldi/i.test(f))||!n&&1===u)&&(s=2,d=new Array(2)),l=o)),d[0]=s<<3,d[0]|=(14&o)>>1,d[1]|=(1&o)<<7,d[1]|=u<<3,5===s&&(d[1]|=(14&l)>>1,d[2]=(1&l)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:h[o],channelCount:u,codec:"mp4a.40."+s,manifestCodec:c};e.trigger(Event.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+o})},isHeaderPattern:function(e,t){return 255===e[t]&&240==(246&e[t+1])},getHeaderLength:function(e,t){return 1&e[t+1]?7:9},getFullFrameLength:function(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5},isHeader:function(e,t){return!!(t+10&&t+n+s<=l)return o=r+a*i,{headerLength:n,frameLength:s,stamp:o}}};t.exports=n},{33:33,54:54}],23:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r0&&null!=t&&null!=t.key&&"AES-128"===t.method){var g=this.decrypter;null==g&&(g=this.decrypter=new l.default(this.observer,this.config));var v,p=this;try{v=performance.now()}catch(e){v=Date.now()}g.decrypt(e,t.key.buffer,t.iv.buffer,function(e){var l;try{l=performance.now()}catch(e){l=Date.now()}p.observer.trigger(s.default.FRAG_DECRYPTED,{stats:{tstart:v,tdecrypt:l}}),p.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),a,i,n,o,u,d,f,c,h)})}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(r),a,i,n,o,u,d,f,c,h)}},{key:"pushDecrypted",value:function(e,t,r,a,i,n,l,v,p,y,m,E){var b=this.demuxer;if(!b||l&&!this.probe(e)){for(var T=this.observer,k=this.typeSupported,_=this.config,R=[{demux:u.default,remux:h.default},{demux:c.default,remux:h.default},{demux:f.default,remux:h.default},{demux:d.default,remux:g.default}],S=0,A=R.length;S1?r-1:0),i=1;i1?r-1:0),i=1;i1?t-1:0),a=1;a1?t-1:0),a=1;ae?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(e){var t=Math.min(this.bitsAvailable,e),r=this.word>>>32-t;return e>32&&n.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?r<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(e){var t,r=8,a=8;for(t=0;t0)return t.subarray(a,a+i)}},{key:"_readSize",value:function(e,t){var r=0;return r=(127&e[t])<<21,r|=(127&e[t+1])<<14,r|=(127&e[t+2])<<7,r|=127&e[t+3]}},{key:"getTimeStamp",value:function(t){for(var r=e.getID3Frames(t),a=0;a>4){case 0:return a;case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(s);break;case 12:case 13:t=e[i++],a+=String.fromCharCode((31&s)<<6|63&t);break;case 14:t=e[i++],r=e[i++],a+=String.fromCharCode((15&s)<<12|(63&t)<<6|(63&r)<<0)}}return a}}]),e}();r.default=n},{}],28:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r=8){var r=e.bin2str(t.subarray(4,8));return["moof","ftyp","styp"].indexOf(r)>=0}return!1}},{key:"bin2str",value:function(e){return String.fromCharCode.apply(null,e)}},{key:"readUint32",value:function(e,t){e.data&&(t+=e.start,e=e.data);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return r<0?4294967296+r:r}},{key:"writeUint32",value:function(e,t,r){e.data&&(t+=e.start,e=e.data),e[t]=r>>24,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}},{key:"findBox",value:function(t,r){var a,i,n,s,o,l,u,d=[];if(t.data?(l=t.start,s=t.end,t=t.data):(l=0,s=t.byteLength),!r.length)return null;for(a=l;a1?a+i:s,n===r[0]&&(1===r.length?d.push({data:t,start:a+8,end:u}):(o=e.findBox({data:t,start:a+8,end:u},r.slice(1))).length&&(d=d.concat(o))),a=u;return d}},{key:"parseInitSegment",value:function(t){var r=[];return e.findBox(t,["moov","trak"]).forEach(function(t){var a=e.findBox(t,["tkhd"])[0];if(a){var i=a.data[a.start],n=0===i?12:20,s=e.readUint32(a,n),o=e.findBox(t,["mdia","mdhd"])[0];if(o){n=0===(i=o.data[o.start])?12:20;var l=e.readUint32(o,n),u=e.findBox(t,["mdia","hdlr"])[0];if(u){var d={soun:"audio",vide:"video"}[e.bin2str(u.data.subarray(u.start+8,u.start+12))];d&&(r[s]={timescale:l,type:d},r[d]={timescale:l,id:s})}}}}),r}},{key:"getStartDTS",value:function(t,r){var a,i,n;return a=e.findBox(r,["moof","traf"]),i=[].concat.apply([],a.map(function(r){return e.findBox(r,["tfhd"]).map(function(a){var i,n,s;return i=e.readUint32(a,4),n=t[i].timescale||9e4,s=e.findBox(r,["tfdt"]).map(function(t){var r,a;return r=t.data[t.start],a=e.readUint32(t,4),1===r&&(a*=Math.pow(2,32),a+=e.readUint32(t,8)),a})[0],(s=s||1/0)/n})})),n=Math.min.apply(null,i),isFinite(n)?n:0}},{key:"offsetStartDTS",value:function(t,r,a){e.findBox(r,["moof","traf"]).map(function(r){return e.findBox(r,["tfhd"]).map(function(i){var n=e.readUint32(i,4),o=t[n].timescale||9e4;e.findBox(r,["tfdt"]).map(function(t){var r=t.data[t.start],i=e.readUint32(t,4);if(0===r)e.writeUint32(t,4,i-a*o);else{i*=Math.pow(2,32),i+=e.readUint32(t,8),i-=a*o;var n=Math.floor(i/(s+1)),l=Math.floor(i%(s+1));e.writeUint32(t,4,n),e.writeUint32(t,8,l)}})})})}}]),e}();r.default=o},{35:35}],30:[function(e,t,r){"use strict";var a={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],appendFrame:function(e,t,r,a,i){if(!(r+24>t.length)){var n=this.parseHeader(t,r);if(n&&r+n.frameLength<=t.length){var s=a+i*(10368e4/n.sampleRate),o={unit:t.subarray(r,r+n.frameLength),pts:s,dts:s};return e.config=[],e.channelCount=n.channelCount,e.samplerate=n.sampleRate,e.samples.push(o),e.len+=n.frameLength,{sample:o,length:n.frameLength}}}},parseHeader:function(e,t){var r=e[t+1]>>3&3,i=e[t+1]>>1&3,n=e[t+2]>>4&15,s=e[t+2]>>2&3,o=!!(2&e[t+2]);if(1!==r&&0!==n&&15!==n&&3!==s){var l=3===r?3-i:3===i?3:4,u=1e3*a.BitratesMap[14*l+n-1],d=3===r?0:2===r?1:2,f=a.SamplingRateMap[3*d+s],c=o?1:0;return{sampleRate:f,channelCount:e[t+3]>>6==3?1:2,frameLength:3===i?(3===r?12:6)*u/f+c<<2:(3===r?144:72)*u/f+c|0}}},isHeaderPattern:function(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])},isHeader:function(e,t){return!!(t+1=e.length)return void r();if(!(e[t].unit.length<32)){var a=this.decrypter.isSync();if(this.decryptAacSample(e,t,r,a),!a)return}}}},{key:"getAvcEncryptedData",value:function(e){for(var t=16*Math.floor((e.length-48)/160)+16,r=new Int8Array(t),a=0,i=32;i<=e.length-16;i+=160,a+=16)r.set(e.subarray(i,i+16),a);return r}},{key:"getAvcDecryptedUnit",value:function(e,t){t=new Uint8Array(t);for(var r=0,a=32;a<=e.length-16;a+=160,r+=16)e.set(t.subarray(r,r+16),a);return e}},{key:"decryptAvcSample",value:function(e,t,r,a,i,n){var s=this.discardEPB(i.data),o=this.getAvcEncryptedData(s),l=this;this.decryptBuffer(o.buffer,function(o){i.data=l.getAvcDecryptedUnit(s,o),n||l.decryptAvcSamples(e,t,r+1,a)})}},{key:"decryptAvcSamples",value:function(e,t,r,a){for(;;t++,r=0){if(t>=e.length)return void a();for(var i=e[t].units;!(r>=i.length);r++){var n=i[r];if(!(n.length<=48||1!==n.type&&5!==n.type)){var s=this.decrypter.isSync();if(this.decryptAvcSample(e,t,r,a,n,s),!s)return}}}}}]),e}();r.default=s},{19:19}],32:[function(e,t,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r>4>1){if((o=i+5+e[i+4])===i+188)continue}else o=i+4;switch(s){case m:n&&(k&&(u=L(k))&&w(u,!1),k={data:[],size:0}),k&&(k.data.push(e.subarray(o,i+188)),k.size+=i+188-o);break;case E:n&&(_&&(u=L(_))&&(p.isAAC?D(u):O(u)),_={data:[],size:0}),_&&(_.data.push(e.subarray(o,i+188)),_.size+=i+188-o);break;case b:n&&(R&&(u=L(R))&&I(u),R={data:[],size:0}),R&&(R.data.push(e.subarray(o,i+188)),R.size+=i+188-o);break;case 0:n&&(o+=e[o]+1),T=this._pmtId=S(e,o);break;case T:n&&(o+=e[o]+1);var P=A(e,o,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(m=P.avc)>0&&(v.id=m),(E=P.audio)>0&&(p.id=E,p.isAAC=P.isAAC),(b=P.id3)>0&&(y.id=b),h&&!g&&(f.logger.log("reparse from beginning"),h=!1,i=-188),g=this.pmtParsed=!0;break;case 17:case 8191:break;default:h=!0}}else this.observer.trigger(l.default.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});k&&(u=L(k))?(w(u,!0),v.pesData=null):v.pesData=k,_&&(u=L(_))?(p.isAAC?D(u):O(u),p.pesData=null):(_&&_.size&&f.logger.log("last AAC PES packet truncated,might overlap between fragments"),p.pesData=_),R&&(u=L(R))?(I(u),y.pesData=null):y.pesData=R,null==this.sampleAes?this.remuxer.remux(p,v,y,this._txtTrack,t,r,a):this.decryptAndRemux(p,v,y,this._txtTrack,t,r,a)}},{key:"decryptAndRemux",value:function(e,t,r,a,i,n,s){if(e.samples&&e.isAAC){var o=this;this.sampleAes.decryptAacSamples(e.samples,0,function(){o.decryptAndRemuxAvc(e,t,r,a,i,n,s)})}else this.decryptAndRemuxAvc(e,t,r,a,i,n,s)}},{key:"decryptAndRemuxAvc",value:function(e,t,r,a,i,n,s){if(t.samples){var o=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,function(){o.remuxer.remux(e,t,r,a,i,n,s)})}else this.remuxer.remux(e,t,r,a,i,n,s)}},{key:"destroy",value:function(){this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(e,t){return(31&e[t+10])<<8|e[t+11]}},{key:"_parsePMT",value:function(e,t,r,a){var i,n,s={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t1;){var c=new Uint8Array(d[0].length+d[1].length);c.set(d[0]),c.set(d[1],d[0].length),d[0]=c,d.splice(1,1)}if(t=d[0],1===(t[0]<<16)+(t[1]<<8)+t[2]){if((a=(t[4]<<8)+t[5])&&a>e.size-6)return null;192&(r=t[7])&&((s=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2)>4294967295&&(s-=8589934592),64&r?((o=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(o-=8589934592),s-o>54e5&&(f.logger.warn(Math.round((s-o)/9e4)+"s delta between PTS and DTS, align them"),s=o)):o=s),l=(i=t[8])+9,e.size-=l,n=new Uint8Array(e.size);for(var h=0,g=d.length;hv){l-=v;continue}t=t.subarray(l),v-=l,l=0}n.set(t,u),u+=v}return a&&(a-=i+3),{data:n,pts:s,dts:o,len:a}}return null}},{key:"pushAccesUnit",value:function(e,t){if(e.units.length&&e.frame){var r=t.samples,a=r.length;!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(a||this.contiguous)?(e.id=a,r.push(e)):t.dropped++}e.debug.length&&f.logger.log(e.pts+"/"+e.dts+":"+e.debug)}},{key:"_parseAVCPES",value:function(e,t){var r,a,i,n=this,s=this._avcTrack,o=this._parseAVCNALu(e.data),l=this.avcSample,d=!1,f=this.pushAccesUnit.bind(this),c=function(e,t,r,a){return{key:e,pts:t,dts:r,units:[],debug:a}};e.data=null,l&&o.length&&(f(l,s),l=this.avcSample=c(!1,e.pts,e.dts,"")),o.forEach(function(t){switch(t.type){case 1:a=!0,l.frame=!0;var o=t.data;if(d&&o.length>4){var h=new u.default(o).readSliceType();2!==h&&4!==h&&7!==h&&9!==h||(l.key=!0)}break;case 5:a=!0,l||(l=n.avcSample=c(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:a=!0,(r=new u.default(n.discardEPB(t.data))).readUByte();for(var g=0,v=0,p=!1,y=0;!p&&r.bytesAvailable>1;){g=0;do{g+=y=r.readUByte()}while(255===y);v=0;do{v+=y=r.readUByte()}while(255===y);if(4===g&&0!==r.bytesAvailable){if(p=!0,181===r.readUByte()&&49===r.readUShort()&&1195456820===r.readUInt()&&3===r.readUByte()){var m=r.readUByte(),E=31&m,b=[m,r.readUByte()];for(i=0;i0){if(t.pts>=e[r-1].pts)e.push(t);else for(var a=r-1;a>=0;a--)if(t.pts=0)a={data:e.subarray(f,n-l-1),type:i},d.push(a);else{var c=this._getLastNalUnit();if(c&&(u&&n<=4-u&&c.state&&(c.data=c.data.subarray(0,c.data.byteLength-u)),(r=n-l-1)>0)){var h=new Uint8Array(c.data.byteLength+r);h.set(c.data,0),h.set(e.subarray(0,r),c.data.byteLength),c.data=h}}n=0&&l>=0&&(a={data:e.subarray(f,s),type:i,state:l},d.push(a)),0===d.length){var g=this._getLastNalUnit();if(g){var v=new Uint8Array(g.data.byteLength+e.byteLength);v.set(g.data,0),v.set(e,g.data.byteLength),g.data=v}}return o.naluState=l,d}},{key:"discardEPB",value:function(e){for(var t,r,a=e.byteLength,i=[],n=1;n1&&(f.logger.log("AAC: align PTS for overlapping frames by "+Math.round((m-d)/90)),d=m)}for(;a=564&&71===e[0]&&71===e[188]&&71===e[376]}}]),e}();r.default=h},{22:22,26:26,30:30,31:31,33:33,35:35,54:54}],33:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},r.ErrorDetails={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException",WEBVTT_EXCEPTION:"webVTTException"}},{}],34:[function(e,t,r){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){function e(e,t){for(var r=0;r1?r-1:0),n=1;n=r.start(a)&&t<=r.end(a))return!0;return!1},bufferInfo:function(e,t,r){if(e){var a,i=e.buffered,n=[];for(a=0;ad&&(l[u-1].end=e[o].end):l.push(e[o])}else l.push(e[o])}for(o=0,a=0,i=n=t;o=f&&t=0&&oe.endSN)return 0;var f,c,h;for(f=d-e.startSN,(c=e.fragments)[f]=t,h=f;h>0;h--)i.updatePTS(c,h,h-1);for(h=f;h