diff --git a/Emby.Server.Implementations/Browser/BrowserLauncher.cs b/Emby.Server.Implementations/Browser/BrowserLauncher.cs index 8677ce9aaa..945231bd78 100644 --- a/Emby.Server.Implementations/Browser/BrowserLauncher.cs +++ b/Emby.Server.Implementations/Browser/BrowserLauncher.cs @@ -26,7 +26,7 @@ private static void OpenDashboardPage(string page, IServerApplicationHost appHos /// The app host. public static void OpenWizard(IServerApplicationHost appHost) { - OpenDashboardPage("index.html?start=wizard", appHost); + OpenDashboardPage("index.html#!/wizardstart.html", appHost); } /// diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 0693d918a4..03effeba50 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -628,6 +628,16 @@ await Write(httpRes, return; } + if (localPath.EndsWith("web/dashboard.html", StringComparison.OrdinalIgnoreCase) && httpReq.UrlReferrer == null) + { + RedirectToUrl(httpRes, "index.html#!/dashboard.html"); + } + + if (localPath.EndsWith("web/home.html", StringComparison.OrdinalIgnoreCase) && httpReq.UrlReferrer == null) + { + RedirectToUrl(httpRes, "index.html"); + } + if (!string.IsNullOrEmpty(GlobalResponse)) { // We don't want the address pings in ApplicationHost to fail diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index 5e616426ba..9930b7496d 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -248,8 +248,8 @@ private string GetCompressionType(IRequest request) if (acceptEncoding != null) { - if (_brotliCompressor != null && acceptEncoding.IndexOf("br", StringComparison.OrdinalIgnoreCase) != -1) - return "br"; + //if (_brotliCompressor != null && acceptEncoding.IndexOf("br", StringComparison.OrdinalIgnoreCase) != -1) + // return "br"; if (acceptEncoding.IndexOf("deflate", StringComparison.OrdinalIgnoreCase) != -1) return "deflate"; diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index a8cbc08fd4..d21abb74e8 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -1174,7 +1174,7 @@ async void _timerProvider_TimerFired(object sender, GenericEventArgs { var timer = e.Argument; - _logger.Info("Recording timer fired."); + _logger.Info("Recording timer fired for {0}.", timer.Name); try { diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs index b1b324fcf2..7365e7312d 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs @@ -208,13 +208,17 @@ private async Task> FetchMovieData(string tmdbId, string result.Item = new Series(); result.ResultLanguage = seriesInfo.ResultLanguage; - ProcessMainInfo(result.Item, seriesInfo, preferredCountryCode); + var settings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false); + + ProcessMainInfo(result, seriesInfo, preferredCountryCode, settings); return result; } - private void ProcessMainInfo(Series series, RootObject seriesInfo, string preferredCountryCode) + private void ProcessMainInfo(MetadataResult seriesResult, RootObject seriesInfo, string preferredCountryCode, TmdbSettingsResult settings) { + var series = seriesResult.Item; + series.Name = seriesInfo.name; series.SetProviderId(MetadataProviders.Tmdb, seriesInfo.id.ToString(_usCulture)); @@ -307,6 +311,35 @@ private void ProcessMainInfo(Series series, RootObject seriesInfo, string prefer } } } + + seriesResult.ResetPeople(); + var tmdbImageUrl = settings.images.GetImageUrl("original"); + + if (seriesInfo.credits != null && seriesInfo.credits.cast != null) + { + foreach (var actor in seriesInfo.credits.cast.OrderBy(a => a.order)) + { + var personInfo = new PersonInfo + { + Name = actor.name.Trim(), + Role = actor.character, + Type = PersonType.Actor, + SortOrder = actor.order + }; + + if (!string.IsNullOrWhiteSpace(actor.profile_path)) + { + personInfo.ImageUrl = tmdbImageUrl + actor.profile_path; + } + + if (actor.id > 0) + { + personInfo.SetProviderId(MetadataProviders.Tmdb, actor.id.ToString(CultureInfo.InvariantCulture)); + } + + seriesResult.AddPerson(personInfo); + } + } } internal static string GetSeriesDataPath(IApplicationPaths appPaths, string tmdbId) diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index 03427e89d7..b7c63f9449 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -316,7 +316,7 @@ public async Task Get(GetDashboardResource request) // But don't redirect if an html import is being requested. if (path.IndexOf("bower_components", StringComparison.OrdinalIgnoreCase) == -1) { - Request.Response.Redirect("wizardstart.html"); + Request.Response.Redirect("index.html#!/wizardstart.html"); return null; } } diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index d302e40a09..619d0660f5 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -142,15 +142,6 @@ private string GetMetaTags(string mode) sb.Append(""); } - if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase)) - { - sb.Append(""); - } - else - { - sb.Append(""); - } - return sb.ToString(); } diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-apiclient/apiclient.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-apiclient/apiclient.js index 9d25f4467e..1a4a1aff5f 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-apiclient/apiclient.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-apiclient/apiclient.js @@ -1,2 +1,2 @@ -define(["events","appStorage","wakeOnLan"],function(events,appStorage,wakeOnLan){"use strict";function redetectBitrate(instance){stopBitrateDetection(instance),instance.accessToken()&&!1!==instance.enableAutomaticBitrateDetection&&setTimeout(redetectBitrateInternal.bind(instance),6e3)}function redetectBitrateInternal(){this.accessToken()&&this.detectBitrate()}function stopBitrateDetection(instance){instance.detectTimeout&&clearTimeout(instance.detectTimeout)}function replaceAll(originalString,strReplace,strWith){var reg=new RegExp(strReplace,"ig");return originalString.replace(reg,strWith)}function onFetchFail(instance,url,response){events.trigger(instance,"requestfail",[{url:url,status:response.status,errorCode:response.headers?response.headers.get("X-Application-Error-Code"):null}])}function paramsToString(params){var values=[];for(var key in params){var value=params[key];null!==value&&void 0!==value&&""!==value&&values.push(encodeURIComponent(key)+"="+encodeURIComponent(value))}return values.join("&")}function fetchWithTimeout(url,options,timeoutMs){return new Promise(function(resolve,reject){var timeout=setTimeout(reject,timeoutMs);options=options||{},options.credentials="same-origin",fetch(url,options).then(function(response){clearTimeout(timeout),resolve(response)},function(error){clearTimeout(timeout),reject(error)})})}function getFetchPromise(request){var headers=request.headers||{};"json"===request.dataType&&(headers.accept="application/json");var fetchRequest={headers:headers,method:request.type,credentials:"same-origin"},contentType=request.contentType;return request.data&&("string"==typeof request.data?fetchRequest.body=request.data:(fetchRequest.body=paramsToString(request.data),contentType=contentType||"application/x-www-form-urlencoded; charset=UTF-8")),contentType&&(headers["Content-Type"]=contentType),request.timeout?fetchWithTimeout(request.url,fetchRequest,request.timeout):fetch(request.url,fetchRequest)}function ApiClient(serverAddress,appName,appVersion,deviceName,deviceId,devicePixelRatio){if(!serverAddress)throw new Error("Must supply a serverAddress");console.log("ApiClient serverAddress: "+serverAddress),console.log("ApiClient appName: "+appName),console.log("ApiClient appVersion: "+appVersion),console.log("ApiClient deviceName: "+deviceName),console.log("ApiClient deviceId: "+deviceId),this._serverInfo={},this._serverAddress=serverAddress,this._deviceId=deviceId,this._deviceName=deviceName,this._appName=appName,this._appVersion=appVersion,this._devicePixelRatio=devicePixelRatio}function setSavedEndpointInfo(instance,info){instance._endPointInfo=info}function getTryConnectPromise(instance,url,state,resolve,reject){return console.log("getTryConnectPromise "+url),fetchWithTimeout(url+"/system/info/public",{method:"GET",accept:"application/json"},15e3).then(function(){state.resolved||(state.resolved=!0,console.log("Reconnect succeeded to "+url),instance.serverAddress(url),resolve())},function(){console.log("Reconnect failed to "+url),++state.rejects>=state.numAddresses&&reject()})}function tryReconnectInternal(instance){var addresses=[],addressesStrings=[],serverInfo=instance.serverInfo();return serverInfo.LocalAddress&&-1===addressesStrings.indexOf(serverInfo.LocalAddress)&&(addresses.push({url:serverInfo.LocalAddress,timeout:0}),addressesStrings.push(addresses[addresses.length-1].url)),serverInfo.ManualAddress&&-1===addressesStrings.indexOf(serverInfo.ManualAddress)&&(addresses.push({url:serverInfo.ManualAddress,timeout:100}),addressesStrings.push(addresses[addresses.length-1].url)),serverInfo.RemoteAddress&&-1===addressesStrings.indexOf(serverInfo.RemoteAddress)&&(addresses.push({url:serverInfo.RemoteAddress,timeout:200}),addressesStrings.push(addresses[addresses.length-1].url)),console.log("tryReconnect: "+addressesStrings.join("|")),new Promise(function(resolve,reject){var state={};state.numAddresses=addresses.length,state.rejects=0,addresses.map(function(url){setTimeout(function(){getTryConnectPromise(instance,url.url,state,resolve,reject)},url.timeout)})})}function tryReconnect(instance,retryCount){return retryCount=retryCount||0,retryCount>=20?Promise.reject():tryReconnectInternal(instance).catch(function(err){return console.log("error in tryReconnectInternal: "+(err||"")),new Promise(function(resolve,reject){setTimeout(function(){tryReconnect(instance,retryCount+1).then(resolve,reject)},500)})})}function getCachedUser(instance,userId){var serverId=instance.serverId();if(!serverId)return null;var json=appStorage.getItem("user-"+userId+"-"+serverId);return json?JSON.parse(json):null}function onWebSocketMessage(msg){var instance=this;msg=JSON.parse(msg.data),onMessageReceivedInternal(instance,msg)}function onMessageReceivedInternal(instance,msg){var messageId=msg.MessageId;if(messageId){if(messageIdsReceived[messageId])return;messageIdsReceived[messageId]=!0}if("UserDeleted"===msg.MessageType)instance._currentUser=null;else if("UserUpdated"===msg.MessageType||"UserConfigurationUpdated"===msg.MessageType){var user=msg.Data;user.Id===instance.getCurrentUserId()&&(instance._currentUser=null)}events.trigger(instance,"message",[msg])}function onWebSocketOpen(){var instance=this;console.log("web socket connection opened"),events.trigger(instance,"websocketopen")}function onWebSocketError(){var instance=this;events.trigger(instance,"websocketerror")}function setSocketOnClose(apiClient,socket){socket.onclose=function(){console.log("web socket closed"),apiClient._webSocket===socket&&(console.log("nulling out web socket"),apiClient._webSocket=null),setTimeout(function(){events.trigger(apiClient,"websocketclose")},0)}}function normalizeReturnBitrate(instance,bitrate){if(!bitrate)return instance.lastDetectedBitrate?instance.lastDetectedBitrate:Promise.reject();var result=Math.round(.7*bitrate);if(instance.getMaxBandwidth){var maxRate=instance.getMaxBandwidth();maxRate&&(result=Math.min(result,maxRate))}return instance.lastDetectedBitrate=result,instance.lastDetectedBitrateTime=(new Date).getTime(),result}function detectBitrateInternal(instance,tests,index,currentBitrate){if(index>=tests.length)return normalizeReturnBitrate(instance,currentBitrate);var test=tests[index];return instance.getDownloadSpeed(test.bytes).then(function(bitrate){return bitrate=infos.length)return void resolve();var info=infos[index];console.log("sending wakeonlan to "+info.MacAddress),wakeOnLan.send(info).then(function(result){sendNextWakeOnLan(infos,index+1,resolve)},function(){sendNextWakeOnLan(infos,index+1,resolve)})}function compareVersions(a,b){a=a.split("."),b=b.split(".");for(var i=0,length=Math.max(a.length,b.length);ibVal)return 1}return 0}ApiClient.prototype.appName=function(){return this._appName},ApiClient.prototype.setRequestHeaders=function(headers){var currentServerInfo=this.serverInfo(),appName=this._appName,accessToken=currentServerInfo.AccessToken,values=[];if(appName&&values.push('Client="'+appName+'"'),this._deviceName&&values.push('Device="'+this._deviceName+'"'),this._deviceId&&values.push('DeviceId="'+this._deviceId+'"'),this._appVersion&&values.push('Version="'+this._appVersion+'"'),accessToken&&values.push('Token="'+accessToken+'"'),values.length){var auth="MediaBrowser "+values.join(", ");headers["X-Emby-Authorization"]=auth}},ApiClient.prototype.appVersion=function(){return this._appVersion},ApiClient.prototype.deviceName=function(){return this._deviceName},ApiClient.prototype.deviceId=function(){return this._deviceId},ApiClient.prototype.serverAddress=function(val){if(null!=val){if(0!==val.toLowerCase().indexOf("http"))throw new Error("Invalid url: "+val);var changed=val!==this._serverAddress;this._serverAddress=val,this.onNetworkChange(),changed&&events.trigger(this,"serveraddresschanged")}return this._serverAddress},ApiClient.prototype.onNetworkChange=function(){this.lastDetectedBitrate=0,this.lastDetectedBitrateTime=0,setSavedEndpointInfo(this,null),redetectBitrate(this),refreshWakeOnLanInfoIfNeeded(this)},ApiClient.prototype.getUrl=function(name,params){if(!name)throw new Error("Url name cannot be empty");var url=this._serverAddress;if(!url)throw new Error("serverAddress is yet not set");var lowered=url.toLowerCase();return-1===lowered.indexOf("/emby")&&-1===lowered.indexOf("/mediabrowser")&&(url+="/emby"),"/"!==name.charAt(0)&&(url+="/"),url+=name,params&&(params=paramsToString(params))&&(url+="?"+params),url},ApiClient.prototype.fetchWithFailover=function(request,enableReconnection){console.log("Requesting "+request.url),request.timeout=3e4;var instance=this;return getFetchPromise(request).then(function(response){return instance.lastFetch=(new Date).getTime(),response.status<400?"json"===request.dataType||"application/json"===request.headers.accept?response.json():"text"===request.dataType||0===(response.headers.get("Content-Type")||"").toLowerCase().indexOf("text/")?response.text():response:(onFetchFail(instance,request.url,response),Promise.reject(response))},function(error){if(error?console.log("Request failed to "+request.url+" "+(error.status||"")+" "+error.toString()):console.log("Request timed out to "+request.url),error&&error.status||!enableReconnection)throw console.log("Reporting request failure"),onFetchFail(instance,request.url,{}),error;console.log("Attempting reconnection");var previousServerAddress=instance.serverAddress();return tryReconnect(instance).then(function(){return console.log("Reconnect succeesed"),request.url=request.url.replace(previousServerAddress,instance.serverAddress()),instance.fetchWithFailover(request,!1)},function(innerError){throw console.log("Reconnect failed"),onFetchFail(instance,request.url,{}),innerError})})},ApiClient.prototype.fetch=function(request,includeAuthorization){if(!request)throw new Error("Request cannot be null");if(request.headers=request.headers||{},!1!==includeAuthorization&&this.setRequestHeaders(request.headers),!1===this.enableAutomaticNetworking||"GET"!==request.type){console.log("Requesting url without automatic networking: "+request.url);var instance=this;return getFetchPromise(request).then(function(response){return instance.lastFetch=(new Date).getTime(),response.status<400?"json"===request.dataType||"application/json"===request.headers.accept?response.json():"text"===request.dataType||0===(response.headers.get("Content-Type")||"").toLowerCase().indexOf("text/")?response.text():response:(onFetchFail(instance,request.url,response),Promise.reject(response))},function(error){throw onFetchFail(instance,request.url,{}),error})}return this.fetchWithFailover(request,!0)},ApiClient.prototype.setAuthenticationInfo=function(accessKey,userId){this._currentUser=null,this._serverInfo.AccessToken=accessKey,this._serverInfo.UserId=userId,redetectBitrate(this),refreshWakeOnLanInfoIfNeeded(this)},ApiClient.prototype.serverInfo=function(info){return info&&(this._serverInfo=info),this._serverInfo},ApiClient.prototype.getCurrentUserId=function(){return this._serverInfo.UserId},ApiClient.prototype.accessToken=function(){return this._serverInfo.AccessToken},ApiClient.prototype.serverId=function(){return this.serverInfo().Id},ApiClient.prototype.serverName=function(){return this.serverInfo().Name},ApiClient.prototype.ajax=function(request,includeAuthorization){if(!request)throw new Error("Request cannot be null");return this.fetch(request,includeAuthorization)},ApiClient.prototype.getCurrentUser=function(enableCache){if(this._currentUser)return Promise.resolve(this._currentUser);var userId=this.getCurrentUserId();if(!userId)return Promise.reject();var user,instance=this,serverPromise=this.getUser(userId).then(function(user){return appStorage.setItem("user-"+user.Id+"-"+user.ServerId,JSON.stringify(user)),instance._currentUser=user,user},function(response){if(!response.status&&userId&&instance.accessToken()&&(user=getCachedUser(instance,userId)))return Promise.resolve(user);throw response});return!this.lastFetch&&!1!==enableCache&&(user=getCachedUser(instance,userId))?Promise.resolve(user):serverPromise},ApiClient.prototype.isLoggedIn=function(){var info=this.serverInfo();return!!(info&&info.UserId&&info.AccessToken)},ApiClient.prototype.logout=function(){stopBitrateDetection(this),this.closeWebSocket();var done=function(){this.setAuthenticationInfo(null,null)}.bind(this);if(this.accessToken()){var url=this.getUrl("Sessions/Logout");return this.ajax({type:"POST",url:url}).then(done,done)}return done(),Promise.resolve()},ApiClient.prototype.authenticateUserByName=function(name,password){if(!name)return Promise.reject();var url=this.getUrl("Users/authenticatebyname"),instance=this;return new Promise(function(resolve,reject){var postData={Username:name,Pw:password||""};instance.ajax({type:"POST",url:url,data:JSON.stringify(postData),dataType:"json",contentType:"application/json"}).then(function(result){var afterOnAuthenticated=function(){redetectBitrate(instance),refreshWakeOnLanInfoIfNeeded(instance),resolve(result)};instance.onAuthenticated?instance.onAuthenticated(instance,result).then(afterOnAuthenticated):afterOnAuthenticated()},reject)})},ApiClient.prototype.ensureWebSocket=function(){if(!this.isWebSocketOpenOrConnecting()&&this.isWebSocketSupported())try{this.openWebSocket()}catch(err){console.log("Error opening web socket: "+err)}};var messageIdsReceived={};return ApiClient.prototype.openWebSocket=function(){var accessToken=this.accessToken();if(!accessToken)throw new Error("Cannot open web socket without access token.");var url=this.getUrl("socket");url=replaceAll(url,"emby/socket","embywebsocket"),url=replaceAll(url,"https:","wss:"),url=replaceAll(url,"http:","ws:"),url+="?api_key="+accessToken,url+="&deviceId="+this.deviceId(),console.log("opening web socket with url: "+url);var webSocket=new WebSocket(url);webSocket.onmessage=onWebSocketMessage.bind(this),webSocket.onopen=onWebSocketOpen.bind(this),webSocket.onerror=onWebSocketError.bind(this),setSocketOnClose(this,webSocket),this._webSocket=webSocket},ApiClient.prototype.closeWebSocket=function(){var socket=this._webSocket;socket&&socket.readyState===WebSocket.OPEN&&socket.close()},ApiClient.prototype.sendWebSocketMessage=function(name,data){console.log("Sending web socket message: "+name);var msg={MessageType:name};data&&(msg.Data=data),msg=JSON.stringify(msg),this._webSocket.send(msg)},ApiClient.prototype.sendMessage=function(name,data){this.isWebSocketOpen()&&this.sendWebSocketMessage(name,data)},ApiClient.prototype.isMessageChannelOpen=function(){return this.isWebSocketOpen()},ApiClient.prototype.isWebSocketOpen=function(){var socket=this._webSocket;return!!socket&&socket.readyState===WebSocket.OPEN},ApiClient.prototype.isWebSocketOpenOrConnecting=function(){var socket=this._webSocket;return!!socket&&(socket.readyState===WebSocket.OPEN||socket.readyState===WebSocket.CONNECTING)},ApiClient.prototype.get=function(url){return this.ajax({type:"GET",url:url})},ApiClient.prototype.getJSON=function(url,includeAuthorization){return this.fetch({url:url,type:"GET",dataType:"json",headers:{accept:"application/json"}},includeAuthorization)},ApiClient.prototype.updateServerInfo=function(server,serverUrl){if(null==server)throw new Error("server cannot be null");if(this.serverInfo(server),!serverUrl)throw new Error("serverUrl cannot be null. serverInfo: "+JSON.stringify(server));console.log("Setting server address to "+serverUrl),this.serverAddress(serverUrl)},ApiClient.prototype.isWebSocketSupported=function(){try{return null!=WebSocket}catch(err){return!1}},ApiClient.prototype.clearAuthenticationInfo=function(){this.setAuthenticationInfo(null,null)},ApiClient.prototype.encodeName=function(name){name=name.split("/").join("-"),name=name.split("&").join("-"),name=name.split("?").join("-");var val=paramsToString({name:name});return val.substring(val.indexOf("=")+1).replace("'","%27")},ApiClient.prototype.getProductNews=function(options){options=options||{};var url=this.getUrl("News/Product",options);return this.getJSON(url)},ApiClient.prototype.getDownloadSpeed=function(byteSize){var url=this.getUrl("Playback/BitrateTest",{Size:byteSize}),now=(new Date).getTime();return this.ajax({type:"GET",url:url,timeout:5e3}).then(function(){var responseTimeSeconds=((new Date).getTime()-now)/1e3,bytesPerSecond=byteSize/responseTimeSeconds;return Math.round(8*bytesPerSecond)})},ApiClient.prototype.detectBitrate=function(force){if(!force&&this.lastDetectedBitrate&&(new Date).getTime()-(this.lastDetectedBitrateTime||0)<=36e5)return Promise.resolve(this.lastDetectedBitrate);var instance=this;return this.getEndpointInfo().then(function(info){return detectBitrateWithEndpointInfo(instance,info)},function(info){return detectBitrateWithEndpointInfo(instance,{})})},ApiClient.prototype.getItem=function(userId,itemId){if(!itemId)throw new Error("null itemId");var url=userId?this.getUrl("Users/"+userId+"/Items/"+itemId):this.getUrl("Items/"+itemId);return this.getJSON(url)},ApiClient.prototype.getRootFolder=function(userId){if(!userId)throw new Error("null userId");var url=this.getUrl("Users/"+userId+"/Items/Root");return this.getJSON(url)},ApiClient.prototype.getNotificationSummary=function(userId){if(!userId)throw new Error("null userId");var url=this.getUrl("Notifications/"+userId+"/Summary");return this.getJSON(url)},ApiClient.prototype.getNotifications=function(userId,options){if(!userId)throw new Error("null userId");var url=this.getUrl("Notifications/"+userId,options||{});return this.getJSON(url)},ApiClient.prototype.markNotificationsRead=function(userId,idList,isRead){if(!userId)throw new Error("null userId");if(!idList)throw new Error("null idList");var suffix=isRead?"Read":"Unread",params={UserId:userId,Ids:idList.join(",")},url=this.getUrl("Notifications/"+userId+"/"+suffix,params);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getRemoteImageProviders=function(options){if(!options)throw new Error("null options");var urlPrefix=getRemoteImagePrefix(this,options),url=this.getUrl(urlPrefix+"/RemoteImages/Providers",options);return this.getJSON(url)},ApiClient.prototype.getAvailableRemoteImages=function(options){if(!options)throw new Error("null options");var urlPrefix=getRemoteImagePrefix(this,options),url=this.getUrl(urlPrefix+"/RemoteImages",options);return this.getJSON(url)},ApiClient.prototype.downloadRemoteImage=function(options){if(!options)throw new Error("null options");var urlPrefix=getRemoteImagePrefix(this,options),url=this.getUrl(urlPrefix+"/RemoteImages/Download",options);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getRecordingFolders=function(userId){var url=this.getUrl("LiveTv/Recordings/Folders",{userId:userId});return this.getJSON(url)},ApiClient.prototype.getLiveTvInfo=function(options){var url=this.getUrl("LiveTv/Info",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvGuideInfo=function(options){var url=this.getUrl("LiveTv/GuideInfo",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvChannel=function(id,userId){if(!id)throw new Error("null id");var options={};userId&&(options.userId=userId);var url=this.getUrl("LiveTv/Channels/"+id,options);return this.getJSON(url)},ApiClient.prototype.getLiveTvChannels=function(options){var url=this.getUrl("LiveTv/Channels",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvPrograms=function(options){return options=options||{},options.channelIds&&options.channelIds.length>1800?this.ajax({type:"POST",url:this.getUrl("LiveTv/Programs"),data:JSON.stringify(options),contentType:"application/json",dataType:"json"}):this.ajax({type:"GET",url:this.getUrl("LiveTv/Programs",options),dataType:"json"})},ApiClient.prototype.getLiveTvRecommendedPrograms=function(options){return options=options||{},this.ajax({type:"GET",url:this.getUrl("LiveTv/Programs/Recommended",options),dataType:"json"})},ApiClient.prototype.getLiveTvRecordings=function(options){var url=this.getUrl("LiveTv/Recordings",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvRecordingSeries=function(options){var url=this.getUrl("LiveTv/Recordings/Series",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvRecordingGroups=function(options){var url=this.getUrl("LiveTv/Recordings/Groups",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvRecordingGroup=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Recordings/Groups/"+id);return this.getJSON(url)},ApiClient.prototype.getLiveTvRecording=function(id,userId){if(!id)throw new Error("null id");var options={};userId&&(options.userId=userId);var url=this.getUrl("LiveTv/Recordings/"+id,options);return this.getJSON(url)},ApiClient.prototype.getLiveTvProgram=function(id,userId){if(!id)throw new Error("null id");var options={};userId&&(options.userId=userId);var url=this.getUrl("LiveTv/Programs/"+id,options);return this.getJSON(url)},ApiClient.prototype.deleteLiveTvRecording=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Recordings/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.cancelLiveTvTimer=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Timers/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.getLiveTvTimers=function(options){var url=this.getUrl("LiveTv/Timers",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvTimer=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Timers/"+id);return this.getJSON(url)},ApiClient.prototype.getNewLiveTvTimerDefaults=function(options){options=options||{};var url=this.getUrl("LiveTv/Timers/Defaults",options);return this.getJSON(url)},ApiClient.prototype.createLiveTvTimer=function(item){if(!item)throw new Error("null item");var url=this.getUrl("LiveTv/Timers");return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.updateLiveTvTimer=function(item){if(!item)throw new Error("null item");var url=this.getUrl("LiveTv/Timers/"+item.Id);return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.resetLiveTvTuner=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Tuners/"+id+"/Reset");return this.ajax({type:"POST",url:url})},ApiClient.prototype.getLiveTvSeriesTimers=function(options){var url=this.getUrl("LiveTv/SeriesTimers",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvSeriesTimer=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/SeriesTimers/"+id);return this.getJSON(url)},ApiClient.prototype.cancelLiveTvSeriesTimer=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/SeriesTimers/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.createLiveTvSeriesTimer=function(item){if(!item)throw new Error("null item");var url=this.getUrl("LiveTv/SeriesTimers");return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.updateLiveTvSeriesTimer=function(item){if(!item)throw new Error("null item");var url=this.getUrl("LiveTv/SeriesTimers/"+item.Id);return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.getRegistrationInfo=function(feature){var url=this.getUrl("Registrations/"+feature);return this.getJSON(url)},ApiClient.prototype.getSystemInfo=function(){var url=this.getUrl("System/Info"),instance=this;return this.getJSON(url).then(function(info){return instance.setSystemInfo(info),Promise.resolve(info)})},ApiClient.prototype.getSyncStatus=function(itemId){var url=this.getUrl("Sync/"+itemId+"/Status");return this.ajax({url:url,type:"POST",dataType:"json",contentType:"application/json",data:JSON.stringify({TargetId:this.deviceId()})})},ApiClient.prototype.getPublicSystemInfo=function(){var url=this.getUrl("System/Info/Public"),instance=this;return this.getJSON(url).then(function(info){return instance.setSystemInfo(info),Promise.resolve(info)})},ApiClient.prototype.getInstantMixFromItem=function(itemId,options){var url=this.getUrl("Items/"+itemId+"/InstantMix",options);return this.getJSON(url)},ApiClient.prototype.getEpisodes=function(itemId,options){var url=this.getUrl("Shows/"+itemId+"/Episodes",options);return this.getJSON(url)},ApiClient.prototype.getDisplayPreferences=function(id,userId,app){var url=this.getUrl("DisplayPreferences/"+id,{userId:userId,client:app});return this.getJSON(url)},ApiClient.prototype.updateDisplayPreferences=function(id,obj,userId,app){var url=this.getUrl("DisplayPreferences/"+id,{userId:userId,client:app});return this.ajax({type:"POST",url:url,data:JSON.stringify(obj),contentType:"application/json"})},ApiClient.prototype.getSeasons=function(itemId,options){var url=this.getUrl("Shows/"+itemId+"/Seasons",options);return this.getJSON(url)},ApiClient.prototype.getSimilarItems=function(itemId,options){var url=this.getUrl("Items/"+itemId+"/Similar",options);return this.getJSON(url)},ApiClient.prototype.getCultures=function(){var url=this.getUrl("Localization/cultures");return this.getJSON(url)},ApiClient.prototype.getCountries=function(){var url=this.getUrl("Localization/countries");return this.getJSON(url)},ApiClient.prototype.getPlaybackInfo=function(itemId,options,deviceProfile){var postData={DeviceProfile:deviceProfile};return this.ajax({url:this.getUrl("Items/"+itemId+"/PlaybackInfo",options),type:"POST",data:JSON.stringify(postData),contentType:"application/json",dataType:"json"})},ApiClient.prototype.getLiveStreamMediaInfo=function(liveStreamId){var postData={LiveStreamId:liveStreamId};return this.ajax({url:this.getUrl("LiveStreams/MediaInfo"),type:"POST",data:JSON.stringify(postData),contentType:"application/json",dataType:"json"})},ApiClient.prototype.getIntros=function(itemId){return this.getJSON(this.getUrl("Users/"+this.getCurrentUserId()+"/Items/"+itemId+"/Intros"))},ApiClient.prototype.getDirectoryContents=function(path,options){if(!path)throw new Error("null path");if("string"!=typeof path)throw new Error("invalid path");options=options||{},options.path=path;var url=this.getUrl("Environment/DirectoryContents",options);return this.getJSON(url)},ApiClient.prototype.getNetworkShares=function(path){if(!path)throw new Error("null path");var options={};options.path=path;var url=this.getUrl("Environment/NetworkShares",options);return this.getJSON(url)},ApiClient.prototype.getParentPath=function(path){if(!path)throw new Error("null path");var options={};options.path=path;var url=this.getUrl("Environment/ParentPath",options);return this.ajax({type:"GET",url:url,dataType:"text"})},ApiClient.prototype.getDrives=function(){var url=this.getUrl("Environment/Drives");return this.getJSON(url)},ApiClient.prototype.getNetworkDevices=function(){var url=this.getUrl("Environment/NetworkDevices");return this.getJSON(url)},ApiClient.prototype.cancelPackageInstallation=function(installationId){if(!installationId)throw new Error("null installationId");var url=this.getUrl("Packages/Installing/"+installationId);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.refreshItem=function(itemId,options){if(!itemId)throw new Error("null itemId");var url=this.getUrl("Items/"+itemId+"/Refresh",options||{});return this.ajax({type:"POST",url:url})},ApiClient.prototype.installPlugin=function(name,guid,updateClass,version){if(!name)throw new Error("null name");if(!updateClass)throw new Error("null updateClass");var options={updateClass:updateClass,AssemblyGuid:guid};version&&(options.version=version);var url=this.getUrl("Packages/Installed/"+name,options);return this.ajax({type:"POST",url:url})},ApiClient.prototype.restartServer=function(){var url=this.getUrl("System/Restart");return this.ajax({type:"POST",url:url})},ApiClient.prototype.shutdownServer=function(){var url=this.getUrl("System/Shutdown");return this.ajax({type:"POST",url:url})},ApiClient.prototype.getPackageInfo=function(name,guid){if(!name)throw new Error("null name");var options={AssemblyGuid:guid},url=this.getUrl("Packages/"+name,options);return this.getJSON(url)},ApiClient.prototype.getAvailableApplicationUpdate=function(){var url=this.getUrl("Packages/Updates",{PackageType:"System"});return this.getJSON(url)},ApiClient.prototype.getAvailablePluginUpdates=function(){var url=this.getUrl("Packages/Updates",{PackageType:"UserInstalled"});return this.getJSON(url)},ApiClient.prototype.getVirtualFolders=function(){var url="Library/VirtualFolders";return url=this.getUrl(url),this.getJSON(url)},ApiClient.prototype.getPhysicalPaths=function(){var url=this.getUrl("Library/PhysicalPaths");return this.getJSON(url)},ApiClient.prototype.getServerConfiguration=function(){var url=this.getUrl("System/Configuration");return this.getJSON(url)},ApiClient.prototype.getDevicesOptions=function(){var url=this.getUrl("System/Configuration/devices");return this.getJSON(url)},ApiClient.prototype.getContentUploadHistory=function(){var url=this.getUrl("Devices/CameraUploads",{DeviceId:this.deviceId()});return this.getJSON(url)},ApiClient.prototype.getNamedConfiguration=function(name){var url=this.getUrl("System/Configuration/"+name);return this.getJSON(url)},ApiClient.prototype.getScheduledTasks=function(options){options=options||{};var url=this.getUrl("ScheduledTasks",options);return this.getJSON(url)}, -ApiClient.prototype.startScheduledTask=function(id){if(!id)throw new Error("null id");var url=this.getUrl("ScheduledTasks/Running/"+id);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getScheduledTask=function(id){if(!id)throw new Error("null id");var url=this.getUrl("ScheduledTasks/"+id);return this.getJSON(url)},ApiClient.prototype.getNextUpEpisodes=function(options){var url=this.getUrl("Shows/NextUp",options);return this.getJSON(url)},ApiClient.prototype.stopScheduledTask=function(id){if(!id)throw new Error("null id");var url=this.getUrl("ScheduledTasks/Running/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.getPluginConfiguration=function(id){if(!id)throw new Error("null Id");var url=this.getUrl("Plugins/"+id+"/Configuration");return this.getJSON(url)},ApiClient.prototype.getAvailablePlugins=function(options){options=options||{},options.PackageType="UserInstalled";var url=this.getUrl("Packages",options);return this.getJSON(url)},ApiClient.prototype.uninstallPlugin=function(id){if(!id)throw new Error("null Id");var url=this.getUrl("Plugins/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.removeVirtualFolder=function(name,refreshLibrary){if(!name)throw new Error("null name");var url="Library/VirtualFolders";return url=this.getUrl(url,{refreshLibrary:!!refreshLibrary,name:name}),this.ajax({type:"DELETE",url:url})},ApiClient.prototype.addVirtualFolder=function(name,type,refreshLibrary,libraryOptions){if(!name)throw new Error("null name");var options={};type&&(options.collectionType=type),options.refreshLibrary=!!refreshLibrary,options.name=name;var url="Library/VirtualFolders";return url=this.getUrl(url,options),this.ajax({type:"POST",url:url,data:JSON.stringify({LibraryOptions:libraryOptions}),contentType:"application/json"})},ApiClient.prototype.updateVirtualFolderOptions=function(id,libraryOptions){if(!id)throw new Error("null name");var url="Library/VirtualFolders/LibraryOptions";return url=this.getUrl(url),this.ajax({type:"POST",url:url,data:JSON.stringify({Id:id,LibraryOptions:libraryOptions}),contentType:"application/json"})},ApiClient.prototype.renameVirtualFolder=function(name,newName,refreshLibrary){if(!name)throw new Error("null name");var url="Library/VirtualFolders/Name";return url=this.getUrl(url,{refreshLibrary:!!refreshLibrary,newName:newName,name:name}),this.ajax({type:"POST",url:url})},ApiClient.prototype.addMediaPath=function(virtualFolderName,mediaPath,networkSharePath,refreshLibrary){if(!virtualFolderName)throw new Error("null virtualFolderName");if(!mediaPath)throw new Error("null mediaPath");var url="Library/VirtualFolders/Paths",pathInfo={Path:mediaPath};return networkSharePath&&(pathInfo.NetworkPath=networkSharePath),url=this.getUrl(url,{refreshLibrary:!!refreshLibrary}),this.ajax({type:"POST",url:url,data:JSON.stringify({Name:virtualFolderName,PathInfo:pathInfo}),contentType:"application/json"})},ApiClient.prototype.updateMediaPath=function(virtualFolderName,pathInfo){if(!virtualFolderName)throw new Error("null virtualFolderName");if(!pathInfo)throw new Error("null pathInfo");var url="Library/VirtualFolders/Paths/Update";return url=this.getUrl(url),this.ajax({type:"POST",url:url,data:JSON.stringify({Name:virtualFolderName,PathInfo:pathInfo}),contentType:"application/json"})},ApiClient.prototype.removeMediaPath=function(virtualFolderName,mediaPath,refreshLibrary){if(!virtualFolderName)throw new Error("null virtualFolderName");if(!mediaPath)throw new Error("null mediaPath");var url="Library/VirtualFolders/Paths";return url=this.getUrl(url,{refreshLibrary:!!refreshLibrary,path:mediaPath,name:virtualFolderName}),this.ajax({type:"DELETE",url:url})},ApiClient.prototype.deleteUser=function(id){if(!id)throw new Error("null id");var url=this.getUrl("Users/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.deleteUserImage=function(userId,imageType,imageIndex){if(!userId)throw new Error("null userId");if(!imageType)throw new Error("null imageType");var url=this.getUrl("Users/"+userId+"/Images/"+imageType);return null!=imageIndex&&(url+="/"+imageIndex),this.ajax({type:"DELETE",url:url})},ApiClient.prototype.deleteItemImage=function(itemId,imageType,imageIndex){if(!imageType)throw new Error("null imageType");var url=this.getUrl("Items/"+itemId+"/Images");return url+="/"+imageType,null!=imageIndex&&(url+="/"+imageIndex),this.ajax({type:"DELETE",url:url})},ApiClient.prototype.deleteItem=function(itemId){if(!itemId)throw new Error("null itemId");var url=this.getUrl("Items/"+itemId);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.stopActiveEncodings=function(playSessionId){var options={deviceId:this.deviceId()};playSessionId&&(options.PlaySessionId=playSessionId);var url=this.getUrl("Videos/ActiveEncodings",options);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.reportCapabilities=function(options){var url=this.getUrl("Sessions/Capabilities/Full");return this.ajax({type:"POST",url:url,data:JSON.stringify(options),contentType:"application/json"})},ApiClient.prototype.updateItemImageIndex=function(itemId,imageType,imageIndex,newIndex){if(!imageType)throw new Error("null imageType");var options={newIndex:newIndex},url=this.getUrl("Items/"+itemId+"/Images/"+imageType+"/"+imageIndex+"/Index",options);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getItemImageInfos=function(itemId){var url=this.getUrl("Items/"+itemId+"/Images");return this.getJSON(url)},ApiClient.prototype.getCriticReviews=function(itemId,options){if(!itemId)throw new Error("null itemId");var url=this.getUrl("Items/"+itemId+"/CriticReviews",options);return this.getJSON(url)},ApiClient.prototype.getItemDownloadUrl=function(itemId){if(!itemId)throw new Error("itemId cannot be empty");var url="Items/"+itemId+"/Download";return this.getUrl(url,{api_key:this.accessToken()})},ApiClient.prototype.getSessions=function(options){var url=this.getUrl("Sessions",options);return this.getJSON(url)},ApiClient.prototype.uploadUserImage=function(userId,imageType,file){if(!userId)throw new Error("null userId");if(!imageType)throw new Error("null imageType");if(!file)throw new Error("File must be an image.");if("image/png"!==file.type&&"image/jpeg"!==file.type&&"image/jpeg"!==file.type)throw new Error("File must be an image.");var instance=this;return new Promise(function(resolve,reject){var reader=new FileReader;reader.onerror=function(){reject()},reader.onabort=function(){reject()},reader.onload=function(e){var data=e.target.result.split(",")[1],url=instance.getUrl("Users/"+userId+"/Images/"+imageType);instance.ajax({type:"POST",url:url,data:data,contentType:"image/"+file.name.substring(file.name.lastIndexOf(".")+1)}).then(resolve,reject)},reader.readAsDataURL(file)})},ApiClient.prototype.uploadItemImage=function(itemId,imageType,file){if(!itemId)throw new Error("null itemId");if(!imageType)throw new Error("null imageType");if(!file)throw new Error("File must be an image.");if("image/png"!==file.type&&"image/jpeg"!==file.type&&"image/jpeg"!==file.type)throw new Error("File must be an image.");var url=this.getUrl("Items/"+itemId+"/Images");url+="/"+imageType;var instance=this;return new Promise(function(resolve,reject){var reader=new FileReader;reader.onerror=function(){reject()},reader.onabort=function(){reject()},reader.onload=function(e){var data=e.target.result.split(",")[1];instance.ajax({type:"POST",url:url,data:data,contentType:"image/"+file.name.substring(file.name.lastIndexOf(".")+1)}).then(resolve,reject)},reader.readAsDataURL(file)})},ApiClient.prototype.getInstalledPlugins=function(){var options={},url=this.getUrl("Plugins",options);return this.getJSON(url)},ApiClient.prototype.getUser=function(id){if(!id)throw new Error("Must supply a userId");var url=this.getUrl("Users/"+id);return this.getJSON(url)},ApiClient.prototype.getStudio=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("Studios/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getGenre=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("Genres/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getMusicGenre=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("MusicGenres/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getGameGenre=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("GameGenres/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getArtist=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("Artists/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getPerson=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("Persons/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getPublicUsers=function(){var url=this.getUrl("users/public");return this.ajax({type:"GET",url:url,dataType:"json"},!1)},ApiClient.prototype.getUsers=function(options){var url=this.getUrl("users",options||{});return this.getJSON(url)},ApiClient.prototype.getParentalRatings=function(){var url=this.getUrl("Localization/ParentalRatings");return this.getJSON(url)},ApiClient.prototype.getDefaultImageQuality=function(imageType){return"backdrop"===imageType.toLowerCase()?80:90},ApiClient.prototype.getUserImageUrl=function(userId,options){if(!userId)throw new Error("null userId");options=options||{};var url="Users/"+userId+"/Images/"+options.type;return null!=options.index&&(url+="/"+options.index),normalizeImageOptions(this,options),delete options.type,delete options.index,this.getUrl(url,options)},ApiClient.prototype.getImageUrl=function(itemId,options){if(!itemId)throw new Error("itemId cannot be empty");options=options||{};var url="Items/"+itemId+"/Images/"+options.type;return null!=options.index&&(url+="/"+options.index),options.quality=options.quality||this.getDefaultImageQuality(options.type),this.normalizeImageOptions&&this.normalizeImageOptions(options),delete options.type,delete options.index,this.getUrl(url,options)},ApiClient.prototype.getScaledImageUrl=function(itemId,options){if(!itemId)throw new Error("itemId cannot be empty");options=options||{};var url="Items/"+itemId+"/Images/"+options.type;return null!=options.index&&(url+="/"+options.index),normalizeImageOptions(this,options),delete options.type,delete options.index,delete options.minScale,this.getUrl(url,options)},ApiClient.prototype.getThumbImageUrl=function(item,options){if(!item)throw new Error("null item");return options=options||{},options.imageType="thumb",item.ImageTags&&item.ImageTags.Thumb?(options.tag=item.ImageTags.Thumb,this.getImageUrl(item.Id,options)):item.ParentThumbItemId?(options.tag=item.ImageTags.ParentThumbImageTag,this.getImageUrl(item.ParentThumbItemId,options)):null},ApiClient.prototype.updateUserPassword=function(userId,currentPassword,newPassword){if(!userId)return Promise.reject();var url=this.getUrl("Users/"+userId+"/Password");return this.ajax({type:"POST",url:url,data:JSON.stringify({CurrentPw:currentPassword||"",NewPw:newPassword}),contentType:"application/json"})},ApiClient.prototype.updateEasyPassword=function(userId,newPassword){if(!userId)return void Promise.reject();var url=this.getUrl("Users/"+userId+"/EasyPassword");return this.ajax({type:"POST",url:url,data:{NewPw:newPassword}})},ApiClient.prototype.resetUserPassword=function(userId){if(!userId)throw new Error("null userId");var url=this.getUrl("Users/"+userId+"/Password"),postData={};return postData.resetPassword=!0,this.ajax({type:"POST",url:url,data:postData})},ApiClient.prototype.resetEasyPassword=function(userId){if(!userId)throw new Error("null userId");var url=this.getUrl("Users/"+userId+"/EasyPassword"),postData={};return postData.resetPassword=!0,this.ajax({type:"POST",url:url,data:postData})},ApiClient.prototype.updateServerConfiguration=function(configuration){if(!configuration)throw new Error("null configuration");var url=this.getUrl("System/Configuration");return this.ajax({type:"POST",url:url,data:JSON.stringify(configuration),contentType:"application/json"})},ApiClient.prototype.updateNamedConfiguration=function(name,configuration){if(!configuration)throw new Error("null configuration");var url=this.getUrl("System/Configuration/"+name);return this.ajax({type:"POST",url:url,data:JSON.stringify(configuration),contentType:"application/json"})},ApiClient.prototype.updateItem=function(item){if(!item)throw new Error("null item");var url=this.getUrl("Items/"+item.Id);return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.updatePluginSecurityInfo=function(info){var url=this.getUrl("Plugins/SecurityInfo");return this.ajax({type:"POST",url:url,data:JSON.stringify(info),contentType:"application/json"})},ApiClient.prototype.createUser=function(name){var url=this.getUrl("Users/New");return this.ajax({type:"POST",url:url,data:{Name:name},dataType:"json"})},ApiClient.prototype.updateUser=function(user){if(!user)throw new Error("null user");var url=this.getUrl("Users/"+user.Id);return this.ajax({type:"POST",url:url,data:JSON.stringify(user),contentType:"application/json"})},ApiClient.prototype.updateUserPolicy=function(userId,policy){if(!userId)throw new Error("null userId");if(!policy)throw new Error("null policy");var url=this.getUrl("Users/"+userId+"/Policy");return this.ajax({type:"POST",url:url,data:JSON.stringify(policy),contentType:"application/json"})},ApiClient.prototype.updateUserConfiguration=function(userId,configuration){if(!userId)throw new Error("null userId");if(!configuration)throw new Error("null configuration");var url=this.getUrl("Users/"+userId+"/Configuration");return this.ajax({type:"POST",url:url,data:JSON.stringify(configuration),contentType:"application/json"})},ApiClient.prototype.updateScheduledTaskTriggers=function(id,triggers){if(!id)throw new Error("null id");if(!triggers)throw new Error("null triggers");var url=this.getUrl("ScheduledTasks/"+id+"/Triggers");return this.ajax({type:"POST",url:url,data:JSON.stringify(triggers),contentType:"application/json"})},ApiClient.prototype.updatePluginConfiguration=function(id,configuration){if(!id)throw new Error("null Id");if(!configuration)throw new Error("null configuration");var url=this.getUrl("Plugins/"+id+"/Configuration");return this.ajax({type:"POST",url:url,data:JSON.stringify(configuration),contentType:"application/json"})},ApiClient.prototype.getAncestorItems=function(itemId,userId){if(!itemId)throw new Error("null itemId");var options={};userId&&(options.userId=userId);var url=this.getUrl("Items/"+itemId+"/Ancestors",options);return this.getJSON(url)},ApiClient.prototype.getItems=function(userId,options){var url;return url="string"===(typeof userId).toString().toLowerCase()?this.getUrl("Users/"+userId+"/Items",options):this.getUrl("Items",options),this.getJSON(url)},ApiClient.prototype.getResumableItems=function(userId,options){return this.isMinServerVersion("3.2.33")?this.getJSON(this.getUrl("Users/"+userId+"/Items/Resume",options)):this.getItems(userId,Object.assign({SortBy:"DatePlayed",SortOrder:"Descending",Filters:"IsResumable",Recursive:!0,CollapseBoxSetItems:!1,ExcludeLocationTypes:"Virtual"},options))},ApiClient.prototype.getMovieRecommendations=function(options){return this.getJSON(this.getUrl("Movies/Recommendations",options))},ApiClient.prototype.getUpcomingEpisodes=function(options){return this.getJSON(this.getUrl("Shows/Upcoming",options))},ApiClient.prototype.getUserViews=function(options,userId){options=options||{};var url=this.getUrl("Users/"+(userId||this.getCurrentUserId())+"/Views",options);return this.getJSON(url)},ApiClient.prototype.getArtists=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Artists",options);return this.getJSON(url)},ApiClient.prototype.getAlbumArtists=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Artists/AlbumArtists",options);return this.getJSON(url)},ApiClient.prototype.getGenres=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Genres",options);return this.getJSON(url)},ApiClient.prototype.getMusicGenres=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("MusicGenres",options);return this.getJSON(url)},ApiClient.prototype.getGameGenres=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("GameGenres",options);return this.getJSON(url)},ApiClient.prototype.getPeople=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Persons",options);return this.getJSON(url)},ApiClient.prototype.getStudios=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Studios",options);return this.getJSON(url)},ApiClient.prototype.getLocalTrailers=function(userId,itemId){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/Items/"+itemId+"/LocalTrailers");return this.getJSON(url)},ApiClient.prototype.getGameSystems=function(){var options={},userId=this.getCurrentUserId();userId&&(options.userId=userId);var url=this.getUrl("Games/SystemSummaries",options);return this.getJSON(url)},ApiClient.prototype.getAdditionalVideoParts=function(userId,itemId){if(!itemId)throw new Error("null itemId");var options={};userId&&(options.userId=userId);var url=this.getUrl("Videos/"+itemId+"/AdditionalParts",options);return this.getJSON(url)},ApiClient.prototype.getThemeMedia=function(userId,itemId,inherit){if(!itemId)throw new Error("null itemId");var options={};userId&&(options.userId=userId),options.InheritFromParent=inherit||!1;var url=this.getUrl("Items/"+itemId+"/ThemeMedia",options);return this.getJSON(url)},ApiClient.prototype.getSearchHints=function(options){var url=this.getUrl("Search/Hints",options),serverId=this.serverId();return this.getJSON(url).then(function(result){return result.SearchHints.forEach(function(i){i.ServerId=serverId}),result})},ApiClient.prototype.getSpecialFeatures=function(userId,itemId){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/Items/"+itemId+"/SpecialFeatures");return this.getJSON(url)},ApiClient.prototype.getDateParamValue=function(date){function formatDigit(i){return i<10?"0"+i:i}var d=date;return""+d.getFullYear()+formatDigit(d.getMonth()+1)+formatDigit(d.getDate())+formatDigit(d.getHours())+formatDigit(d.getMinutes())+formatDigit(d.getSeconds())},ApiClient.prototype.markPlayed=function(userId,itemId,date){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var options={};date&&(options.DatePlayed=this.getDateParamValue(date));var url=this.getUrl("Users/"+userId+"/PlayedItems/"+itemId,options);return this.ajax({type:"POST",url:url,dataType:"json"})},ApiClient.prototype.markUnplayed=function(userId,itemId){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/PlayedItems/"+itemId);return this.ajax({type:"DELETE",url:url,dataType:"json"})},ApiClient.prototype.updateFavoriteStatus=function(userId,itemId,isFavorite){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/FavoriteItems/"+itemId),method=isFavorite?"POST":"DELETE";return this.ajax({type:method,url:url,dataType:"json"})},ApiClient.prototype.updateUserItemRating=function(userId,itemId,likes){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/Items/"+itemId+"/Rating",{likes:likes});return this.ajax({type:"POST",url:url,dataType:"json"})},ApiClient.prototype.getItemCounts=function(userId){var options={};userId&&(options.userId=userId);var url=this.getUrl("Items/Counts",options);return this.getJSON(url)},ApiClient.prototype.clearUserItemRating=function(userId,itemId){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/Items/"+itemId+"/Rating");return this.ajax({type:"DELETE",url:url,dataType:"json"})},ApiClient.prototype.reportPlaybackStart=function(options){if(!options)throw new Error("null options");this.lastPlaybackProgressReport=0,this.lastPlaybackProgressReportTicks=null,stopBitrateDetection(this);var url=this.getUrl("Sessions/Playing");return this.ajax({type:"POST",data:JSON.stringify(options),contentType:"application/json",url:url})},ApiClient.prototype.reportPlaybackProgress=function(options){if(!options)throw new Error("null options");var newPositionTicks=options.PositionTicks;if("timeupdate"===(options.EventName||"timeupdate")){var now=(new Date).getTime(),msSinceLastReport=now-(this.lastPlaybackProgressReport||0);if(msSinceLastReport<=1e4){if(!newPositionTicks)return Promise.resolve();var expectedReportTicks=1e4*msSinceLastReport+(this.lastPlaybackProgressReportTicks||0);if(Math.abs((newPositionTicks||0)-expectedReportTicks)<5e7)return Promise.resolve()}this.lastPlaybackProgressReport=now}else this.lastPlaybackProgressReport=0;this.lastPlaybackProgressReportTicks=newPositionTicks;var url=this.getUrl("Sessions/Playing/Progress");return this.ajax({type:"POST",data:JSON.stringify(options),contentType:"application/json",url:url})},ApiClient.prototype.reportOfflineActions=function(actions){if(!actions)throw new Error("null actions");var url=this.getUrl("Sync/OfflineActions");return this.ajax({type:"POST",data:JSON.stringify(actions),contentType:"application/json",url:url})},ApiClient.prototype.syncData=function(data){if(!data)throw new Error("null data");var url=this.getUrl("Sync/Data");return this.ajax({type:"POST",data:JSON.stringify(data),contentType:"application/json",url:url,dataType:"json"})},ApiClient.prototype.getReadySyncItems=function(deviceId){if(!deviceId)throw new Error("null deviceId");var url=this.getUrl("Sync/Items/Ready",{TargetId:deviceId});return this.getJSON(url)},ApiClient.prototype.reportSyncJobItemTransferred=function(syncJobItemId){if(!syncJobItemId)throw new Error("null syncJobItemId");var url=this.getUrl("Sync/JobItems/"+syncJobItemId+"/Transferred");return this.ajax({type:"POST",url:url})},ApiClient.prototype.cancelSyncItems=function(itemIds,targetId){if(!itemIds)throw new Error("null itemIds");var url=this.getUrl("Sync/"+(targetId||this.deviceId())+"/Items",{ItemIds:itemIds.join(",")});return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.reportPlaybackStopped=function(options){if(!options)throw new Error("null options");this.lastPlaybackProgressReport=0,this.lastPlaybackProgressReportTicks=null,redetectBitrate(this);var url=this.getUrl("Sessions/Playing/Stopped");return this.ajax({type:"POST",data:JSON.stringify(options),contentType:"application/json",url:url})},ApiClient.prototype.sendPlayCommand=function(sessionId,options){if(!sessionId)throw new Error("null sessionId");if(!options)throw new Error("null options");var url=this.getUrl("Sessions/"+sessionId+"/Playing",options);return this.ajax({type:"POST",url:url})},ApiClient.prototype.sendCommand=function(sessionId,command){if(!sessionId)throw new Error("null sessionId");if(!command)throw new Error("null command");var url=this.getUrl("Sessions/"+sessionId+"/Command"),ajaxOptions={type:"POST",url:url};return ajaxOptions.data=JSON.stringify(command),ajaxOptions.contentType="application/json",this.ajax(ajaxOptions)},ApiClient.prototype.sendMessageCommand=function(sessionId,options){if(!sessionId)throw new Error("null sessionId");if(!options)throw new Error("null options");var url=this.getUrl("Sessions/"+sessionId+"/Message"),ajaxOptions={type:"POST",url:url};return ajaxOptions.data=JSON.stringify(options),ajaxOptions.contentType="application/json",this.ajax(ajaxOptions)},ApiClient.prototype.sendPlayStateCommand=function(sessionId,command,options){if(!sessionId)throw new Error("null sessionId");if(!command)throw new Error("null command");var url=this.getUrl("Sessions/"+sessionId+"/Playing/"+command,options||{});return this.ajax({type:"POST",url:url})},ApiClient.prototype.createPackageReview=function(review){var url=this.getUrl("Packages/Reviews/"+review.id,review);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getPackageReviews=function(packageId,minRating,maxRating,limit){if(!packageId)throw new Error("null packageId");var options={};minRating&&(options.MinRating=minRating),maxRating&&(options.MaxRating=maxRating),limit&&(options.Limit=limit);var url=this.getUrl("Packages/"+packageId+"/Reviews",options);return this.getJSON(url)},ApiClient.prototype.getSavedEndpointInfo=function(){return this._endPointInfo},ApiClient.prototype.getEndpointInfo=function(){var savedValue=this._endPointInfo;if(savedValue)return Promise.resolve(savedValue);var instance=this;return this.getJSON(this.getUrl("System/Endpoint")).then(function(endPointInfo){return setSavedEndpointInfo(instance,endPointInfo),endPointInfo})},ApiClient.prototype.getWakeOnLanInfo=function(){return this.getJSON(this.getUrl("System/WakeOnLanInfo"))},ApiClient.prototype.getLatestItems=function(options){return options=options||{},this.getJSON(this.getUrl("Users/"+this.getCurrentUserId()+"/Items/Latest",options))},ApiClient.prototype.getFilters=function(options){return this.getJSON(this.getUrl("Items/Filters2",options))},ApiClient.prototype.supportsWakeOnLan=function(){return!!wakeOnLan.isSupported()&&getCachedWakeOnLanInfo(this).length>0},ApiClient.prototype.wakeOnLan=function(){var infos=getCachedWakeOnLanInfo(this);return new Promise(function(resolve,reject){sendNextWakeOnLan(infos,0,resolve)})},ApiClient.prototype.setSystemInfo=function(info){this._serverVersion=info.Version},ApiClient.prototype.serverVersion=function(){return this._serverVersion},ApiClient.prototype.isMinServerVersion=function(version){var serverVersion=this.serverVersion();return!!serverVersion&&compareVersions(serverVersion,version)>=0},ApiClient.prototype.handleMessageReceived=function(msg){onMessageReceivedInternal(this,msg)},ApiClient}); \ No newline at end of file +define(["events","appStorage","wakeOnLan"],function(events,appStorage,wakeOnLan){"use strict";function redetectBitrate(instance){stopBitrateDetection(instance),instance.accessToken()&&!1!==instance.enableAutomaticBitrateDetection&&setTimeout(redetectBitrateInternal.bind(instance),6e3)}function redetectBitrateInternal(){this.accessToken()&&this.detectBitrate()}function stopBitrateDetection(instance){instance.detectTimeout&&clearTimeout(instance.detectTimeout)}function replaceAll(originalString,strReplace,strWith){var reg=new RegExp(strReplace,"ig");return originalString.replace(reg,strWith)}function onFetchFail(instance,url,response){events.trigger(instance,"requestfail",[{url:url,status:response.status,errorCode:response.headers?response.headers.get("X-Application-Error-Code"):null}])}function paramsToString(params){var values=[];for(var key in params){var value=params[key];null!==value&&void 0!==value&&""!==value&&values.push(encodeURIComponent(key)+"="+encodeURIComponent(value))}return values.join("&")}function fetchWithTimeout(url,options,timeoutMs){return new Promise(function(resolve,reject){var timeout=setTimeout(reject,timeoutMs);options=options||{},options.credentials="same-origin",fetch(url,options).then(function(response){clearTimeout(timeout),resolve(response)},function(error){clearTimeout(timeout),reject(error)})})}function getFetchPromise(request){var headers=request.headers||{};"json"===request.dataType&&(headers.accept="application/json");var fetchRequest={headers:headers,method:request.type,credentials:"same-origin"},contentType=request.contentType;return request.data&&("string"==typeof request.data?fetchRequest.body=request.data:(fetchRequest.body=paramsToString(request.data),contentType=contentType||"application/x-www-form-urlencoded; charset=UTF-8")),contentType&&(headers["Content-Type"]=contentType),request.timeout?fetchWithTimeout(request.url,fetchRequest,request.timeout):fetch(request.url,fetchRequest)}function ApiClient(serverAddress,appName,appVersion,deviceName,deviceId,devicePixelRatio){if(!serverAddress)throw new Error("Must supply a serverAddress");console.log("ApiClient serverAddress: "+serverAddress),console.log("ApiClient appName: "+appName),console.log("ApiClient appVersion: "+appVersion),console.log("ApiClient deviceName: "+deviceName),console.log("ApiClient deviceId: "+deviceId),this._serverInfo={},this._serverAddress=serverAddress,this._deviceId=deviceId,this._deviceName=deviceName,this._appName=appName,this._appVersion=appVersion,this._devicePixelRatio=devicePixelRatio}function setSavedEndpointInfo(instance,info){instance._endPointInfo=info}function getTryConnectPromise(instance,url,state,resolve,reject){console.log("getTryConnectPromise "+url),fetchWithTimeout(instance.getUrl("system/info/public",null,url),{method:"GET",accept:"application/json"},15e3).then(function(){state.resolved||(state.resolved=!0,console.log("Reconnect succeeded to "+url),instance.serverAddress(url),resolve())},function(){state.resolved||(console.log("Reconnect failed to "+url),++state.rejects>=state.numAddresses&&reject())})}function tryReconnectInternal(instance){var addresses=[],addressesStrings=[],serverInfo=instance.serverInfo();return serverInfo.LocalAddress&&-1===addressesStrings.indexOf(serverInfo.LocalAddress)&&(addresses.push({url:serverInfo.LocalAddress,timeout:0}),addressesStrings.push(addresses[addresses.length-1].url)),serverInfo.ManualAddress&&-1===addressesStrings.indexOf(serverInfo.ManualAddress)&&(addresses.push({url:serverInfo.ManualAddress,timeout:100}),addressesStrings.push(addresses[addresses.length-1].url)),serverInfo.RemoteAddress&&-1===addressesStrings.indexOf(serverInfo.RemoteAddress)&&(addresses.push({url:serverInfo.RemoteAddress,timeout:200}),addressesStrings.push(addresses[addresses.length-1].url)),console.log("tryReconnect: "+addressesStrings.join("|")),new Promise(function(resolve,reject){var state={};state.numAddresses=addresses.length,state.rejects=0,addresses.map(function(url){setTimeout(function(){state.resolved||getTryConnectPromise(instance,url.url,state,resolve,reject)},url.timeout)})})}function tryReconnect(instance,retryCount){return retryCount=retryCount||0,retryCount>=20?Promise.reject():tryReconnectInternal(instance).catch(function(err){return console.log("error in tryReconnectInternal: "+(err||"")),new Promise(function(resolve,reject){setTimeout(function(){tryReconnect(instance,retryCount+1).then(resolve,reject)},500)})})}function getCachedUser(instance,userId){var serverId=instance.serverId();if(!serverId)return null;var json=appStorage.getItem("user-"+userId+"-"+serverId);return json?JSON.parse(json):null}function onWebSocketMessage(msg){var instance=this;msg=JSON.parse(msg.data),onMessageReceivedInternal(instance,msg)}function onMessageReceivedInternal(instance,msg){var messageId=msg.MessageId;if(messageId){if(messageIdsReceived[messageId])return;messageIdsReceived[messageId]=!0}if("UserDeleted"===msg.MessageType)instance._currentUser=null;else if("UserUpdated"===msg.MessageType||"UserConfigurationUpdated"===msg.MessageType){var user=msg.Data;user.Id===instance.getCurrentUserId()&&(instance._currentUser=null)}events.trigger(instance,"message",[msg])}function onWebSocketOpen(){var instance=this;console.log("web socket connection opened"),events.trigger(instance,"websocketopen")}function onWebSocketError(){var instance=this;events.trigger(instance,"websocketerror")}function setSocketOnClose(apiClient,socket){socket.onclose=function(){console.log("web socket closed"),apiClient._webSocket===socket&&(console.log("nulling out web socket"),apiClient._webSocket=null),setTimeout(function(){events.trigger(apiClient,"websocketclose")},0)}}function normalizeReturnBitrate(instance,bitrate){if(!bitrate)return instance.lastDetectedBitrate?instance.lastDetectedBitrate:Promise.reject();var result=Math.round(.7*bitrate);if(instance.getMaxBandwidth){var maxRate=instance.getMaxBandwidth();maxRate&&(result=Math.min(result,maxRate))}return instance.lastDetectedBitrate=result,instance.lastDetectedBitrateTime=(new Date).getTime(),result}function detectBitrateInternal(instance,tests,index,currentBitrate){if(index>=tests.length)return normalizeReturnBitrate(instance,currentBitrate);var test=tests[index];return instance.getDownloadSpeed(test.bytes).then(function(bitrate){return bitrate=infos.length)return void resolve();var info=infos[index];console.log("sending wakeonlan to "+info.MacAddress),wakeOnLan.send(info).then(function(result){sendNextWakeOnLan(infos,index+1,resolve)},function(){sendNextWakeOnLan(infos,index+1,resolve)})}function compareVersions(a,b){a=a.split("."),b=b.split(".");for(var i=0,length=Math.max(a.length,b.length);ibVal)return 1}return 0}ApiClient.prototype.appName=function(){return this._appName},ApiClient.prototype.setRequestHeaders=function(headers){var currentServerInfo=this.serverInfo(),appName=this._appName,accessToken=currentServerInfo.AccessToken,values=[];if(appName&&values.push('Client="'+appName+'"'),this._deviceName&&values.push('Device="'+this._deviceName+'"'),this._deviceId&&values.push('DeviceId="'+this._deviceId+'"'),this._appVersion&&values.push('Version="'+this._appVersion+'"'),accessToken&&values.push('Token="'+accessToken+'"'),values.length){var auth="MediaBrowser "+values.join(", ");headers["X-Emby-Authorization"]=auth}},ApiClient.prototype.appVersion=function(){return this._appVersion},ApiClient.prototype.deviceName=function(){return this._deviceName},ApiClient.prototype.deviceId=function(){return this._deviceId},ApiClient.prototype.serverAddress=function(val){if(null!=val){if(0!==val.toLowerCase().indexOf("http"))throw new Error("Invalid url: "+val);var changed=val!==this._serverAddress;this._serverAddress=val,this.onNetworkChange(),changed&&events.trigger(this,"serveraddresschanged")}return this._serverAddress},ApiClient.prototype.onNetworkChange=function(){this.lastDetectedBitrate=0,this.lastDetectedBitrateTime=0,setSavedEndpointInfo(this,null),redetectBitrate(this),refreshWakeOnLanInfoIfNeeded(this)},ApiClient.prototype.getUrl=function(name,params,serverAddress){if(!name)throw new Error("Url name cannot be empty");var url=serverAddress||this._serverAddress;if(!url)throw new Error("serverAddress is yet not set");var lowered=url.toLowerCase();return-1===lowered.indexOf("/emby")&&-1===lowered.indexOf("/mediabrowser")&&(url+="/emby"),"/"!==name.charAt(0)&&(url+="/"),url+=name,params&&(params=paramsToString(params))&&(url+="?"+params),url},ApiClient.prototype.fetchWithFailover=function(request,enableReconnection){console.log("Requesting "+request.url),request.timeout=3e4;var instance=this;return getFetchPromise(request).then(function(response){return instance.lastFetch=(new Date).getTime(),response.status<400?"json"===request.dataType||"application/json"===request.headers.accept?response.json():"text"===request.dataType||0===(response.headers.get("Content-Type")||"").toLowerCase().indexOf("text/")?response.text():response:(onFetchFail(instance,request.url,response),Promise.reject(response))},function(error){if(error?console.log("Request failed to "+request.url+" "+(error.status||"")+" "+error.toString()):console.log("Request timed out to "+request.url),error&&error.status||!enableReconnection)throw console.log("Reporting request failure"),onFetchFail(instance,request.url,{}),error;console.log("Attempting reconnection");var previousServerAddress=instance.serverAddress();return tryReconnect(instance).then(function(){return console.log("Reconnect succeesed"),request.url=request.url.replace(previousServerAddress,instance.serverAddress()),instance.fetchWithFailover(request,!1)},function(innerError){throw console.log("Reconnect failed"),onFetchFail(instance,request.url,{}),innerError})})},ApiClient.prototype.fetch=function(request,includeAuthorization){if(!request)throw new Error("Request cannot be null");if(request.headers=request.headers||{},!1!==includeAuthorization&&this.setRequestHeaders(request.headers),!1===this.enableAutomaticNetworking||"GET"!==request.type){console.log("Requesting url without automatic networking: "+request.url);var instance=this;return getFetchPromise(request).then(function(response){return instance.lastFetch=(new Date).getTime(),response.status<400?"json"===request.dataType||"application/json"===request.headers.accept?response.json():"text"===request.dataType||0===(response.headers.get("Content-Type")||"").toLowerCase().indexOf("text/")?response.text():response:(onFetchFail(instance,request.url,response),Promise.reject(response))},function(error){throw onFetchFail(instance,request.url,{}),error})}return this.fetchWithFailover(request,!0)},ApiClient.prototype.setAuthenticationInfo=function(accessKey,userId){this._currentUser=null,this._serverInfo.AccessToken=accessKey,this._serverInfo.UserId=userId,redetectBitrate(this),refreshWakeOnLanInfoIfNeeded(this)},ApiClient.prototype.serverInfo=function(info){return info&&(this._serverInfo=info),this._serverInfo},ApiClient.prototype.getCurrentUserId=function(){return this._serverInfo.UserId},ApiClient.prototype.accessToken=function(){return this._serverInfo.AccessToken},ApiClient.prototype.serverId=function(){return this.serverInfo().Id},ApiClient.prototype.serverName=function(){return this.serverInfo().Name},ApiClient.prototype.ajax=function(request,includeAuthorization){if(!request)throw new Error("Request cannot be null");return this.fetch(request,includeAuthorization)},ApiClient.prototype.getCurrentUser=function(enableCache){if(this._currentUser)return Promise.resolve(this._currentUser);var userId=this.getCurrentUserId();if(!userId)return Promise.reject();var user,instance=this,serverPromise=this.getUser(userId).then(function(user){return appStorage.setItem("user-"+user.Id+"-"+user.ServerId,JSON.stringify(user)),instance._currentUser=user,user},function(response){if(!response.status&&userId&&instance.accessToken()&&(user=getCachedUser(instance,userId)))return Promise.resolve(user);throw response});return!this.lastFetch&&!1!==enableCache&&(user=getCachedUser(instance,userId))?Promise.resolve(user):serverPromise},ApiClient.prototype.isLoggedIn=function(){var info=this.serverInfo();return!!(info&&info.UserId&&info.AccessToken)},ApiClient.prototype.logout=function(){stopBitrateDetection(this),this.closeWebSocket();var done=function(){this.setAuthenticationInfo(null,null)}.bind(this);if(this.accessToken()){var url=this.getUrl("Sessions/Logout");return this.ajax({type:"POST",url:url}).then(done,done)}return done(),Promise.resolve()},ApiClient.prototype.authenticateUserByName=function(name,password){if(!name)return Promise.reject();var url=this.getUrl("Users/authenticatebyname"),instance=this;return new Promise(function(resolve,reject){var postData={Username:name,Pw:password||""};instance.ajax({type:"POST",url:url,data:JSON.stringify(postData),dataType:"json",contentType:"application/json"}).then(function(result){var afterOnAuthenticated=function(){redetectBitrate(instance),refreshWakeOnLanInfoIfNeeded(instance),resolve(result)};instance.onAuthenticated?instance.onAuthenticated(instance,result).then(afterOnAuthenticated):afterOnAuthenticated()},reject)})},ApiClient.prototype.ensureWebSocket=function(){if(!this.isWebSocketOpenOrConnecting()&&this.isWebSocketSupported())try{this.openWebSocket()}catch(err){console.log("Error opening web socket: "+err)}};var messageIdsReceived={};return ApiClient.prototype.openWebSocket=function(){var accessToken=this.accessToken();if(!accessToken)throw new Error("Cannot open web socket without access token.");var url=this.getUrl("socket");url=replaceAll(url,"emby/socket","embywebsocket"),url=replaceAll(url,"https:","wss:"),url=replaceAll(url,"http:","ws:"),url+="?api_key="+accessToken,url+="&deviceId="+this.deviceId(),console.log("opening web socket with url: "+url);var webSocket=new WebSocket(url);webSocket.onmessage=onWebSocketMessage.bind(this),webSocket.onopen=onWebSocketOpen.bind(this),webSocket.onerror=onWebSocketError.bind(this),setSocketOnClose(this,webSocket),this._webSocket=webSocket},ApiClient.prototype.closeWebSocket=function(){var socket=this._webSocket;socket&&socket.readyState===WebSocket.OPEN&&socket.close()},ApiClient.prototype.sendWebSocketMessage=function(name,data){console.log("Sending web socket message: "+name);var msg={MessageType:name};data&&(msg.Data=data),msg=JSON.stringify(msg),this._webSocket.send(msg)},ApiClient.prototype.sendMessage=function(name,data){this.isWebSocketOpen()&&this.sendWebSocketMessage(name,data)},ApiClient.prototype.isMessageChannelOpen=function(){return this.isWebSocketOpen()},ApiClient.prototype.isWebSocketOpen=function(){var socket=this._webSocket;return!!socket&&socket.readyState===WebSocket.OPEN},ApiClient.prototype.isWebSocketOpenOrConnecting=function(){var socket=this._webSocket;return!!socket&&(socket.readyState===WebSocket.OPEN||socket.readyState===WebSocket.CONNECTING)},ApiClient.prototype.get=function(url){return this.ajax({type:"GET",url:url})},ApiClient.prototype.getJSON=function(url,includeAuthorization){return this.fetch({url:url,type:"GET",dataType:"json",headers:{accept:"application/json"}},includeAuthorization)},ApiClient.prototype.updateServerInfo=function(server,serverUrl){if(null==server)throw new Error("server cannot be null");if(this.serverInfo(server),!serverUrl)throw new Error("serverUrl cannot be null. serverInfo: "+JSON.stringify(server));console.log("Setting server address to "+serverUrl),this.serverAddress(serverUrl)},ApiClient.prototype.isWebSocketSupported=function(){try{return null!=WebSocket}catch(err){return!1}},ApiClient.prototype.clearAuthenticationInfo=function(){this.setAuthenticationInfo(null,null)},ApiClient.prototype.encodeName=function(name){name=name.split("/").join("-"),name=name.split("&").join("-"),name=name.split("?").join("-");var val=paramsToString({name:name});return val.substring(val.indexOf("=")+1).replace("'","%27")},ApiClient.prototype.getProductNews=function(options){options=options||{};var url=this.getUrl("News/Product",options);return this.getJSON(url)},ApiClient.prototype.getDownloadSpeed=function(byteSize){var url=this.getUrl("Playback/BitrateTest",{Size:byteSize}),now=(new Date).getTime();return this.ajax({type:"GET",url:url,timeout:5e3}).then(function(){var responseTimeSeconds=((new Date).getTime()-now)/1e3,bytesPerSecond=byteSize/responseTimeSeconds;return Math.round(8*bytesPerSecond)})},ApiClient.prototype.detectBitrate=function(force){if(!force&&this.lastDetectedBitrate&&(new Date).getTime()-(this.lastDetectedBitrateTime||0)<=36e5)return Promise.resolve(this.lastDetectedBitrate);var instance=this;return this.getEndpointInfo().then(function(info){return detectBitrateWithEndpointInfo(instance,info)},function(info){return detectBitrateWithEndpointInfo(instance,{})})},ApiClient.prototype.getItem=function(userId,itemId){if(!itemId)throw new Error("null itemId");var url=userId?this.getUrl("Users/"+userId+"/Items/"+itemId):this.getUrl("Items/"+itemId);return this.getJSON(url)},ApiClient.prototype.getRootFolder=function(userId){if(!userId)throw new Error("null userId");var url=this.getUrl("Users/"+userId+"/Items/Root");return this.getJSON(url)},ApiClient.prototype.getNotificationSummary=function(userId){if(!userId)throw new Error("null userId");var url=this.getUrl("Notifications/"+userId+"/Summary");return this.getJSON(url)},ApiClient.prototype.getNotifications=function(userId,options){if(!userId)throw new Error("null userId");var url=this.getUrl("Notifications/"+userId,options||{});return this.getJSON(url)},ApiClient.prototype.markNotificationsRead=function(userId,idList,isRead){if(!userId)throw new Error("null userId");if(!idList)throw new Error("null idList");var suffix=isRead?"Read":"Unread",params={UserId:userId,Ids:idList.join(",")},url=this.getUrl("Notifications/"+userId+"/"+suffix,params);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getRemoteImageProviders=function(options){if(!options)throw new Error("null options");var urlPrefix=getRemoteImagePrefix(this,options),url=this.getUrl(urlPrefix+"/RemoteImages/Providers",options);return this.getJSON(url)},ApiClient.prototype.getAvailableRemoteImages=function(options){if(!options)throw new Error("null options");var urlPrefix=getRemoteImagePrefix(this,options),url=this.getUrl(urlPrefix+"/RemoteImages",options);return this.getJSON(url)},ApiClient.prototype.downloadRemoteImage=function(options){if(!options)throw new Error("null options");var urlPrefix=getRemoteImagePrefix(this,options),url=this.getUrl(urlPrefix+"/RemoteImages/Download",options);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getRecordingFolders=function(userId){var url=this.getUrl("LiveTv/Recordings/Folders",{userId:userId});return this.getJSON(url)},ApiClient.prototype.getLiveTvInfo=function(options){var url=this.getUrl("LiveTv/Info",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvGuideInfo=function(options){var url=this.getUrl("LiveTv/GuideInfo",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvChannel=function(id,userId){if(!id)throw new Error("null id");var options={};userId&&(options.userId=userId);var url=this.getUrl("LiveTv/Channels/"+id,options);return this.getJSON(url)},ApiClient.prototype.getLiveTvChannels=function(options){var url=this.getUrl("LiveTv/Channels",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvPrograms=function(options){return options=options||{},options.channelIds&&options.channelIds.length>1800?this.ajax({type:"POST",url:this.getUrl("LiveTv/Programs"),data:JSON.stringify(options),contentType:"application/json",dataType:"json"}):this.ajax({type:"GET",url:this.getUrl("LiveTv/Programs",options),dataType:"json"})},ApiClient.prototype.getLiveTvRecommendedPrograms=function(options){return options=options||{},this.ajax({type:"GET",url:this.getUrl("LiveTv/Programs/Recommended",options),dataType:"json"})},ApiClient.prototype.getLiveTvRecordings=function(options){var url=this.getUrl("LiveTv/Recordings",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvRecordingSeries=function(options){var url=this.getUrl("LiveTv/Recordings/Series",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvRecordingGroups=function(options){var url=this.getUrl("LiveTv/Recordings/Groups",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvRecordingGroup=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Recordings/Groups/"+id);return this.getJSON(url)},ApiClient.prototype.getLiveTvRecording=function(id,userId){if(!id)throw new Error("null id");var options={};userId&&(options.userId=userId);var url=this.getUrl("LiveTv/Recordings/"+id,options);return this.getJSON(url)},ApiClient.prototype.getLiveTvProgram=function(id,userId){if(!id)throw new Error("null id");var options={};userId&&(options.userId=userId);var url=this.getUrl("LiveTv/Programs/"+id,options);return this.getJSON(url)},ApiClient.prototype.deleteLiveTvRecording=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Recordings/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.cancelLiveTvTimer=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Timers/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.getLiveTvTimers=function(options){var url=this.getUrl("LiveTv/Timers",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvTimer=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Timers/"+id);return this.getJSON(url)},ApiClient.prototype.getNewLiveTvTimerDefaults=function(options){options=options||{};var url=this.getUrl("LiveTv/Timers/Defaults",options);return this.getJSON(url)},ApiClient.prototype.createLiveTvTimer=function(item){if(!item)throw new Error("null item");var url=this.getUrl("LiveTv/Timers");return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.updateLiveTvTimer=function(item){if(!item)throw new Error("null item");var url=this.getUrl("LiveTv/Timers/"+item.Id);return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.resetLiveTvTuner=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/Tuners/"+id+"/Reset");return this.ajax({type:"POST",url:url})},ApiClient.prototype.getLiveTvSeriesTimers=function(options){var url=this.getUrl("LiveTv/SeriesTimers",options||{});return this.getJSON(url)},ApiClient.prototype.getLiveTvSeriesTimer=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/SeriesTimers/"+id);return this.getJSON(url)},ApiClient.prototype.cancelLiveTvSeriesTimer=function(id){if(!id)throw new Error("null id");var url=this.getUrl("LiveTv/SeriesTimers/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.createLiveTvSeriesTimer=function(item){if(!item)throw new Error("null item");var url=this.getUrl("LiveTv/SeriesTimers");return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.updateLiveTvSeriesTimer=function(item){if(!item)throw new Error("null item");var url=this.getUrl("LiveTv/SeriesTimers/"+item.Id);return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.getRegistrationInfo=function(feature){var url=this.getUrl("Registrations/"+feature);return this.getJSON(url)},ApiClient.prototype.getSystemInfo=function(){var url=this.getUrl("System/Info"),instance=this;return this.getJSON(url).then(function(info){return instance.setSystemInfo(info),Promise.resolve(info)})},ApiClient.prototype.getSyncStatus=function(itemId){var url=this.getUrl("Sync/"+itemId+"/Status");return this.ajax({url:url,type:"POST",dataType:"json",contentType:"application/json",data:JSON.stringify({TargetId:this.deviceId()})})},ApiClient.prototype.getPublicSystemInfo=function(){var url=this.getUrl("System/Info/Public"),instance=this;return this.getJSON(url).then(function(info){return instance.setSystemInfo(info),Promise.resolve(info)})},ApiClient.prototype.getInstantMixFromItem=function(itemId,options){var url=this.getUrl("Items/"+itemId+"/InstantMix",options);return this.getJSON(url)},ApiClient.prototype.getEpisodes=function(itemId,options){var url=this.getUrl("Shows/"+itemId+"/Episodes",options);return this.getJSON(url)},ApiClient.prototype.getDisplayPreferences=function(id,userId,app){var url=this.getUrl("DisplayPreferences/"+id,{userId:userId,client:app});return this.getJSON(url)},ApiClient.prototype.updateDisplayPreferences=function(id,obj,userId,app){var url=this.getUrl("DisplayPreferences/"+id,{userId:userId,client:app});return this.ajax({type:"POST",url:url,data:JSON.stringify(obj),contentType:"application/json"})},ApiClient.prototype.getSeasons=function(itemId,options){var url=this.getUrl("Shows/"+itemId+"/Seasons",options);return this.getJSON(url)},ApiClient.prototype.getSimilarItems=function(itemId,options){var url=this.getUrl("Items/"+itemId+"/Similar",options);return this.getJSON(url)},ApiClient.prototype.getCultures=function(){var url=this.getUrl("Localization/cultures");return this.getJSON(url)},ApiClient.prototype.getCountries=function(){var url=this.getUrl("Localization/countries");return this.getJSON(url)},ApiClient.prototype.getPlaybackInfo=function(itemId,options,deviceProfile){var postData={DeviceProfile:deviceProfile};return this.ajax({url:this.getUrl("Items/"+itemId+"/PlaybackInfo",options),type:"POST",data:JSON.stringify(postData),contentType:"application/json",dataType:"json"})},ApiClient.prototype.getLiveStreamMediaInfo=function(liveStreamId){var postData={LiveStreamId:liveStreamId};return this.ajax({url:this.getUrl("LiveStreams/MediaInfo"),type:"POST",data:JSON.stringify(postData),contentType:"application/json",dataType:"json"})},ApiClient.prototype.getIntros=function(itemId){return this.getJSON(this.getUrl("Users/"+this.getCurrentUserId()+"/Items/"+itemId+"/Intros"))},ApiClient.prototype.getDirectoryContents=function(path,options){if(!path)throw new Error("null path");if("string"!=typeof path)throw new Error("invalid path");options=options||{},options.path=path;var url=this.getUrl("Environment/DirectoryContents",options);return this.getJSON(url)},ApiClient.prototype.getNetworkShares=function(path){if(!path)throw new Error("null path");var options={};options.path=path;var url=this.getUrl("Environment/NetworkShares",options);return this.getJSON(url)},ApiClient.prototype.getParentPath=function(path){if(!path)throw new Error("null path");var options={};options.path=path;var url=this.getUrl("Environment/ParentPath",options);return this.ajax({type:"GET",url:url,dataType:"text"})},ApiClient.prototype.getDrives=function(){var url=this.getUrl("Environment/Drives");return this.getJSON(url)},ApiClient.prototype.getNetworkDevices=function(){var url=this.getUrl("Environment/NetworkDevices");return this.getJSON(url)},ApiClient.prototype.cancelPackageInstallation=function(installationId){if(!installationId)throw new Error("null installationId");var url=this.getUrl("Packages/Installing/"+installationId);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.refreshItem=function(itemId,options){if(!itemId)throw new Error("null itemId");var url=this.getUrl("Items/"+itemId+"/Refresh",options||{});return this.ajax({type:"POST",url:url})},ApiClient.prototype.installPlugin=function(name,guid,updateClass,version){if(!name)throw new Error("null name");if(!updateClass)throw new Error("null updateClass");var options={updateClass:updateClass,AssemblyGuid:guid};version&&(options.version=version);var url=this.getUrl("Packages/Installed/"+name,options);return this.ajax({type:"POST",url:url})},ApiClient.prototype.restartServer=function(){var url=this.getUrl("System/Restart");return this.ajax({type:"POST",url:url})},ApiClient.prototype.shutdownServer=function(){var url=this.getUrl("System/Shutdown");return this.ajax({type:"POST",url:url})},ApiClient.prototype.getPackageInfo=function(name,guid){if(!name)throw new Error("null name");var options={AssemblyGuid:guid},url=this.getUrl("Packages/"+name,options);return this.getJSON(url)},ApiClient.prototype.getAvailableApplicationUpdate=function(){var url=this.getUrl("Packages/Updates",{PackageType:"System"});return this.getJSON(url)},ApiClient.prototype.getAvailablePluginUpdates=function(){var url=this.getUrl("Packages/Updates",{PackageType:"UserInstalled"});return this.getJSON(url)},ApiClient.prototype.getVirtualFolders=function(){var url="Library/VirtualFolders";return url=this.getUrl(url),this.getJSON(url)},ApiClient.prototype.getPhysicalPaths=function(){var url=this.getUrl("Library/PhysicalPaths");return this.getJSON(url)},ApiClient.prototype.getServerConfiguration=function(){var url=this.getUrl("System/Configuration");return this.getJSON(url)},ApiClient.prototype.getDevicesOptions=function(){var url=this.getUrl("System/Configuration/devices");return this.getJSON(url)},ApiClient.prototype.getContentUploadHistory=function(){var url=this.getUrl("Devices/CameraUploads",{DeviceId:this.deviceId()});return this.getJSON(url)},ApiClient.prototype.getNamedConfiguration=function(name){var url=this.getUrl("System/Configuration/"+name);return this.getJSON(url)},ApiClient.prototype.getScheduledTasks=function(options){options=options||{} +;var url=this.getUrl("ScheduledTasks",options);return this.getJSON(url)},ApiClient.prototype.startScheduledTask=function(id){if(!id)throw new Error("null id");var url=this.getUrl("ScheduledTasks/Running/"+id);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getScheduledTask=function(id){if(!id)throw new Error("null id");var url=this.getUrl("ScheduledTasks/"+id);return this.getJSON(url)},ApiClient.prototype.getNextUpEpisodes=function(options){var url=this.getUrl("Shows/NextUp",options);return this.getJSON(url)},ApiClient.prototype.stopScheduledTask=function(id){if(!id)throw new Error("null id");var url=this.getUrl("ScheduledTasks/Running/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.getPluginConfiguration=function(id){if(!id)throw new Error("null Id");var url=this.getUrl("Plugins/"+id+"/Configuration");return this.getJSON(url)},ApiClient.prototype.getAvailablePlugins=function(options){options=options||{},options.PackageType="UserInstalled";var url=this.getUrl("Packages",options);return this.getJSON(url)},ApiClient.prototype.uninstallPlugin=function(id){if(!id)throw new Error("null Id");var url=this.getUrl("Plugins/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.removeVirtualFolder=function(name,refreshLibrary){if(!name)throw new Error("null name");var url="Library/VirtualFolders";return url=this.getUrl(url,{refreshLibrary:!!refreshLibrary,name:name}),this.ajax({type:"DELETE",url:url})},ApiClient.prototype.addVirtualFolder=function(name,type,refreshLibrary,libraryOptions){if(!name)throw new Error("null name");var options={};type&&(options.collectionType=type),options.refreshLibrary=!!refreshLibrary,options.name=name;var url="Library/VirtualFolders";return url=this.getUrl(url,options),this.ajax({type:"POST",url:url,data:JSON.stringify({LibraryOptions:libraryOptions}),contentType:"application/json"})},ApiClient.prototype.updateVirtualFolderOptions=function(id,libraryOptions){if(!id)throw new Error("null name");var url="Library/VirtualFolders/LibraryOptions";return url=this.getUrl(url),this.ajax({type:"POST",url:url,data:JSON.stringify({Id:id,LibraryOptions:libraryOptions}),contentType:"application/json"})},ApiClient.prototype.renameVirtualFolder=function(name,newName,refreshLibrary){if(!name)throw new Error("null name");var url="Library/VirtualFolders/Name";return url=this.getUrl(url,{refreshLibrary:!!refreshLibrary,newName:newName,name:name}),this.ajax({type:"POST",url:url})},ApiClient.prototype.addMediaPath=function(virtualFolderName,mediaPath,networkSharePath,refreshLibrary){if(!virtualFolderName)throw new Error("null virtualFolderName");if(!mediaPath)throw new Error("null mediaPath");var url="Library/VirtualFolders/Paths",pathInfo={Path:mediaPath};return networkSharePath&&(pathInfo.NetworkPath=networkSharePath),url=this.getUrl(url,{refreshLibrary:!!refreshLibrary}),this.ajax({type:"POST",url:url,data:JSON.stringify({Name:virtualFolderName,PathInfo:pathInfo}),contentType:"application/json"})},ApiClient.prototype.updateMediaPath=function(virtualFolderName,pathInfo){if(!virtualFolderName)throw new Error("null virtualFolderName");if(!pathInfo)throw new Error("null pathInfo");var url="Library/VirtualFolders/Paths/Update";return url=this.getUrl(url),this.ajax({type:"POST",url:url,data:JSON.stringify({Name:virtualFolderName,PathInfo:pathInfo}),contentType:"application/json"})},ApiClient.prototype.removeMediaPath=function(virtualFolderName,mediaPath,refreshLibrary){if(!virtualFolderName)throw new Error("null virtualFolderName");if(!mediaPath)throw new Error("null mediaPath");var url="Library/VirtualFolders/Paths";return url=this.getUrl(url,{refreshLibrary:!!refreshLibrary,path:mediaPath,name:virtualFolderName}),this.ajax({type:"DELETE",url:url})},ApiClient.prototype.deleteUser=function(id){if(!id)throw new Error("null id");var url=this.getUrl("Users/"+id);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.deleteUserImage=function(userId,imageType,imageIndex){if(!userId)throw new Error("null userId");if(!imageType)throw new Error("null imageType");var url=this.getUrl("Users/"+userId+"/Images/"+imageType);return null!=imageIndex&&(url+="/"+imageIndex),this.ajax({type:"DELETE",url:url})},ApiClient.prototype.deleteItemImage=function(itemId,imageType,imageIndex){if(!imageType)throw new Error("null imageType");var url=this.getUrl("Items/"+itemId+"/Images");return url+="/"+imageType,null!=imageIndex&&(url+="/"+imageIndex),this.ajax({type:"DELETE",url:url})},ApiClient.prototype.deleteItem=function(itemId){if(!itemId)throw new Error("null itemId");var url=this.getUrl("Items/"+itemId);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.stopActiveEncodings=function(playSessionId){var options={deviceId:this.deviceId()};playSessionId&&(options.PlaySessionId=playSessionId);var url=this.getUrl("Videos/ActiveEncodings",options);return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.reportCapabilities=function(options){var url=this.getUrl("Sessions/Capabilities/Full");return this.ajax({type:"POST",url:url,data:JSON.stringify(options),contentType:"application/json"})},ApiClient.prototype.updateItemImageIndex=function(itemId,imageType,imageIndex,newIndex){if(!imageType)throw new Error("null imageType");var options={newIndex:newIndex},url=this.getUrl("Items/"+itemId+"/Images/"+imageType+"/"+imageIndex+"/Index",options);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getItemImageInfos=function(itemId){var url=this.getUrl("Items/"+itemId+"/Images");return this.getJSON(url)},ApiClient.prototype.getCriticReviews=function(itemId,options){if(!itemId)throw new Error("null itemId");var url=this.getUrl("Items/"+itemId+"/CriticReviews",options);return this.getJSON(url)},ApiClient.prototype.getItemDownloadUrl=function(itemId){if(!itemId)throw new Error("itemId cannot be empty");var url="Items/"+itemId+"/Download";return this.getUrl(url,{api_key:this.accessToken()})},ApiClient.prototype.getSessions=function(options){var url=this.getUrl("Sessions",options);return this.getJSON(url)},ApiClient.prototype.uploadUserImage=function(userId,imageType,file){if(!userId)throw new Error("null userId");if(!imageType)throw new Error("null imageType");if(!file)throw new Error("File must be an image.");if("image/png"!==file.type&&"image/jpeg"!==file.type&&"image/jpeg"!==file.type)throw new Error("File must be an image.");var instance=this;return new Promise(function(resolve,reject){var reader=new FileReader;reader.onerror=function(){reject()},reader.onabort=function(){reject()},reader.onload=function(e){var data=e.target.result.split(",")[1],url=instance.getUrl("Users/"+userId+"/Images/"+imageType);instance.ajax({type:"POST",url:url,data:data,contentType:"image/"+file.name.substring(file.name.lastIndexOf(".")+1)}).then(resolve,reject)},reader.readAsDataURL(file)})},ApiClient.prototype.uploadItemImage=function(itemId,imageType,file){if(!itemId)throw new Error("null itemId");if(!imageType)throw new Error("null imageType");if(!file)throw new Error("File must be an image.");if("image/png"!==file.type&&"image/jpeg"!==file.type&&"image/jpeg"!==file.type)throw new Error("File must be an image.");var url=this.getUrl("Items/"+itemId+"/Images");url+="/"+imageType;var instance=this;return new Promise(function(resolve,reject){var reader=new FileReader;reader.onerror=function(){reject()},reader.onabort=function(){reject()},reader.onload=function(e){var data=e.target.result.split(",")[1];instance.ajax({type:"POST",url:url,data:data,contentType:"image/"+file.name.substring(file.name.lastIndexOf(".")+1)}).then(resolve,reject)},reader.readAsDataURL(file)})},ApiClient.prototype.getInstalledPlugins=function(){var options={},url=this.getUrl("Plugins",options);return this.getJSON(url)},ApiClient.prototype.getUser=function(id){if(!id)throw new Error("Must supply a userId");var url=this.getUrl("Users/"+id);return this.getJSON(url)},ApiClient.prototype.getStudio=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("Studios/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getGenre=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("Genres/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getMusicGenre=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("MusicGenres/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getGameGenre=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("GameGenres/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getArtist=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("Artists/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getPerson=function(name,userId){if(!name)throw new Error("null name");var options={};userId&&(options.userId=userId);var url=this.getUrl("Persons/"+this.encodeName(name),options);return this.getJSON(url)},ApiClient.prototype.getPublicUsers=function(){var url=this.getUrl("users/public");return this.ajax({type:"GET",url:url,dataType:"json"},!1)},ApiClient.prototype.getUsers=function(options){var url=this.getUrl("users",options||{});return this.getJSON(url)},ApiClient.prototype.getParentalRatings=function(){var url=this.getUrl("Localization/ParentalRatings");return this.getJSON(url)},ApiClient.prototype.getDefaultImageQuality=function(imageType){return"backdrop"===imageType.toLowerCase()?80:90},ApiClient.prototype.getUserImageUrl=function(userId,options){if(!userId)throw new Error("null userId");options=options||{};var url="Users/"+userId+"/Images/"+options.type;return null!=options.index&&(url+="/"+options.index),normalizeImageOptions(this,options),delete options.type,delete options.index,this.getUrl(url,options)},ApiClient.prototype.getImageUrl=function(itemId,options){if(!itemId)throw new Error("itemId cannot be empty");options=options||{};var url="Items/"+itemId+"/Images/"+options.type;return null!=options.index&&(url+="/"+options.index),options.quality=options.quality||this.getDefaultImageQuality(options.type),this.normalizeImageOptions&&this.normalizeImageOptions(options),delete options.type,delete options.index,this.getUrl(url,options)},ApiClient.prototype.getScaledImageUrl=function(itemId,options){if(!itemId)throw new Error("itemId cannot be empty");options=options||{};var url="Items/"+itemId+"/Images/"+options.type;return null!=options.index&&(url+="/"+options.index),normalizeImageOptions(this,options),delete options.type,delete options.index,delete options.minScale,this.getUrl(url,options)},ApiClient.prototype.getThumbImageUrl=function(item,options){if(!item)throw new Error("null item");return options=options||{},options.imageType="thumb",item.ImageTags&&item.ImageTags.Thumb?(options.tag=item.ImageTags.Thumb,this.getImageUrl(item.Id,options)):item.ParentThumbItemId?(options.tag=item.ImageTags.ParentThumbImageTag,this.getImageUrl(item.ParentThumbItemId,options)):null},ApiClient.prototype.updateUserPassword=function(userId,currentPassword,newPassword){if(!userId)return Promise.reject();var url=this.getUrl("Users/"+userId+"/Password");return this.ajax({type:"POST",url:url,data:JSON.stringify({CurrentPw:currentPassword||"",NewPw:newPassword}),contentType:"application/json"})},ApiClient.prototype.updateEasyPassword=function(userId,newPassword){if(!userId)return void Promise.reject();var url=this.getUrl("Users/"+userId+"/EasyPassword");return this.ajax({type:"POST",url:url,data:{NewPw:newPassword}})},ApiClient.prototype.resetUserPassword=function(userId){if(!userId)throw new Error("null userId");var url=this.getUrl("Users/"+userId+"/Password"),postData={};return postData.resetPassword=!0,this.ajax({type:"POST",url:url,data:postData})},ApiClient.prototype.resetEasyPassword=function(userId){if(!userId)throw new Error("null userId");var url=this.getUrl("Users/"+userId+"/EasyPassword"),postData={};return postData.resetPassword=!0,this.ajax({type:"POST",url:url,data:postData})},ApiClient.prototype.updateServerConfiguration=function(configuration){if(!configuration)throw new Error("null configuration");var url=this.getUrl("System/Configuration");return this.ajax({type:"POST",url:url,data:JSON.stringify(configuration),contentType:"application/json"})},ApiClient.prototype.updateNamedConfiguration=function(name,configuration){if(!configuration)throw new Error("null configuration");var url=this.getUrl("System/Configuration/"+name);return this.ajax({type:"POST",url:url,data:JSON.stringify(configuration),contentType:"application/json"})},ApiClient.prototype.updateItem=function(item){if(!item)throw new Error("null item");var url=this.getUrl("Items/"+item.Id);return this.ajax({type:"POST",url:url,data:JSON.stringify(item),contentType:"application/json"})},ApiClient.prototype.updatePluginSecurityInfo=function(info){var url=this.getUrl("Plugins/SecurityInfo");return this.ajax({type:"POST",url:url,data:JSON.stringify(info),contentType:"application/json"})},ApiClient.prototype.createUser=function(name){var url=this.getUrl("Users/New");return this.ajax({type:"POST",url:url,data:{Name:name},dataType:"json"})},ApiClient.prototype.updateUser=function(user){if(!user)throw new Error("null user");var url=this.getUrl("Users/"+user.Id);return this.ajax({type:"POST",url:url,data:JSON.stringify(user),contentType:"application/json"})},ApiClient.prototype.updateUserPolicy=function(userId,policy){if(!userId)throw new Error("null userId");if(!policy)throw new Error("null policy");var url=this.getUrl("Users/"+userId+"/Policy");return this.ajax({type:"POST",url:url,data:JSON.stringify(policy),contentType:"application/json"})},ApiClient.prototype.updateUserConfiguration=function(userId,configuration){if(!userId)throw new Error("null userId");if(!configuration)throw new Error("null configuration");var url=this.getUrl("Users/"+userId+"/Configuration");return this.ajax({type:"POST",url:url,data:JSON.stringify(configuration),contentType:"application/json"})},ApiClient.prototype.updateScheduledTaskTriggers=function(id,triggers){if(!id)throw new Error("null id");if(!triggers)throw new Error("null triggers");var url=this.getUrl("ScheduledTasks/"+id+"/Triggers");return this.ajax({type:"POST",url:url,data:JSON.stringify(triggers),contentType:"application/json"})},ApiClient.prototype.updatePluginConfiguration=function(id,configuration){if(!id)throw new Error("null Id");if(!configuration)throw new Error("null configuration");var url=this.getUrl("Plugins/"+id+"/Configuration");return this.ajax({type:"POST",url:url,data:JSON.stringify(configuration),contentType:"application/json"})},ApiClient.prototype.getAncestorItems=function(itemId,userId){if(!itemId)throw new Error("null itemId");var options={};userId&&(options.userId=userId);var url=this.getUrl("Items/"+itemId+"/Ancestors",options);return this.getJSON(url)},ApiClient.prototype.getItems=function(userId,options){var url;return url="string"===(typeof userId).toString().toLowerCase()?this.getUrl("Users/"+userId+"/Items",options):this.getUrl("Items",options),this.getJSON(url)},ApiClient.prototype.getResumableItems=function(userId,options){return this.isMinServerVersion("3.2.33")?this.getJSON(this.getUrl("Users/"+userId+"/Items/Resume",options)):this.getItems(userId,Object.assign({SortBy:"DatePlayed",SortOrder:"Descending",Filters:"IsResumable",Recursive:!0,CollapseBoxSetItems:!1,ExcludeLocationTypes:"Virtual"},options))},ApiClient.prototype.getMovieRecommendations=function(options){return this.getJSON(this.getUrl("Movies/Recommendations",options))},ApiClient.prototype.getUpcomingEpisodes=function(options){return this.getJSON(this.getUrl("Shows/Upcoming",options))},ApiClient.prototype.getUserViews=function(options,userId){options=options||{};var url=this.getUrl("Users/"+(userId||this.getCurrentUserId())+"/Views",options);return this.getJSON(url)},ApiClient.prototype.getArtists=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Artists",options);return this.getJSON(url)},ApiClient.prototype.getAlbumArtists=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Artists/AlbumArtists",options);return this.getJSON(url)},ApiClient.prototype.getGenres=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Genres",options);return this.getJSON(url)},ApiClient.prototype.getMusicGenres=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("MusicGenres",options);return this.getJSON(url)},ApiClient.prototype.getGameGenres=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("GameGenres",options);return this.getJSON(url)},ApiClient.prototype.getPeople=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Persons",options);return this.getJSON(url)},ApiClient.prototype.getStudios=function(userId,options){if(!userId)throw new Error("null userId");options=options||{},options.userId=userId;var url=this.getUrl("Studios",options);return this.getJSON(url)},ApiClient.prototype.getLocalTrailers=function(userId,itemId){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/Items/"+itemId+"/LocalTrailers");return this.getJSON(url)},ApiClient.prototype.getGameSystems=function(){var options={},userId=this.getCurrentUserId();userId&&(options.userId=userId);var url=this.getUrl("Games/SystemSummaries",options);return this.getJSON(url)},ApiClient.prototype.getAdditionalVideoParts=function(userId,itemId){if(!itemId)throw new Error("null itemId");var options={};userId&&(options.userId=userId);var url=this.getUrl("Videos/"+itemId+"/AdditionalParts",options);return this.getJSON(url)},ApiClient.prototype.getThemeMedia=function(userId,itemId,inherit){if(!itemId)throw new Error("null itemId");var options={};userId&&(options.userId=userId),options.InheritFromParent=inherit||!1;var url=this.getUrl("Items/"+itemId+"/ThemeMedia",options);return this.getJSON(url)},ApiClient.prototype.getSearchHints=function(options){var url=this.getUrl("Search/Hints",options),serverId=this.serverId();return this.getJSON(url).then(function(result){return result.SearchHints.forEach(function(i){i.ServerId=serverId}),result})},ApiClient.prototype.getSpecialFeatures=function(userId,itemId){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/Items/"+itemId+"/SpecialFeatures");return this.getJSON(url)},ApiClient.prototype.getDateParamValue=function(date){function formatDigit(i){return i<10?"0"+i:i}var d=date;return""+d.getFullYear()+formatDigit(d.getMonth()+1)+formatDigit(d.getDate())+formatDigit(d.getHours())+formatDigit(d.getMinutes())+formatDigit(d.getSeconds())},ApiClient.prototype.markPlayed=function(userId,itemId,date){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var options={};date&&(options.DatePlayed=this.getDateParamValue(date));var url=this.getUrl("Users/"+userId+"/PlayedItems/"+itemId,options);return this.ajax({type:"POST",url:url,dataType:"json"})},ApiClient.prototype.markUnplayed=function(userId,itemId){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/PlayedItems/"+itemId);return this.ajax({type:"DELETE",url:url,dataType:"json"})},ApiClient.prototype.updateFavoriteStatus=function(userId,itemId,isFavorite){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/FavoriteItems/"+itemId),method=isFavorite?"POST":"DELETE";return this.ajax({type:method,url:url,dataType:"json"})},ApiClient.prototype.updateUserItemRating=function(userId,itemId,likes){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/Items/"+itemId+"/Rating",{likes:likes});return this.ajax({type:"POST",url:url,dataType:"json"})},ApiClient.prototype.getItemCounts=function(userId){var options={};userId&&(options.userId=userId);var url=this.getUrl("Items/Counts",options);return this.getJSON(url)},ApiClient.prototype.clearUserItemRating=function(userId,itemId){if(!userId)throw new Error("null userId");if(!itemId)throw new Error("null itemId");var url=this.getUrl("Users/"+userId+"/Items/"+itemId+"/Rating");return this.ajax({type:"DELETE",url:url,dataType:"json"})},ApiClient.prototype.reportPlaybackStart=function(options){if(!options)throw new Error("null options");this.lastPlaybackProgressReport=0,this.lastPlaybackProgressReportTicks=null,stopBitrateDetection(this);var url=this.getUrl("Sessions/Playing");return this.ajax({type:"POST",data:JSON.stringify(options),contentType:"application/json",url:url})},ApiClient.prototype.reportPlaybackProgress=function(options){if(!options)throw new Error("null options");var newPositionTicks=options.PositionTicks;if("timeupdate"===(options.EventName||"timeupdate")){var now=(new Date).getTime(),msSinceLastReport=now-(this.lastPlaybackProgressReport||0);if(msSinceLastReport<=1e4){if(!newPositionTicks)return Promise.resolve();var expectedReportTicks=1e4*msSinceLastReport+(this.lastPlaybackProgressReportTicks||0);if(Math.abs((newPositionTicks||0)-expectedReportTicks)<5e7)return Promise.resolve()}this.lastPlaybackProgressReport=now}else this.lastPlaybackProgressReport=0;this.lastPlaybackProgressReportTicks=newPositionTicks;var url=this.getUrl("Sessions/Playing/Progress");return this.ajax({type:"POST",data:JSON.stringify(options),contentType:"application/json",url:url})},ApiClient.prototype.reportOfflineActions=function(actions){if(!actions)throw new Error("null actions");var url=this.getUrl("Sync/OfflineActions");return this.ajax({type:"POST",data:JSON.stringify(actions),contentType:"application/json",url:url})},ApiClient.prototype.syncData=function(data){if(!data)throw new Error("null data");var url=this.getUrl("Sync/Data");return this.ajax({type:"POST",data:JSON.stringify(data),contentType:"application/json",url:url,dataType:"json"})},ApiClient.prototype.getReadySyncItems=function(deviceId){if(!deviceId)throw new Error("null deviceId");var url=this.getUrl("Sync/Items/Ready",{TargetId:deviceId});return this.getJSON(url)},ApiClient.prototype.reportSyncJobItemTransferred=function(syncJobItemId){if(!syncJobItemId)throw new Error("null syncJobItemId");var url=this.getUrl("Sync/JobItems/"+syncJobItemId+"/Transferred");return this.ajax({type:"POST",url:url})},ApiClient.prototype.cancelSyncItems=function(itemIds,targetId){if(!itemIds)throw new Error("null itemIds");var url=this.getUrl("Sync/"+(targetId||this.deviceId())+"/Items",{ItemIds:itemIds.join(",")});return this.ajax({type:"DELETE",url:url})},ApiClient.prototype.reportPlaybackStopped=function(options){if(!options)throw new Error("null options");this.lastPlaybackProgressReport=0,this.lastPlaybackProgressReportTicks=null,redetectBitrate(this);var url=this.getUrl("Sessions/Playing/Stopped");return this.ajax({type:"POST",data:JSON.stringify(options),contentType:"application/json",url:url})},ApiClient.prototype.sendPlayCommand=function(sessionId,options){if(!sessionId)throw new Error("null sessionId");if(!options)throw new Error("null options");var url=this.getUrl("Sessions/"+sessionId+"/Playing",options);return this.ajax({type:"POST",url:url})},ApiClient.prototype.sendCommand=function(sessionId,command){if(!sessionId)throw new Error("null sessionId");if(!command)throw new Error("null command");var url=this.getUrl("Sessions/"+sessionId+"/Command"),ajaxOptions={type:"POST",url:url};return ajaxOptions.data=JSON.stringify(command),ajaxOptions.contentType="application/json",this.ajax(ajaxOptions)},ApiClient.prototype.sendMessageCommand=function(sessionId,options){if(!sessionId)throw new Error("null sessionId");if(!options)throw new Error("null options");var url=this.getUrl("Sessions/"+sessionId+"/Message"),ajaxOptions={type:"POST",url:url};return ajaxOptions.data=JSON.stringify(options),ajaxOptions.contentType="application/json",this.ajax(ajaxOptions)},ApiClient.prototype.sendPlayStateCommand=function(sessionId,command,options){if(!sessionId)throw new Error("null sessionId");if(!command)throw new Error("null command");var url=this.getUrl("Sessions/"+sessionId+"/Playing/"+command,options||{});return this.ajax({type:"POST",url:url})},ApiClient.prototype.createPackageReview=function(review){var url=this.getUrl("Packages/Reviews/"+review.id,review);return this.ajax({type:"POST",url:url})},ApiClient.prototype.getPackageReviews=function(packageId,minRating,maxRating,limit){if(!packageId)throw new Error("null packageId");var options={};minRating&&(options.MinRating=minRating),maxRating&&(options.MaxRating=maxRating),limit&&(options.Limit=limit);var url=this.getUrl("Packages/"+packageId+"/Reviews",options);return this.getJSON(url)},ApiClient.prototype.getSavedEndpointInfo=function(){return this._endPointInfo},ApiClient.prototype.getEndpointInfo=function(){var savedValue=this._endPointInfo;if(savedValue)return Promise.resolve(savedValue);var instance=this;return this.getJSON(this.getUrl("System/Endpoint")).then(function(endPointInfo){return setSavedEndpointInfo(instance,endPointInfo),endPointInfo})},ApiClient.prototype.getWakeOnLanInfo=function(){return this.getJSON(this.getUrl("System/WakeOnLanInfo"))},ApiClient.prototype.getLatestItems=function(options){return options=options||{},this.getJSON(this.getUrl("Users/"+this.getCurrentUserId()+"/Items/Latest",options))},ApiClient.prototype.getFilters=function(options){return this.getJSON(this.getUrl("Items/Filters2",options))},ApiClient.prototype.supportsWakeOnLan=function(){return!!wakeOnLan.isSupported()&&getCachedWakeOnLanInfo(this).length>0},ApiClient.prototype.wakeOnLan=function(){var infos=getCachedWakeOnLanInfo(this);return new Promise(function(resolve,reject){sendNextWakeOnLan(infos,0,resolve)})},ApiClient.prototype.setSystemInfo=function(info){this._serverVersion=info.Version},ApiClient.prototype.serverVersion=function(){return this._serverVersion},ApiClient.prototype.isMinServerVersion=function(version){var serverVersion=this.serverVersion();return!!serverVersion&&compareVersions(serverVersion,version)>=0},ApiClient.prototype.handleMessageReceived=function(msg){onMessageReceivedInternal(this,msg)},ApiClient}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js index 7cf325e746..952b50783a 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js @@ -1 +1 @@ -define(["events","apiclient","appStorage"],function(events,apiClientFactory,appStorage){"use strict";function getServerAddress(server,mode){switch(mode){case ConnectionMode.Local:return server.LocalAddress;case ConnectionMode.Manual:return server.ManualAddress;case ConnectionMode.Remote:return server.RemoteAddress;default:return server.ManualAddress||server.LocalAddress||server.RemoteAddress}}function paramsToString(params){var values=[];for(var key in params){var value=params[key];null!==value&&void 0!==value&&""!==value&&values.push(encodeURIComponent(key)+"="+encodeURIComponent(value))}return values.join("&")}function resolveFailure(instance,resolve){resolve({State:"Unavailable",ConnectUser:instance.connectUser()})}function mergeServers(credentialProvider,list1,list2){for(var i=0,length=list2.length;ibVal)return 1}return 0}var defaultTimeout=2e4,ConnectionMode={Local:0,Remote:1,Manual:2},ConnectionManager=function(credentialProvider,appName,appVersion,deviceName,deviceId,capabilities,devicePixelRatio){function onConnectUserSignIn(user){connectUser=user,events.trigger(self,"connectusersignedin",[user])}function onAuthenticated(apiClient,result,options,saveCredentials){var credentials=credentialProvider.credentials(),servers=credentials.Servers.filter(function(s){return s.Id===result.ServerId}),server=servers.length?servers[0]:apiClient.serverInfo();return!1!==options.updateDateLastAccessed&&(server.DateLastAccessed=(new Date).getTime()),server.Id=result.ServerId,saveCredentials?(server.UserId=result.User.Id,server.AccessToken=result.AccessToken):(server.UserId=null,server.AccessToken=null),credentialProvider.addOrUpdateServer(credentials.Servers,server),credentialProvider.credentials(credentials),apiClient.enableAutomaticBitrateDetection=options.enableAutomaticBitrateDetection,apiClient.serverInfo(server),afterConnected(apiClient,options),onLocalUserSignIn(server,apiClient.serverAddress(),result.User)}function afterConnected(apiClient,options){options=options||{},!1!==options.reportCapabilities&&apiClient.reportCapabilities(capabilities),apiClient.enableAutomaticBitrateDetection=options.enableAutomaticBitrateDetection,!1!==options.enableWebSocket&&(console.log("calling apiClient.ensureWebSocket"),apiClient.ensureWebSocket())}function onLocalUserSignIn(server,serverUrl,user){return self._getOrAddApiClient(server,serverUrl),(self.onLocalUserSignedIn?self.onLocalUserSignedIn.call(self,user):Promise.resolve()).then(function(){events.trigger(self,"localusersignedin",[user])})}function ensureConnectUser(credentials){return connectUser&&connectUser.Id===credentials.ConnectUserId?Promise.resolve():credentials.ConnectUserId&&credentials.ConnectAccessToken?(connectUser=null,getConnectUser(credentials.ConnectUserId,credentials.ConnectAccessToken).then(function(user){return onConnectUserSignIn(user),Promise.resolve()},function(){return Promise.resolve()})):Promise.resolve()}function getConnectUser(userId,accessToken){if(!userId)throw new Error("null userId");if(!accessToken)throw new Error("null accessToken");return ajax({type:"GET",url:"https://connect.emby.media/service/user?id="+userId,dataType:"json",headers:{"X-Application":appName+"/"+appVersion,"X-Connect-UserToken":accessToken}})}function addAuthenticationInfoFromConnect(server,serverUrl,credentials){if(!server.ExchangeToken)throw new Error("server.ExchangeToken cannot be null");if(!credentials.ConnectUserId)throw new Error("credentials.ConnectUserId cannot be null");var url=getEmbyServerUrl(serverUrl,"Connect/Exchange?format=json&ConnectUserId="+credentials.ConnectUserId),auth='MediaBrowser Client="'+appName+'", Device="'+deviceName+'", DeviceId="'+deviceId+'", Version="'+appVersion+'"';return ajax({type:"GET",url:url,dataType:"json",headers:{"X-MediaBrowser-Token":server.ExchangeToken,"X-Emby-Authorization":auth}}).then(function(auth){return server.UserId=auth.LocalUserId,server.AccessToken=auth.AccessToken,auth},function(){return server.UserId=null,server.AccessToken=null,Promise.reject()})}function validateAuthentication(server,serverUrl){return ajax({type:"GET",url:getEmbyServerUrl(serverUrl,"System/Info"),dataType:"json",headers:{"X-MediaBrowser-Token":server.AccessToken}}).then(function(systemInfo){return updateServerInfo(server,systemInfo),Promise.resolve()},function(){return server.UserId=null,server.AccessToken=null,Promise.resolve()})}function getImageUrl(localUser){if(connectUser&&connectUser.ImageUrl)return{url:connectUser.ImageUrl};if(localUser&&localUser.PrimaryImageTag){return{url:self.getApiClient(localUser).getUserImageUrl(localUser.Id,{tag:localUser.PrimaryImageTag,type:"Primary"}),supportsParams:!0}}return{url:null,supportsParams:!1}}function logoutOfServer(apiClient){var serverInfo=apiClient.serverInfo()||{},logoutInfo={serverId:serverInfo.Id};return apiClient.logout().then(function(){events.trigger(self,"localusersignedout",[logoutInfo])},function(){events.trigger(self,"localusersignedout",[logoutInfo])})}function getConnectServers(credentials){return console.log("Begin getConnectServers"),credentials.ConnectAccessToken&&credentials.ConnectUserId?ajax({type:"GET",url:"https://connect.emby.media/service/servers?userId="+credentials.ConnectUserId,dataType:"json",headers:{"X-Application":appName+"/"+appVersion,"X-Connect-UserToken":credentials.ConnectAccessToken}}).then(function(servers){return servers.map(function(i){return{ExchangeToken:i.AccessKey,ConnectServerId:i.Id,Id:i.SystemId,Name:i.Name,RemoteAddress:i.Url,LocalAddress:i.LocalAddress,UserLinkType:"guest"===(i.UserType||"").toLowerCase()?"Guest":"LinkedUser"}})},function(){return credentials.Servers.slice(0).filter(function(s){return s.ExchangeToken})}):Promise.resolve([])}function filterServers(servers,connectServers){return servers.filter(function(server){return!server.ExchangeToken||connectServers.filter(function(connectServer){return server.Id===connectServer.Id}).length>0})}function findServers(){return new Promise(function(resolve,reject){var onFinish=function(foundServers){var servers=foundServers.map(function(foundServer){var info={Id:foundServer.Id,LocalAddress:convertEndpointAddressToManualAddress(foundServer)||foundServer.Address,Name:foundServer.Name};return info.LastConnectionMode=info.ManualAddress?ConnectionMode.Manual:ConnectionMode.Local,info});resolve(servers)};require(["serverdiscovery"],function(serverDiscovery){serverDiscovery.findServers(1e3).then(onFinish,function(){onFinish([])})})})}function convertEndpointAddressToManualAddress(info){if(info.Address&&info.EndpointAddress){var address=info.EndpointAddress.split(":")[0],parts=info.Address.split(":");if(parts.length>1){var portString=parts[parts.length-1];isNaN(parseInt(portString))||(address+=":"+portString)}return normalizeAddress(address)}return null}function getTryConnectPromise(url,connectionMode,state,resolve,reject){return console.log("getTryConnectPromise "+url),ajax({url:url+"/system/info/public",timeout:defaultTimeout,type:"GET",dataType:"json"}).then(function(result){state.resolved||(state.resolved=!0,console.log("Reconnect succeeded to "+url),resolve({url:url,connectionMode:connectionMode,data:result}))},function(){console.log("Reconnect failed to "+url),++state.rejects>=state.numAddresses&&reject()})}function tryReconnect(serverInfo){var addresses=[],addressesStrings=[];return serverInfo.LocalAddress&&-1===addressesStrings.indexOf(serverInfo.LocalAddress)&&(addresses.push({url:serverInfo.LocalAddress,mode:ConnectionMode.Local,timeout:0}),addressesStrings.push(addresses[addresses.length-1].url)),serverInfo.ManualAddress&&-1===addressesStrings.indexOf(serverInfo.ManualAddress)&&(addresses.push({url:serverInfo.ManualAddress,mode:ConnectionMode.Manual,timeout:100}),addressesStrings.push(addresses[addresses.length-1].url)),serverInfo.RemoteAddress&&-1===addressesStrings.indexOf(serverInfo.RemoteAddress)&&(addresses.push({url:serverInfo.RemoteAddress,mode:ConnectionMode.Remote,timeout:200}),addressesStrings.push(addresses[addresses.length-1].url)),console.log("tryReconnect: "+addressesStrings.join("|")),new Promise(function(resolve,reject){var state={};state.numAddresses=addresses.length,state.rejects=0,addresses.map(function(url){setTimeout(function(){getTryConnectPromise(url.url,url.mode,state,resolve,reject)},url.timeout)})})}function onSuccessfulConnection(server,systemInfo,connectionMode,serverUrl,options,resolve){var credentials=credentialProvider.credentials();options=options||{},credentials.ConnectAccessToken&&!1!==options.enableAutoLogin?ensureConnectUser(credentials).then(function(){server.ExchangeToken?addAuthenticationInfoFromConnect(server,serverUrl,credentials).then(function(){afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!0,options,resolve)},function(){afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!0,options,resolve)}):afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!0,options,resolve)}):afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!0,options,resolve)}function afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,verifyLocalAuthentication,options,resolve){if(options=options||{},!1===options.enableAutoLogin)server.UserId=null,server.AccessToken=null;else if(verifyLocalAuthentication&&server.AccessToken&&!1!==options.enableAutoLogin)return void validateAuthentication(server,serverUrl).then(function(){afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!1,options,resolve)});updateServerInfo(server,systemInfo),server.LastConnectionMode=connectionMode,!1!==options.updateDateLastAccessed&&(server.DateLastAccessed=(new Date).getTime()),credentialProvider.addOrUpdateServer(credentials.Servers,server),credentialProvider.credentials(credentials);var result={Servers:[]};result.ApiClient=self._getOrAddApiClient(server,serverUrl),result.ApiClient.setSystemInfo(systemInfo),result.State=server.AccessToken&&!1!==options.enableAutoLogin?"SignedIn":"ServerSignIn",result.Servers.push(server),result.ApiClient.enableAutomaticBitrateDetection=options.enableAutomaticBitrateDetection,result.ApiClient.updateServerInfo(server,serverUrl);var resolveActions=function(){resolve(result),events.trigger(self,"connected",[result])};"SignedIn"===result.State?(afterConnected(result.ApiClient,options),result.ApiClient.getCurrentUser().then(function(user){onLocalUserSignIn(server,serverUrl,user).then(resolveActions,resolveActions)},resolveActions)):resolveActions()}function getCacheKey(feature,apiClient,options){options=options||{};var viewOnly=options.viewOnly,cacheKey="regInfo-"+apiClient.serverId();return viewOnly&&(cacheKey+="-viewonly"),cacheKey}function addAppInfoToConnectRequest(request){request.headers=request.headers||{},request.headers["X-Application"]=appName+"/"+appVersion}function exchangePin(pinInfo){if(!pinInfo)throw new Error("pinInfo cannot be null");var request={type:"POST",url:getConnectUrl("pin/authenticate"),data:{deviceId:pinInfo.DeviceId,pin:pinInfo.Pin},dataType:"json"};return addAppInfoToConnectRequest(request),ajax(request)}console.log("Begin ConnectionManager constructor");var self=this;this._apiClients=[];var connectUser;self.connectUser=function(){return connectUser},self._minServerVersion="3.2.33",self.appVersion=function(){return appVersion},self.appName=function(){return appName},self.capabilities=function(){return capabilities},self.deviceId=function(){return deviceId},self.credentialProvider=function(){return credentialProvider},self.connectUserId=function(){return credentialProvider.credentials().ConnectUserId},self.connectToken=function(){return credentialProvider.credentials().ConnectAccessToken},self.getServerInfo=function(id){return credentialProvider.credentials().Servers.filter(function(s){return s.Id===id})[0]},self.getLastUsedServer=function(){var servers=credentialProvider.credentials().Servers;return servers.sort(function(a,b){return(b.DateLastAccessed||0)-(a.DateLastAccessed||0)}),servers.length?servers[0]:null},self.addApiClient=function(apiClient){self._apiClients.push(apiClient);var existingServers=credentialProvider.credentials().Servers.filter(function(s){return stringEqualsIgnoreCase(s.ManualAddress,apiClient.serverAddress())||stringEqualsIgnoreCase(s.LocalAddress,apiClient.serverAddress())||stringEqualsIgnoreCase(s.RemoteAddress,apiClient.serverAddress())}),existingServer=existingServers.length?existingServers[0]:apiClient.serverInfo();if(existingServer.DateLastAccessed=(new Date).getTime(),existingServer.LastConnectionMode=ConnectionMode.Manual,existingServer.ManualAddress=apiClient.serverAddress(),apiClient.serverInfo(existingServer),apiClient.onAuthenticated=function(instance,result){return onAuthenticated(instance,result,{},!0)},!existingServers.length){var credentials=credentialProvider.credentials();credentials.Servers=[existingServer],credentialProvider.credentials(credentials)}events.trigger(self,"apiclientcreated",[apiClient])},self.clearData=function(){console.log("connection manager clearing data"),connectUser=null;var credentials=credentialProvider.credentials();credentials.ConnectAccessToken=null,credentials.ConnectUserId=null,credentials.Servers=[],credentialProvider.credentials(credentials)},self._getOrAddApiClient=function(server,serverUrl){var apiClient=self.getApiClient(server.Id);return apiClient||(apiClient=new apiClientFactory(serverUrl,appName,appVersion,deviceName,deviceId,devicePixelRatio),self._apiClients.push(apiClient),apiClient.serverInfo(server),apiClient.onAuthenticated=function(instance,result){return onAuthenticated(instance,result,{},!0)},events.trigger(self,"apiclientcreated",[apiClient])),console.log("returning instance from getOrAddApiClient"),apiClient},self.getOrCreateApiClient=function(serverId){var credentials=credentialProvider.credentials(),servers=credentials.Servers.filter(function(s){return stringEqualsIgnoreCase(s.Id,serverId)});if(!servers.length)throw new Error("Server not found: "+serverId);var server=servers[0];return self._getOrAddApiClient(server,getServerAddress(server,server.LastConnectionMode))},self.user=function(apiClient){return new Promise(function(resolve,reject){function onLocalUserDone(e){var image=getImageUrl(localUser);resolve({localUser:localUser,name:connectUser?connectUser.Name:localUser?localUser.Name:null,imageUrl:image.url,supportsImageParams:image.supportsParams,connectUser:connectUser})}function onEnsureConnectUserDone(){apiClient&&apiClient.getCurrentUserId()?apiClient.getCurrentUser().then(function(u){localUser=u,onLocalUserDone()},onLocalUserDone):onLocalUserDone()}var localUser,credentials=credentialProvider.credentials();!credentials.ConnectUserId||!credentials.ConnectAccessToken||apiClient&&apiClient.getCurrentUserId()?onEnsureConnectUserDone():ensureConnectUser(credentials).then(onEnsureConnectUserDone,onEnsureConnectUserDone)})},self.logout=function(){console.log("begin connectionManager loguot");for(var promises=[],i=0,length=self._apiClients.length;ibVal)return 1}return 0}var defaultTimeout=2e4,ConnectionMode={Local:0,Remote:1,Manual:2},ConnectionManager=function(credentialProvider,appName,appVersion,deviceName,deviceId,capabilities,devicePixelRatio){function onConnectUserSignIn(user){connectUser=user,events.trigger(self,"connectusersignedin",[user])}function onAuthenticated(apiClient,result,options,saveCredentials){var credentials=credentialProvider.credentials(),servers=credentials.Servers.filter(function(s){return s.Id===result.ServerId}),server=servers.length?servers[0]:apiClient.serverInfo();return!1!==options.updateDateLastAccessed&&(server.DateLastAccessed=(new Date).getTime()),server.Id=result.ServerId,saveCredentials?(server.UserId=result.User.Id,server.AccessToken=result.AccessToken):(server.UserId=null,server.AccessToken=null),credentialProvider.addOrUpdateServer(credentials.Servers,server),credentialProvider.credentials(credentials),apiClient.enableAutomaticBitrateDetection=options.enableAutomaticBitrateDetection,apiClient.serverInfo(server),afterConnected(apiClient,options),onLocalUserSignIn(server,apiClient.serverAddress(),result.User)}function afterConnected(apiClient,options){options=options||{},!1!==options.reportCapabilities&&apiClient.reportCapabilities(capabilities),apiClient.enableAutomaticBitrateDetection=options.enableAutomaticBitrateDetection,!1!==options.enableWebSocket&&(console.log("calling apiClient.ensureWebSocket"),apiClient.ensureWebSocket())}function onLocalUserSignIn(server,serverUrl,user){return self._getOrAddApiClient(server,serverUrl),(self.onLocalUserSignedIn?self.onLocalUserSignedIn.call(self,user):Promise.resolve()).then(function(){events.trigger(self,"localusersignedin",[user])})}function ensureConnectUser(credentials){return connectUser&&connectUser.Id===credentials.ConnectUserId?Promise.resolve():credentials.ConnectUserId&&credentials.ConnectAccessToken?(connectUser=null,getConnectUser(credentials.ConnectUserId,credentials.ConnectAccessToken).then(function(user){return onConnectUserSignIn(user),Promise.resolve()},function(){return Promise.resolve()})):Promise.resolve()}function getConnectUser(userId,accessToken){if(!userId)throw new Error("null userId");if(!accessToken)throw new Error("null accessToken");return ajax({type:"GET",url:"https://connect.emby.media/service/user?id="+userId,dataType:"json",headers:{"X-Application":appName+"/"+appVersion,"X-Connect-UserToken":accessToken}})}function addAuthenticationInfoFromConnect(server,serverUrl,credentials){if(!server.ExchangeToken)throw new Error("server.ExchangeToken cannot be null");if(!credentials.ConnectUserId)throw new Error("credentials.ConnectUserId cannot be null");var url=getEmbyServerUrl(serverUrl,"Connect/Exchange?format=json&ConnectUserId="+credentials.ConnectUserId),auth='MediaBrowser Client="'+appName+'", Device="'+deviceName+'", DeviceId="'+deviceId+'", Version="'+appVersion+'"';return ajax({type:"GET",url:url,dataType:"json",headers:{"X-MediaBrowser-Token":server.ExchangeToken,"X-Emby-Authorization":auth}}).then(function(auth){return server.UserId=auth.LocalUserId,server.AccessToken=auth.AccessToken,auth},function(){return server.UserId=null,server.AccessToken=null,Promise.reject()})}function validateAuthentication(server,serverUrl){return ajax({type:"GET",url:getEmbyServerUrl(serverUrl,"System/Info"),dataType:"json",headers:{"X-MediaBrowser-Token":server.AccessToken}}).then(function(systemInfo){return updateServerInfo(server,systemInfo),Promise.resolve()},function(){return server.UserId=null,server.AccessToken=null,Promise.resolve()})}function getImageUrl(localUser){if(connectUser&&connectUser.ImageUrl)return{url:connectUser.ImageUrl};if(localUser&&localUser.PrimaryImageTag){return{url:self.getApiClient(localUser).getUserImageUrl(localUser.Id,{tag:localUser.PrimaryImageTag,type:"Primary"}),supportsParams:!0}}return{url:null,supportsParams:!1}}function logoutOfServer(apiClient){var serverInfo=apiClient.serverInfo()||{},logoutInfo={serverId:serverInfo.Id};return apiClient.logout().then(function(){events.trigger(self,"localusersignedout",[logoutInfo])},function(){events.trigger(self,"localusersignedout",[logoutInfo])})}function getConnectServers(credentials){return console.log("Begin getConnectServers"),credentials.ConnectAccessToken&&credentials.ConnectUserId?ajax({type:"GET",url:"https://connect.emby.media/service/servers?userId="+credentials.ConnectUserId,dataType:"json",headers:{"X-Application":appName+"/"+appVersion,"X-Connect-UserToken":credentials.ConnectAccessToken}}).then(function(servers){return servers.map(function(i){return{ExchangeToken:i.AccessKey,ConnectServerId:i.Id,Id:i.SystemId,Name:i.Name,RemoteAddress:i.Url,LocalAddress:i.LocalAddress,UserLinkType:"guest"===(i.UserType||"").toLowerCase()?"Guest":"LinkedUser"}})},function(){return credentials.Servers.slice(0).filter(function(s){return s.ExchangeToken})}):Promise.resolve([])}function filterServers(servers,connectServers){return servers.filter(function(server){return!server.ExchangeToken||connectServers.filter(function(connectServer){return server.Id===connectServer.Id}).length>0})}function findServers(){return new Promise(function(resolve,reject){var onFinish=function(foundServers){var servers=foundServers.map(function(foundServer){var info={Id:foundServer.Id,LocalAddress:convertEndpointAddressToManualAddress(foundServer)||foundServer.Address,Name:foundServer.Name};return info.LastConnectionMode=info.ManualAddress?ConnectionMode.Manual:ConnectionMode.Local,info});resolve(servers)};require(["serverdiscovery"],function(serverDiscovery){serverDiscovery.findServers(1e3).then(onFinish,function(){onFinish([])})})})}function convertEndpointAddressToManualAddress(info){if(info.Address&&info.EndpointAddress){var address=info.EndpointAddress.split(":")[0],parts=info.Address.split(":");if(parts.length>1){var portString=parts[parts.length-1];isNaN(parseInt(portString))||(address+=":"+portString)}return normalizeAddress(address)}return null}function getTryConnectPromise(url,connectionMode,state,resolve,reject){console.log("getTryConnectPromise "+url),ajax({url:getEmbyServerUrl(url,"system/info/public"),timeout:defaultTimeout,type:"GET",dataType:"json"}).then(function(result){state.resolved||(state.resolved=!0,console.log("Reconnect succeeded to "+url),resolve({url:url,connectionMode:connectionMode,data:result}))},function(){state.resolved||(console.log("Reconnect failed to "+url),++state.rejects>=state.numAddresses&&reject())})}function tryReconnect(serverInfo){var addresses=[],addressesStrings=[];return serverInfo.LocalAddress&&-1===addressesStrings.indexOf(serverInfo.LocalAddress)&&(addresses.push({url:serverInfo.LocalAddress,mode:ConnectionMode.Local,timeout:0}),addressesStrings.push(addresses[addresses.length-1].url)),serverInfo.ManualAddress&&-1===addressesStrings.indexOf(serverInfo.ManualAddress)&&(addresses.push({url:serverInfo.ManualAddress,mode:ConnectionMode.Manual,timeout:100}),addressesStrings.push(addresses[addresses.length-1].url)),serverInfo.RemoteAddress&&-1===addressesStrings.indexOf(serverInfo.RemoteAddress)&&(addresses.push({url:serverInfo.RemoteAddress,mode:ConnectionMode.Remote,timeout:200}),addressesStrings.push(addresses[addresses.length-1].url)),console.log("tryReconnect: "+addressesStrings.join("|")),new Promise(function(resolve,reject){var state={};state.numAddresses=addresses.length,state.rejects=0,addresses.map(function(url){setTimeout(function(){state.resolved||getTryConnectPromise(url.url,url.mode,state,resolve,reject)},url.timeout)})})}function onSuccessfulConnection(server,systemInfo,connectionMode,serverUrl,options,resolve){var credentials=credentialProvider.credentials();options=options||{},credentials.ConnectAccessToken&&!1!==options.enableAutoLogin?ensureConnectUser(credentials).then(function(){server.ExchangeToken?addAuthenticationInfoFromConnect(server,serverUrl,credentials).then(function(){afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!0,options,resolve)},function(){afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!0,options,resolve)}):afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!0,options,resolve)}):afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!0,options,resolve)}function afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,verifyLocalAuthentication,options,resolve){if(options=options||{},!1===options.enableAutoLogin)server.UserId=null,server.AccessToken=null;else if(verifyLocalAuthentication&&server.AccessToken&&!1!==options.enableAutoLogin)return void validateAuthentication(server,serverUrl).then(function(){afterConnectValidated(server,credentials,systemInfo,connectionMode,serverUrl,!1,options,resolve)});updateServerInfo(server,systemInfo),server.LastConnectionMode=connectionMode,!1!==options.updateDateLastAccessed&&(server.DateLastAccessed=(new Date).getTime()),credentialProvider.addOrUpdateServer(credentials.Servers,server),credentialProvider.credentials(credentials);var result={Servers:[]};result.ApiClient=self._getOrAddApiClient(server,serverUrl),result.ApiClient.setSystemInfo(systemInfo),result.State=server.AccessToken&&!1!==options.enableAutoLogin?"SignedIn":"ServerSignIn",result.Servers.push(server),result.ApiClient.enableAutomaticBitrateDetection=options.enableAutomaticBitrateDetection,result.ApiClient.updateServerInfo(server,serverUrl);var resolveActions=function(){resolve(result),events.trigger(self,"connected",[result])};"SignedIn"===result.State?(afterConnected(result.ApiClient,options),result.ApiClient.getCurrentUser().then(function(user){onLocalUserSignIn(server,serverUrl,user).then(resolveActions,resolveActions)},resolveActions)):resolveActions()}function getCacheKey(feature,apiClient,options){options=options||{};var viewOnly=options.viewOnly,cacheKey="regInfo-"+apiClient.serverId();return viewOnly&&(cacheKey+="-viewonly"),cacheKey}function addAppInfoToConnectRequest(request){request.headers=request.headers||{},request.headers["X-Application"]=appName+"/"+appVersion}function exchangePin(pinInfo){if(!pinInfo)throw new Error("pinInfo cannot be null");var request={type:"POST",url:getConnectUrl("pin/authenticate"),data:{deviceId:pinInfo.DeviceId,pin:pinInfo.Pin},dataType:"json"};return addAppInfoToConnectRequest(request),ajax(request)}console.log("Begin ConnectionManager constructor");var self=this;this._apiClients=[];var connectUser;self.connectUser=function(){return connectUser},self._minServerVersion="3.2.33",self.appVersion=function(){return appVersion},self.appName=function(){return appName},self.capabilities=function(){return capabilities},self.deviceId=function(){return deviceId},self.credentialProvider=function(){return credentialProvider},self.connectUserId=function(){return credentialProvider.credentials().ConnectUserId},self.connectToken=function(){return credentialProvider.credentials().ConnectAccessToken},self.getServerInfo=function(id){return credentialProvider.credentials().Servers.filter(function(s){return s.Id===id})[0]},self.getLastUsedServer=function(){var servers=credentialProvider.credentials().Servers;return servers.sort(function(a,b){return(b.DateLastAccessed||0)-(a.DateLastAccessed||0)}),servers.length?servers[0]:null},self.addApiClient=function(apiClient){self._apiClients.push(apiClient);var existingServers=credentialProvider.credentials().Servers.filter(function(s){return stringEqualsIgnoreCase(s.ManualAddress,apiClient.serverAddress())||stringEqualsIgnoreCase(s.LocalAddress,apiClient.serverAddress())||stringEqualsIgnoreCase(s.RemoteAddress,apiClient.serverAddress())}),existingServer=existingServers.length?existingServers[0]:apiClient.serverInfo();if(existingServer.DateLastAccessed=(new Date).getTime(),existingServer.LastConnectionMode=ConnectionMode.Manual,existingServer.ManualAddress=apiClient.serverAddress(),apiClient.serverInfo(existingServer),apiClient.onAuthenticated=function(instance,result){return onAuthenticated(instance,result,{},!0)},!existingServers.length){var credentials=credentialProvider.credentials();credentials.Servers=[existingServer],credentialProvider.credentials(credentials)}events.trigger(self,"apiclientcreated",[apiClient])},self.clearData=function(){console.log("connection manager clearing data"),connectUser=null;var credentials=credentialProvider.credentials();credentials.ConnectAccessToken=null,credentials.ConnectUserId=null,credentials.Servers=[],credentialProvider.credentials(credentials)},self._getOrAddApiClient=function(server,serverUrl){var apiClient=self.getApiClient(server.Id);return apiClient||(apiClient=new apiClientFactory(serverUrl,appName,appVersion,deviceName,deviceId,devicePixelRatio),self._apiClients.push(apiClient),apiClient.serverInfo(server),apiClient.onAuthenticated=function(instance,result){return onAuthenticated(instance,result,{},!0)},events.trigger(self,"apiclientcreated",[apiClient])),console.log("returning instance from getOrAddApiClient"),apiClient},self.getOrCreateApiClient=function(serverId){var credentials=credentialProvider.credentials(),servers=credentials.Servers.filter(function(s){return stringEqualsIgnoreCase(s.Id,serverId)});if(!servers.length)throw new Error("Server not found: "+serverId);var server=servers[0];return self._getOrAddApiClient(server,getServerAddress(server,server.LastConnectionMode))},self.user=function(apiClient){return new Promise(function(resolve,reject){function onLocalUserDone(e){var image=getImageUrl(localUser);resolve({localUser:localUser,name:connectUser?connectUser.Name:localUser?localUser.Name:null,imageUrl:image.url,supportsImageParams:image.supportsParams,connectUser:connectUser})}function onEnsureConnectUserDone(){apiClient&&apiClient.getCurrentUserId()?apiClient.getCurrentUser().then(function(u){localUser=u,onLocalUserDone()},onLocalUserDone):onLocalUserDone()}var localUser,credentials=credentialProvider.credentials();!credentials.ConnectUserId||!credentials.ConnectAccessToken||apiClient&&apiClient.getCurrentUserId()?onEnsureConnectUserDone():ensureConnectUser(credentials).then(onEnsureConnectUserDone,onEnsureConnectUserDone)})},self.logout=function(){console.log("begin connectionManager loguot");for(var promises=[],i=0,length=self._apiClients.length;i-1&&(item={Name:"Music",ServerId:serverId,Id:"localview:MusicView",Type:"MusicView",CollectionType:"music",IsFolder:!0},list.push(item)),types.indexOf("Photo")>-1&&(item={Name:"Photos",ServerId:serverId,Id:"localview:PhotosView",Type:"PhotosView",CollectionType:"photos",IsFolder:!0},list.push(item)),types.indexOf("Episode")>-1&&(item={Name:"TV",ServerId:serverId,Id:"localview:TVView",Type:"TVView",CollectionType:"tvshows",IsFolder:!0},list.push(item)),types.indexOf("Movie")>-1&&(item={Name:"Movies",ServerId:serverId,Id:"localview:MoviesView",Type:"MoviesView",CollectionType:"movies",IsFolder:!0},list.push(item)),types.indexOf("Video")>-1&&(item={Name:"Videos",ServerId:serverId,Id:"localview:VideosView",Type:"VideosView",CollectionType:"videos",IsFolder:!0},list.push(item)),types.indexOf("MusicVideo")>-1&&(item={Name:"Music Videos",ServerId:serverId,Id:"localview:MusicVideosView",Type:"MusicVideosView",CollectionType:"videos",IsFolder:!0},list.push(item)),Promise.resolve(list)})}function updateFiltersForTopLevelView(parentId,mediaTypes,includeItemTypes,query){switch(parentId){case"MusicView":return query.Recursive?includeItemTypes.push("Audio"):includeItemTypes.push("MusicAlbum"),!0;case"PhotosView":return query.Recursive?includeItemTypes.push("Photo"):includeItemTypes.push("PhotoAlbum"),!0;case"TVView":return query.Recursive?includeItemTypes.push("Episode"):includeItemTypes.push("Series"),!0;case"VideosView":return query.Recursive,includeItemTypes.push("Video"),!0;case"MoviesView":return query.Recursive,includeItemTypes.push("Movie"),!0;case"MusicVideosView":return query.Recursive,includeItemTypes.push("MusicVideo"),!0}return!1}function normalizeId(id){return id?(id=stripStart(id,"localview:"),id=stripStart(id,"local:")):null}function normalizeIdList(val){return val?val.split(",").map(normalizeId):[]}function shuffle(array){for(var temporaryValue,randomIndex,currentIndex=array.length;0!==currentIndex;)randomIndex=Math.floor(Math.random()*currentIndex),currentIndex-=1,temporaryValue=array[currentIndex],array[currentIndex]=array[randomIndex],array[randomIndex]=temporaryValue;return array}function sortItems(items,query){var sortBy=(query.sortBy||"").split(",")[0];return"DateCreated"===sortBy?items.sort(function(a,b){return compareDates(a.DateCreated,b.DateCreated)}):"Random"===sortBy?items=shuffle(items):items.sort(function(a,b){return a.SortName.toLowerCase().localeCompare(b.SortName.toLowerCase())}),items}function getViewItems(serverId,userId,options){var parentId=options.ParentId;parentId=normalizeId(parentId);var seasonId=normalizeId(options.SeasonId||options.seasonId),seriesId=normalizeId(options.SeriesId||options.seriesId),albumIds=normalizeIdList(options.AlbumIds||options.albumIds),includeItemTypes=options.IncludeItemTypes?options.IncludeItemTypes.split(","):[],filters=options.Filters?options.Filters.split(","):[],mediaTypes=options.MediaTypes?options.MediaTypes.split(","):[];return updateFiltersForTopLevelView(parentId,mediaTypes,includeItemTypes,options)&&(parentId=null),getServerItems(serverId).then(function(items){var resultItems=items.filter(function(item){if(item.SyncStatus&&"synced"!==item.SyncStatus)return!1;if(mediaTypes.length&&-1===mediaTypes.indexOf(item.Item.MediaType||""))return!1;if(seriesId&&item.Item.SeriesId!==seriesId)return!1;if(seasonId&&item.Item.SeasonId!==seasonId)return!1;if(albumIds.length&&-1===albumIds.indexOf(item.Item.AlbumId||""))return!1;if(item.Item.IsFolder&&-1!==filters.indexOf("IsNotFolder"))return!1;if(!item.Item.IsFolder&&-1!==filters.indexOf("IsFolder"))return!1;if(includeItemTypes.length&&-1===includeItemTypes.indexOf(item.Item.Type||""))return!1;if(options.Recursive);else if(parentId&&item.Item.ParentId!==parentId)return!1;return!0}).map(function(item2){return item2.Item});return resultItems=sortItems(resultItems,options),options.Limit&&(resultItems=resultItems.slice(0,options.Limit)),Promise.resolve(resultItems)})}function removeObsoleteContainerItems(serverId){return getServerItems(serverId).then(function(items){var seriesItems=items.filter(function(item){return"series"===(item.Item.Type||"").toLowerCase()}),seasonItems=items.filter(function(item){return"season"===(item.Item.Type||"").toLowerCase()}),albumItems=items.filter(function(item){var type=(item.Item.Type||"").toLowerCase();return"musicalbum"===type||"photoalbum"===type}),requiredSeriesIds=items.filter(function(item){return"episode"===(item.Item.Type||"").toLowerCase()}).map(function(item2){return item2.Item.SeriesId}).filter(filterDistinct),requiredSeasonIds=items.filter(function(item){return"episode"===(item.Item.Type||"").toLowerCase()}).map(function(item2){return item2.Item.SeasonId}).filter(filterDistinct),requiredAlbumIds=items.filter(function(item){var type=(item.Item.Type||"").toLowerCase();return"audio"===type||"photo"===type}).map(function(item2){return item2.Item.AlbumId}).filter(filterDistinct),obsoleteItems=[];seriesItems.forEach(function(item){requiredSeriesIds.indexOf(item.Item.Id)<0&&obsoleteItems.push(item)}),seasonItems.forEach(function(item){requiredSeasonIds.indexOf(item.Item.Id)<0&&obsoleteItems.push(item)}),albumItems.forEach(function(item){requiredAlbumIds.indexOf(item.Item.Id)<0&&obsoleteItems.push(item)});var p=Promise.resolve();return obsoleteItems.forEach(function(item){p=p.then(function(){return itemrepository.remove(item.ServerId,item.Id)})}),p})}function removeLocalItem(localItem){return itemrepository.get(localItem.ServerId,localItem.Id).then(function(item){var onFileDeletedSuccessOrFail=function(){return itemrepository.remove(localItem.ServerId,localItem.Id)};return item.LocalPath?filerepository.deleteFile(item.LocalPath).then(onFileDeletedSuccessOrFail,onFileDeletedSuccessOrFail):onFileDeletedSuccessOrFail()})}function addOrUpdateLocalItem(localItem){return itemrepository.set(localItem.ServerId,localItem.Id,localItem)}function getSubtitleSaveFileName(localItem,mediaPath,language,isForced,format){var name=getNameWithoutExtension(mediaPath);language&&(name+="."+language.toLowerCase()),isForced&&(name+=".foreign"),name=name+"."+format.toLowerCase();var localPathArray=[localItem.LocalFolder,name];return filerepository.getPathFromArray(localPathArray)}function getItemFileSize(path){return filerepository.getItemFileSize(path)}function getNameWithoutExtension(path){var fileName=path,pos=fileName.lastIndexOf(".");return pos>0&&(fileName=fileName.substring(0,pos)),fileName}function downloadFile(url,localItem){var imageUrl=getImageUrl(localItem.Item.ServerId,localItem.Item.Id,{type:"Primary",index:0});return transfermanager.downloadFile(url,localItem,imageUrl)}function downloadSubtitles(url,fileName){return transfermanager.downloadSubtitles(url,fileName)}function getImageUrl(serverId,itemId,imageOptions){var imageType=imageOptions.type,index=imageOptions.index,pathArray=getImagePath(serverId,itemId,imageType,index);return filerepository.getImageUrl(pathArray)}function hasImage(serverId,itemId,imageType,index){var pathArray=getImagePath(serverId,itemId,imageType,index),localFilePath=filerepository.getFullMetadataPath(pathArray);return filerepository.fileExists(localFilePath).then(function(exists){return Promise.resolve(exists)},function(err){return Promise.resolve(!1)})}function fileExists(localFilePath){return filerepository.fileExists(localFilePath)}function downloadImage(localItem,url,serverId,itemId,imageType,index){var localPathParts=getImagePath(serverId,itemId,imageType,index);return transfermanager.downloadImage(url,localPathParts)}function isDownloadFileInQueue(path){return transfermanager.isDownloadFileInQueue(path)}function getDownloadItemCount(){return transfermanager.getDownloadItemCount()}function getDirectoryPath(item){var parts=[],itemtype=item.Type.toLowerCase(),mediaType=(item.MediaType||"").toLowerCase();"episode"===itemtype||"series"===itemtype||"season"===itemtype?parts.push("TV"):"video"===mediaType?parts.push("Videos"):"audio"===itemtype||"musicalbum"===itemtype||"musicartist"===itemtype?parts.push("Music"):"photo"===itemtype||"photoalbum"===itemtype?parts.push("Photos"):"game"!==itemtype&&"gamesystem"!==itemtype||parts.push("Games");var albumArtist=item.AlbumArtist;albumArtist&&parts.push(albumArtist);var seriesName=item.SeriesName;seriesName&&parts.push(seriesName);var seasonName=item.SeasonName;seasonName&&parts.push(seasonName),item.Album&&parts.push(item.Album),("video"===mediaType&&"episode"!==itemtype||"game"===itemtype||item.IsFolder)&&parts.push(item.Name);for(var finalParts=[],i=0;ifind.length&&0===str.indexOf(find))}function stripStart(str,find){return startsWith(str,find)?str.substr(find.length):str}function filterDistinct(value,index,self){return self.indexOf(value)===index}function compareDates(a,b){return isFinite(a=a.valueOf())&&isFinite(b=b.valueOf())?(a>b)-(a-1&&(item={Name:"Music",ServerId:serverId,Id:"localview:MusicView",Type:"MusicView",CollectionType:"music",IsFolder:!0},list.push(item)),types.indexOf("Photo")>-1&&(item={Name:"Photos",ServerId:serverId,Id:"localview:PhotosView",Type:"PhotosView",CollectionType:"photos",IsFolder:!0},list.push(item)),types.indexOf("Episode")>-1&&(item={Name:"TV",ServerId:serverId,Id:"localview:TVView",Type:"TVView",CollectionType:"tvshows",IsFolder:!0},list.push(item)),types.indexOf("Movie")>-1&&(item={Name:"Movies",ServerId:serverId,Id:"localview:MoviesView",Type:"MoviesView",CollectionType:"movies",IsFolder:!0},list.push(item)),types.indexOf("Video")>-1&&(item={Name:"Videos",ServerId:serverId,Id:"localview:VideosView",Type:"VideosView",CollectionType:"videos",IsFolder:!0},list.push(item)),types.indexOf("MusicVideo")>-1&&(item={Name:"Music Videos",ServerId:serverId,Id:"localview:MusicVideosView",Type:"MusicVideosView",CollectionType:"videos",IsFolder:!0},list.push(item)),Promise.resolve(list)})}function updateFiltersForTopLevelView(parentId,mediaTypes,includeItemTypes,query){switch(parentId){case"MusicView":return query.Recursive?includeItemTypes.push("Audio"):includeItemTypes.push("MusicAlbum"),!0;case"PhotosView":return query.Recursive?includeItemTypes.push("Photo"):includeItemTypes.push("PhotoAlbum"),!0;case"TVView":return query.Recursive?includeItemTypes.push("Episode"):includeItemTypes.push("Series"),!0;case"VideosView":return query.Recursive,includeItemTypes.push("Video"),!0;case"MoviesView":return query.Recursive,includeItemTypes.push("Movie"),!0;case"MusicVideosView":return query.Recursive,includeItemTypes.push("MusicVideo"),!0}return!1}function normalizeId(id){return id?(id=stripStart(id,"localview:"),id=stripStart(id,"local:")):null}function normalizeIdList(val){return val?val.split(",").map(normalizeId):[]}function shuffle(array){for(var temporaryValue,randomIndex,currentIndex=array.length;0!==currentIndex;)randomIndex=Math.floor(Math.random()*currentIndex),currentIndex-=1,temporaryValue=array[currentIndex],array[currentIndex]=array[randomIndex],array[randomIndex]=temporaryValue;return array}function sortItems(items,query){var sortBy=(query.sortBy||"").split(",")[0];return"DateCreated"===sortBy?items.sort(function(a,b){return compareDates(a.DateCreated,b.DateCreated)}):"Random"===sortBy?items=shuffle(items):items.sort(function(a,b){return a.SortName.toLowerCase().localeCompare(b.SortName.toLowerCase())}),items}function getViewItems(serverId,userId,options){var parentId=options.ParentId;parentId=normalizeId(parentId);var seasonId=normalizeId(options.SeasonId||options.seasonId),seriesId=normalizeId(options.SeriesId||options.seriesId),albumIds=normalizeIdList(options.AlbumIds||options.albumIds),includeItemTypes=options.IncludeItemTypes?options.IncludeItemTypes.split(","):[],filters=options.Filters?options.Filters.split(","):[],mediaTypes=options.MediaTypes?options.MediaTypes.split(","):[];return updateFiltersForTopLevelView(parentId,mediaTypes,includeItemTypes,options)&&(parentId=null),getServerItems(serverId).then(function(items){var resultItems=items.filter(function(item){if(item.SyncStatus&&"synced"!==item.SyncStatus)return!1;if(mediaTypes.length&&-1===mediaTypes.indexOf(item.Item.MediaType||""))return!1;if(seriesId&&item.Item.SeriesId!==seriesId)return!1;if(seasonId&&item.Item.SeasonId!==seasonId)return!1;if(albumIds.length&&-1===albumIds.indexOf(item.Item.AlbumId||""))return!1;if(item.Item.IsFolder&&-1!==filters.indexOf("IsNotFolder"))return!1;if(!item.Item.IsFolder&&-1!==filters.indexOf("IsFolder"))return!1;if(includeItemTypes.length&&-1===includeItemTypes.indexOf(item.Item.Type||""))return!1;if(options.Recursive);else if(parentId&&item.Item.ParentId!==parentId)return!1;return!0}).map(function(item2){return item2.Item});return resultItems=sortItems(resultItems,options),options.Limit&&(resultItems=resultItems.slice(0,options.Limit)),Promise.resolve(resultItems)})}function removeObsoleteContainerItems(serverId){return getServerItems(serverId).then(function(items){var seriesItems=items.filter(function(item){return"series"===(item.Item.Type||"").toLowerCase()}),seasonItems=items.filter(function(item){return"season"===(item.Item.Type||"").toLowerCase()}),albumItems=items.filter(function(item){var type=(item.Item.Type||"").toLowerCase();return"musicalbum"===type||"photoalbum"===type}),requiredSeriesIds=items.filter(function(item){return"episode"===(item.Item.Type||"").toLowerCase()}).map(function(item2){return item2.Item.SeriesId}).filter(filterDistinct),requiredSeasonIds=items.filter(function(item){return"episode"===(item.Item.Type||"").toLowerCase()}).map(function(item2){return item2.Item.SeasonId}).filter(filterDistinct),requiredAlbumIds=items.filter(function(item){var type=(item.Item.Type||"").toLowerCase();return"audio"===type||"photo"===type}).map(function(item2){return item2.Item.AlbumId}).filter(filterDistinct),obsoleteItems=[];seriesItems.forEach(function(item){requiredSeriesIds.indexOf(item.Item.Id)<0&&obsoleteItems.push(item)}),seasonItems.forEach(function(item){requiredSeasonIds.indexOf(item.Item.Id)<0&&obsoleteItems.push(item)}),albumItems.forEach(function(item){requiredAlbumIds.indexOf(item.Item.Id)<0&&obsoleteItems.push(item)});var p=Promise.resolve();return obsoleteItems.forEach(function(item){p=p.then(function(){return itemrepository.remove(item.ServerId,item.Id)})}),p})}function removeLocalItem(localItem){return itemrepository.get(localItem.ServerId,localItem.Id).then(function(item){var onFileDeletedSuccessOrFail=function(){return itemrepository.remove(localItem.ServerId,localItem.Id)};return item.LocalPath?filerepository.deleteFile(item.LocalPath).then(onFileDeletedSuccessOrFail,onFileDeletedSuccessOrFail):onFileDeletedSuccessOrFail()})}function addOrUpdateLocalItem(localItem){return itemrepository.set(localItem.ServerId,localItem.Id,localItem)}function getSubtitleSaveFileName(localItem,mediaPath,language,isForced,format){var name=getNameWithoutExtension(mediaPath);language&&(name+="."+language.toLowerCase()),isForced&&(name+=".foreign"),name=name+"."+format.toLowerCase();var mediaFolder=filerepository.getParentPath(localItem.LocalPath);return filerepository.combinePath(mediaFolder,name)}function getItemFileSize(path){return filerepository.getItemFileSize(path)}function getNameWithoutExtension(path){var fileName=path,pos=fileName.lastIndexOf(".");return pos>0&&(fileName=fileName.substring(0,pos)),fileName}function downloadFile(url,localItem){var imageUrl=getImageUrl(localItem.Item.ServerId,localItem.Item.Id,{type:"Primary",index:0});return transfermanager.downloadFile(url,localItem,imageUrl)}function downloadSubtitles(url,fileName){return transfermanager.downloadSubtitles(url,fileName)}function getImageUrl(serverId,itemId,imageOptions){var imageType=imageOptions.type,index=imageOptions.index,pathArray=getImagePath(serverId,itemId,imageType,index);return filerepository.getImageUrl(pathArray)}function hasImage(serverId,itemId,imageType,index){var pathArray=getImagePath(serverId,itemId,imageType,index),localFilePath=filerepository.getFullMetadataPath(pathArray);return filerepository.fileExists(localFilePath).then(function(exists){return Promise.resolve(exists)},function(err){return Promise.resolve(!1)})}function fileExists(localFilePath){return filerepository.fileExists(localFilePath)}function downloadImage(localItem,url,serverId,itemId,imageType,index){var localPathParts=getImagePath(serverId,itemId,imageType,index);return transfermanager.downloadImage(url,localPathParts)}function isDownloadFileInQueue(path){return transfermanager.isDownloadFileInQueue(path)}function getDownloadItemCount(){return transfermanager.getDownloadItemCount()}function getDirectoryPath(item){var parts=[],itemtype=item.Type.toLowerCase(),mediaType=(item.MediaType||"").toLowerCase();"episode"===itemtype||"series"===itemtype||"season"===itemtype?parts.push("TV"):"video"===mediaType?parts.push("Videos"):"audio"===itemtype||"musicalbum"===itemtype||"musicartist"===itemtype?parts.push("Music"):"photo"===itemtype||"photoalbum"===itemtype?parts.push("Photos"):"game"!==itemtype&&"gamesystem"!==itemtype||parts.push("Games");var albumArtist=item.AlbumArtist;albumArtist&&parts.push(albumArtist);var seriesName=item.SeriesName;seriesName&&parts.push(seriesName);var seasonName=item.SeasonName;seasonName&&parts.push(seasonName),item.Album&&parts.push(item.Album),("video"===mediaType&&"episode"!==itemtype||"game"===itemtype||item.IsFolder)&&parts.push(item.Name);for(var finalParts=[],i=0;ifind.length&&0===str.indexOf(find))}function stripStart(str,find){return startsWith(str,find)?str.substr(find.length):str}function filterDistinct(value,index,self){return self.indexOf(value)===index}function compareDates(a,b){return isFinite(a=a.valueOf())&&isFinite(b=b.valueOf())?(a>b)-(a0?apiClient.reportSyncJobItemTransferred(item.SyncJobItemId).then(function(){return item.SyncStatus="synced",localassetmanager.addOrUpdateLocalItem(item)},function(error){return console.error("[mediasync] Mediasync error on reportSyncJobItemTransferred",error),item.SyncStatus="error",localassetmanager.addOrUpdateLocalItem(item)}):localassetmanager.isDownloadFileInQueue(item.LocalPath).then(function(result){return result?Promise.resolve():(console.log("[mediasync] reportTransfer: Size is 0 and download no longer in queue. Deleting item."),localassetmanager.removeLocalItem(item).then(function(){return console.log("[mediasync] reportTransfer: Item deleted."),Promise.resolve()},function(err2){return console.log("[mediasync] reportTransfer: Failed to delete item.",err2),Promise.resolve()}))})},function(error){return console.error("[mediasync] reportTransfer: error on getItemFileSize. Deleting item.",error),localassetmanager.removeLocalItem(item).then(function(){return console.log("[mediasync] reportTransfer: Item deleted."),Promise.resolve()},function(err2){return console.log("[mediasync] reportTransfer: Failed to delete item.",err2),Promise.resolve()})})}function reportOfflineActions(apiClient,serverInfo){return console.log("[mediasync] Begin reportOfflineActions"),localassetmanager.getUserActions(serverInfo.Id).then(function(actions){return actions.length?apiClient.reportOfflineActions(actions).then(function(){return localassetmanager.deleteUserActions(actions).then(function(){return console.log("[mediasync] Exit reportOfflineActions (actions reported and deleted.)"),Promise.resolve()})},function(err){return console.error("[mediasync] error on apiClient.reportOfflineActions: "+err.toString()),localassetmanager.deleteUserActions(actions)}):(console.log("[mediasync] Exit reportOfflineActions (no actions)"),Promise.resolve())})}function syncData(apiClient,serverInfo){return console.log("[mediasync] Begin syncData"),localassetmanager.getServerItems(serverInfo.Id).then(function(items){var completedItems=items.filter(function(item){return item&&("synced"===item.SyncStatus||"error"===item.SyncStatus)}),request={TargetId:apiClient.deviceId(),LocalItemIds:completedItems.map(function(xitem){return xitem.ItemId})};return apiClient.syncData(request).then(function(result){return afterSyncData(apiClient,serverInfo,result).then(function(){return console.log("[mediasync] Exit syncData"),Promise.resolve()},function(err){return console.error("[mediasync] Error in syncData: "+err.toString()),Promise.resolve()})})})}function afterSyncData(apiClient,serverInfo,syncDataResult){console.log("[mediasync] Begin afterSyncData");var p=Promise.resolve();return syncDataResult.ItemIdsToRemove&&syncDataResult.ItemIdsToRemove.length>0&&syncDataResult.ItemIdsToRemove.forEach(function(itemId){p=p.then(function(){return removeLocalItem(itemId,serverInfo.Id)})}),p=p.then(function(){return removeObsoleteContainerItems(serverInfo.Id)}),p.then(function(){return console.log("[mediasync] Exit afterSyncData"),Promise.resolve()})}function removeObsoleteContainerItems(serverId){return console.log("[mediasync] Begin removeObsoleteContainerItems"),localassetmanager.removeObsoleteContainerItems(serverId)}function removeLocalItem(itemId,serverId){return console.log("[mediasync] Begin removeLocalItem"),localassetmanager.getLocalItem(serverId,itemId).then(function(item){return item?localassetmanager.removeLocalItem(item):Promise.resolve()})}function getNewMedia(apiClient,downloadCount){return console.log("[mediasync] Begin getNewMedia"),apiClient.getReadySyncItems(apiClient.deviceId()).then(function(jobItems){var p=Promise.resolve(),currentCount=downloadCount;return jobItems.forEach(function(jobItem){currentCount++<=10&&(p=p.then(function(){return getNewItem(jobItem,apiClient)}))}),p.then(function(){return console.log("[mediasync] Exit getNewMedia"),Promise.resolve()})})}function afterMediaDownloaded(apiClient,jobItem,localItem){return getImages(apiClient,jobItem,localItem).then(function(){var libraryItem=jobItem.Item;return downloadParentItems(apiClient,jobItem,libraryItem).then(function(){return getSubtitles(apiClient,jobItem,localItem)})})}function createLocalItem(libraryItem,jobItem){console.log("[localassetmanager] Begin createLocalItem");var item={Item:libraryItem,ItemId:libraryItem.Id,ServerId:libraryItem.ServerId,Id:libraryItem.Id};return jobItem&&(item.SyncJobItemId=jobItem.SyncJobItemId),console.log("[localassetmanager] End createLocalItem"),item}function getNewItem(jobItem,apiClient){console.log("[mediasync] Begin getNewItem");var libraryItem=jobItem.Item;return localassetmanager.getLocalItem(libraryItem.ServerId,libraryItem.Id).then(function(existingItem){if(existingItem&&("queued"===existingItem.SyncStatus||"transferring"===existingItem.SyncStatus||"synced"===existingItem.SyncStatus)&&(console.log("[mediasync] getNewItem: getLocalItem found existing item"),localassetmanager.enableBackgroundCompletion()))return afterMediaDownloaded(apiClient,jobItem,existingItem);libraryItem.CanDelete=!1,libraryItem.CanDownload=!1,libraryItem.SupportsSync=!1,libraryItem.People=[],libraryItem.Chapters=[],libraryItem.Studios=[],libraryItem.SpecialFeatureCount=null,libraryItem.LocalTrailerCount=null,libraryItem.RemoteTrailers=[];var localItem=createLocalItem(libraryItem,jobItem);return localItem.SyncStatus="queued",downloadMedia(apiClient,jobItem,localItem).then(function(){return afterMediaDownloaded(apiClient,jobItem,localItem)})})}function downloadParentItems(apiClient,jobItem,libraryItem){var p=Promise.resolve();return libraryItem.SeriesId&&(p=p.then(function(){return downloadItem(apiClient,libraryItem.SeriesId)})),libraryItem.SeasonId&&(p=p.then(function(){return downloadItem(apiClient,libraryItem.SeasonId).then(function(seasonItem){return libraryItem.SeasonPrimaryImageTag=(seasonItem.Item.ImageTags||{}).Primary,Promise.resolve()})})),libraryItem.AlbumId&&(p=p.then(function(){return downloadItem(apiClient,libraryItem.AlbumId)})),p}function downloadItem(apiClient,itemId){return apiClient.getItem(apiClient.getCurrentUserId(),itemId).then(function(downloadedItem){downloadedItem.CanDelete=!1,downloadedItem.CanDownload=!1,downloadedItem.SupportsSync=!1,downloadedItem.People=[],downloadedItem.SpecialFeatureCount=null,downloadedItem.BackdropImageTags=null,downloadedItem.ParentBackdropImageTags=null,downloadedItem.ParentArtImageTag=null,downloadedItem.ParentLogoImageTag=null;var localItem=createLocalItem(downloadedItem,null);return localassetmanager.addOrUpdateLocalItem(localItem).then(function(){return Promise.resolve(localItem)},function(err){return console.error("[mediasync] downloadItem failed: "+err.toString()),Promise.resolve(null)})})}function ensureLocalPathParts(localItem,jobItem){if(!localItem.LocalPathParts){var libraryItem=localItem.Item,parts=localassetmanager.getDirectoryPath(libraryItem);parts.push(localassetmanager.getLocalFileName(libraryItem,jobItem.OriginalFileName)),localItem.LocalPathParts=parts}}function downloadMedia(apiClient,jobItem,localItem){var url=apiClient.getUrl("Sync/JobItems/"+jobItem.SyncJobItemId+"/File",{api_key:apiClient.accessToken()});return ensureLocalPathParts(localItem,jobItem),localassetmanager.downloadFile(url,localItem).then(function(result){var localPath=result.path,libraryItem=localItem.Item;if(localPath&&libraryItem.MediaSources)for(var i=0;i2?Promise.resolve():reportOfflineActions(apiClient,serverInfo).then(function(){return getNewMedia(apiClient,downloadCount).then(function(){return syncData(apiClient,serverInfo)})})})})})},function(err){console.error(err.toString())})}}}); \ No newline at end of file +define(["localassetmanager"],function(localassetmanager){"use strict";function processDownloadStatus(apiClient,serverInfo,options){return console.log("[mediasync] Begin processDownloadStatus"),localassetmanager.resyncTransfers().then(function(){return localassetmanager.getServerItems(serverInfo.Id).then(function(items){console.log("[mediasync] Begin processDownloadStatus getServerItems completed");var p=Promise.resolve(),cnt=0;return items.filter(function(item){return"transferring"===item.SyncStatus||"queued"===item.SyncStatus}).forEach(function(item){p=p.then(function(){return reportTransfer(apiClient,item)}),cnt++}),p.then(function(){return console.log("[mediasync] Exit processDownloadStatus. Items reported: "+cnt.toString()),Promise.resolve()})})})}function reportTransfer(apiClient,item){return localassetmanager.getItemFileSize(item.LocalPath).then(function(size){return size>0?apiClient.reportSyncJobItemTransferred(item.SyncJobItemId).then(function(){return item.SyncStatus="synced",localassetmanager.addOrUpdateLocalItem(item)},function(error){return console.error("[mediasync] Mediasync error on reportSyncJobItemTransferred",error),item.SyncStatus="error",localassetmanager.addOrUpdateLocalItem(item)}):localassetmanager.isDownloadFileInQueue(item.LocalPath).then(function(result){return result?Promise.resolve():(console.log("[mediasync] reportTransfer: Size is 0 and download no longer in queue. Deleting item."),localassetmanager.removeLocalItem(item).then(function(){return console.log("[mediasync] reportTransfer: Item deleted."),Promise.resolve()},function(err2){return console.log("[mediasync] reportTransfer: Failed to delete item.",err2),Promise.resolve()}))})},function(error){return console.error("[mediasync] reportTransfer: error on getItemFileSize. Deleting item.",error),localassetmanager.removeLocalItem(item).then(function(){return console.log("[mediasync] reportTransfer: Item deleted."),Promise.resolve()},function(err2){return console.log("[mediasync] reportTransfer: Failed to delete item.",err2),Promise.resolve()})})}function reportOfflineActions(apiClient,serverInfo){return console.log("[mediasync] Begin reportOfflineActions"),localassetmanager.getUserActions(serverInfo.Id).then(function(actions){return actions.length?apiClient.reportOfflineActions(actions).then(function(){return localassetmanager.deleteUserActions(actions).then(function(){return console.log("[mediasync] Exit reportOfflineActions (actions reported and deleted.)"),Promise.resolve()})},function(err){return console.error("[mediasync] error on apiClient.reportOfflineActions: "+err.toString()),localassetmanager.deleteUserActions(actions)}):(console.log("[mediasync] Exit reportOfflineActions (no actions)"),Promise.resolve())})}function syncData(apiClient,serverInfo){return console.log("[mediasync] Begin syncData"),localassetmanager.getServerItems(serverInfo.Id).then(function(items){var completedItems=items.filter(function(item){return item&&("synced"===item.SyncStatus||"error"===item.SyncStatus)}),request={TargetId:apiClient.deviceId(),LocalItemIds:completedItems.map(function(xitem){return xitem.ItemId})};return apiClient.syncData(request).then(function(result){return afterSyncData(apiClient,serverInfo,result).then(function(){return console.log("[mediasync] Exit syncData"),Promise.resolve()},function(err){return console.error("[mediasync] Error in syncData: "+err.toString()),Promise.resolve()})})})}function afterSyncData(apiClient,serverInfo,syncDataResult){console.log("[mediasync] Begin afterSyncData");var p=Promise.resolve();return syncDataResult.ItemIdsToRemove&&syncDataResult.ItemIdsToRemove.length>0&&syncDataResult.ItemIdsToRemove.forEach(function(itemId){p=p.then(function(){return removeLocalItem(itemId,serverInfo.Id)})}),p=p.then(function(){return removeObsoleteContainerItems(serverInfo.Id)}),p.then(function(){return console.log("[mediasync] Exit afterSyncData"),Promise.resolve()})}function removeObsoleteContainerItems(serverId){return console.log("[mediasync] Begin removeObsoleteContainerItems"),localassetmanager.removeObsoleteContainerItems(serverId)}function removeLocalItem(itemId,serverId){return console.log("[mediasync] Begin removeLocalItem"),localassetmanager.getLocalItem(serverId,itemId).then(function(item){return item?localassetmanager.removeLocalItem(item):Promise.resolve()})}function getNewMedia(apiClient,downloadCount){return console.log("[mediasync] Begin getNewMedia"),apiClient.getReadySyncItems(apiClient.deviceId()).then(function(jobItems){var p=Promise.resolve(),currentCount=downloadCount;return jobItems.forEach(function(jobItem){currentCount++<=10&&(p=p.then(function(){return getNewItem(jobItem,apiClient)}))}),p.then(function(){return console.log("[mediasync] Exit getNewMedia"),Promise.resolve()})})}function afterMediaDownloaded(apiClient,jobItem,localItem){return console.log("[mediasync] Begin afterMediaDownloaded"),getImages(apiClient,jobItem,localItem).then(function(){var libraryItem=jobItem.Item;return downloadParentItems(apiClient,jobItem,libraryItem).then(function(){return getSubtitles(apiClient,jobItem,localItem)})})}function createLocalItem(libraryItem,jobItem){console.log("[localassetmanager] Begin createLocalItem");var item={Item:libraryItem,ItemId:libraryItem.Id,ServerId:libraryItem.ServerId,Id:libraryItem.Id};return jobItem&&(item.SyncJobItemId=jobItem.SyncJobItemId),console.log("[localassetmanager] End createLocalItem"),item}function getNewItem(jobItem,apiClient){console.log("[mediasync] Begin getNewItem");var libraryItem=jobItem.Item;return localassetmanager.getLocalItem(libraryItem.ServerId,libraryItem.Id).then(function(existingItem){if(existingItem&&("queued"===existingItem.SyncStatus||"transferring"===existingItem.SyncStatus||"synced"===existingItem.SyncStatus)&&(console.log("[mediasync] getNewItem: getLocalItem found existing item"),localassetmanager.enableBackgroundCompletion()))return afterMediaDownloaded(apiClient,jobItem,existingItem);libraryItem.CanDelete=!1,libraryItem.CanDownload=!1,libraryItem.SupportsSync=!1,libraryItem.People=[],libraryItem.Chapters=[],libraryItem.Studios=[],libraryItem.SpecialFeatureCount=null,libraryItem.LocalTrailerCount=null,libraryItem.RemoteTrailers=[];var localItem=createLocalItem(libraryItem,jobItem);return localItem.SyncStatus="queued",downloadMedia(apiClient,jobItem,localItem)})}function downloadParentItems(apiClient,jobItem,libraryItem){var p=Promise.resolve();return libraryItem.SeriesId&&(p=p.then(function(){return downloadItem(apiClient,libraryItem.SeriesId)})),libraryItem.SeasonId&&(p=p.then(function(){return downloadItem(apiClient,libraryItem.SeasonId).then(function(seasonItem){return libraryItem.SeasonPrimaryImageTag=(seasonItem.Item.ImageTags||{}).Primary,Promise.resolve()})})),libraryItem.AlbumId&&(p=p.then(function(){return downloadItem(apiClient,libraryItem.AlbumId)})),p}function downloadItem(apiClient,itemId){return apiClient.getItem(apiClient.getCurrentUserId(),itemId).then(function(downloadedItem){downloadedItem.CanDelete=!1,downloadedItem.CanDownload=!1,downloadedItem.SupportsSync=!1,downloadedItem.People=[],downloadedItem.SpecialFeatureCount=null,downloadedItem.BackdropImageTags=null,downloadedItem.ParentBackdropImageTags=null,downloadedItem.ParentArtImageTag=null,downloadedItem.ParentLogoImageTag=null;var localItem=createLocalItem(downloadedItem,null);return localassetmanager.addOrUpdateLocalItem(localItem).then(function(){return Promise.resolve(localItem)},function(err){return console.error("[mediasync] downloadItem failed: "+err.toString()),Promise.resolve(null)})})}function ensureLocalPathParts(localItem,jobItem){if(!localItem.LocalPathParts){var libraryItem=localItem.Item,parts=localassetmanager.getDirectoryPath(libraryItem);parts.push(localassetmanager.getLocalFileName(libraryItem,jobItem.OriginalFileName)),localItem.LocalPathParts=parts}}function downloadMedia(apiClient,jobItem,localItem){var url=apiClient.getUrl("Sync/JobItems/"+jobItem.SyncJobItemId+"/File",{api_key:apiClient.accessToken()});return ensureLocalPathParts(localItem,jobItem),localassetmanager.downloadFile(url,localItem).then(function(result){console.log("[mediasync] downloadMedia: localassetmanager.downloadFile returned.");var localPath=result.path,libraryItem=localItem.Item;if(localPath&&libraryItem.MediaSources)for(var i=0;i2?Promise.resolve():reportOfflineActions(apiClient,serverInfo).then(function(){return getNewMedia(apiClient,downloadCount).then(function(){return syncData(apiClient,serverInfo).then(function(){return console.log("[mediasync]************************************* Exit sync"),Promise.resolve()})})})})})},function(err){console.error(err.toString())})}:self.sync=function(apiClient,serverInfo,options){return console.log("[mediasync]************************************* Start sync"),checkLocalFileExistence(apiClient,serverInfo,options).then(function(){return syncData(apiClient,serverInfo).then(function(){return processDownloadStatus(apiClient,serverInfo,options).then(function(){return localassetmanager.getDownloadItemCount().then(function(downloadCount){return!0===options.syncCheckProgressOnly&&downloadCount>2?Promise.resolve():reportOfflineActions(apiClient,serverInfo).then(function(){return getNewMedia(apiClient,downloadCount).then(function(){return syncData(apiClient,serverInfo)})})})})})},function(err){console.error(err.toString())})}}}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/backdrop/style.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/backdrop/style.css index ce6cf837f2..fe210bc34b 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/backdrop/style.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/backdrop/style.css @@ -1 +1 @@ -.backdropContainer{contain:layout style size}.backdropImage{background-repeat:no-repeat;background-position:center center;-webkit-background-size:cover;background-size:cover;background-attachment:fixed;position:absolute;top:0;left:0;right:0;bottom:0;contain:layout style}.backdropImageFadeIn{-webkit-animation:backdrop-fadein .8s ease-in normal both;animation:backdrop-fadein .8s ease-in normal both}@-webkit-keyframes backdrop-fadein{from{opacity:0}to{opacity:1}}@keyframes backdrop-fadein{from{opacity:0}to{opacity:1}} \ No newline at end of file +.backdropContainer{contain:layout style size}.backdropImage{background-repeat:no-repeat;background-position:center center;-webkit-background-size:cover;background-size:cover;position:absolute;top:0;left:0;right:0;bottom:0;contain:layout style}.backdropImageFadeIn{-webkit-animation:backdrop-fadein .8s ease-in normal both;animation:backdrop-fadein .8s ease-in normal both}@-webkit-keyframes backdrop-fadein{from{opacity:0}to{opacity:1}}@keyframes backdrop-fadein{from{opacity:0}to{opacity:1}} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js index efa7be0d90..1b6763d48d 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js @@ -1,2 +1,2 @@ -define(["datetime","imageLoader","connectionManager","itemHelper","focusManager","indicators","globalize","layoutManager","apphost","dom","browser","playbackManager","itemShortcuts","css!./card","paper-icon-button-light","programStyles"],function(datetime,imageLoader,connectionManager,itemHelper,focusManager,indicators,globalize,layoutManager,appHost,dom,browser,playbackManager,itemShortcuts){"use strict";function getCardsHtml(items,options){return 1===arguments.length&&(options=arguments[0],items=options.items),buildCardsHtmlInternal(items,options)}function getPostersPerRow(shape,screenWidth,isOrientationLandscape){switch(shape){case"portrait":return layoutManager.tv?5.9999999988:screenWidth>=2200?10:screenWidth>=1920?9.000000000009:screenWidth>=1600?8:screenWidth>=1400?7.0000000000021:screenWidth>=1200?5.9999999988:screenWidth>=800?5:screenWidth>=700?4:3.0000000003;case"square":return layoutManager.tv?5.9999999988:screenWidth>=2200?10:screenWidth>=1920?9.000000000009:screenWidth>=1600?8:screenWidth>=1400?7.0000000000021:screenWidth>=1200?5.9999999988:screenWidth>=800?5:screenWidth>=700?4:screenWidth>=500?3.0000000003:2;case"banner":return screenWidth>=2200?4:screenWidth>=1200?3.0000000003:screenWidth>=800?2:1;case"backdrop":return layoutManager.tv?4:screenWidth>=2500?6:screenWidth>=1600?5:screenWidth>=1200?4:screenWidth>=770?3:screenWidth>=420?2:1;case"smallBackdrop":return screenWidth>=1600?8:screenWidth>=1400?7.000000000007001:screenWidth>=1200?6:screenWidth>=1e3?5:screenWidth>=800?4:screenWidth>=500?3.0000000003:2;case"overflowSmallBackdrop":return layoutManager.tv?100/18.9:isOrientationLandscape?screenWidth>=800?100/15.5:100/23.3:screenWidth>=540?100/30:100/72;case"overflowPortrait":return layoutManager.tv?100/15.5:isOrientationLandscape?screenWidth>=1700?100/11.6:100/15.5:screenWidth>=1400?100/15:screenWidth>=1200?100/18:screenWidth>=760?100/23:screenWidth>=400?100/31.5:100/42;case"overflowSquare":return layoutManager.tv?100/15.5:isOrientationLandscape?screenWidth>=1700?100/11.6:100/15.5:screenWidth>=1400?100/15:screenWidth>=1200?100/18:screenWidth>=760?100/23:screenWidth>=540?100/31.5:100/42;case"overflowBackdrop":return layoutManager.tv?100/23.3:isOrientationLandscape?screenWidth>=1700?100/18.5:100/23.3:screenWidth>=1800?100/23.5:screenWidth>=1400?100/30:screenWidth>=760?2.5:screenWidth>=640?100/56:100/72;default:return 4}}function isResizable(windowWidth){var screen=window.screen;if(screen){if(screen.availWidth-windowWidth>20)return!0}return!1}function getImageWidth(shape,screenWidth,isOrientationLandscape){var imagesPerRow=getPostersPerRow(shape,screenWidth,isOrientationLandscape),shapeWidth=screenWidth/imagesPerRow;return Math.round(shapeWidth)}function setCardData(items,options){options.shape=options.shape||"auto";var primaryImageAspectRatio=imageLoader.getPrimaryImageAspectRatio(items);if("auto"===options.shape||"autohome"===options.shape||"autooverflow"===options.shape||"autoVertical"===options.shape){var requestedShape=options.shape;options.shape=null,primaryImageAspectRatio&&(primaryImageAspectRatio>=3?(options.shape="banner",options.coverImage=!0):options.shape=primaryImageAspectRatio>=1.33?"autooverflow"===requestedShape?"overflowBackdrop":"backdrop":primaryImageAspectRatio>.71?"autooverflow"===requestedShape?"overflowSquare":"square":"autooverflow"===requestedShape?"overflowPortrait":"portrait"),options.shape||(options.shape=options.defaultShape||("autooverflow"===requestedShape?"overflowSquare":"square"))}if("auto"===options.preferThumb&&(options.preferThumb="backdrop"===options.shape||"overflowBackdrop"===options.shape),options.uiAspect=getDesiredAspect(options.shape),options.primaryImageAspectRatio=primaryImageAspectRatio,!options.width&&options.widths&&(options.width=options.widths[options.shape]),options.rows&&"number"!=typeof options.rows&&(options.rows=options.rows[options.shape]),!options.width){var screenWidth=dom.getWindowSize().innerWidth,screenHeight=dom.getWindowSize().innerHeight;if(isResizable(screenWidth)){screenWidth=100*Math.floor(screenWidth/100)}options.width=getImageWidth(options.shape,screenWidth,screenWidth>1.3*screenHeight)}}function buildCardsHtmlInternal(items,options){var isVertical;"autoVertical"===options.shape&&(isVertical=!0),setCardData(items,options);var currentIndexValue,hasOpenRow,hasOpenSection,apiClient,lastServerId,i,length,html="",itemsInRow=0,sectionTitleTagName=options.sectionTitleTagName||"div";for(i=0,length=items.length;i=.5?.5:0)+"+":null);newIndexValue!==currentIndexValue&&(hasOpenRow&&(html+="",hasOpenRow=!1,itemsInRow=0),hasOpenSection&&(html+="",isVertical&&(html+=""),hasOpenSection=!1),html+=isVertical?'
':'
',html+="<"+sectionTitleTagName+' class="sectionTitle">'+newIndexValue+"",isVertical&&(html+='
'),currentIndexValue=newIndexValue,hasOpenSection=!0)}options.rows&&0===itemsInRow&&(hasOpenRow&&(html+="
",hasOpenRow=!1),html+='
',hasOpenRow=!0),html+=buildCard(i,item,apiClient,options),itemsInRow++,options.rows&&itemsInRow>=options.rows&&(html+="
",hasOpenRow=!1,itemsInRow=0)}hasOpenRow&&(html+="
"),hasOpenSection&&(html+="
",isVertical&&(html+=""));var cardFooterHtml="";for(i=0,length=options.lines||0;i ':'
 
';if(options.leadingButtons)for(i=0,length=options.leadingButtons.length;i',cardBoxClass="cardBox";cardBoxClass+=enableFocusTransfrom?" cardBox-focustransform cardBox-withfocuscontent":" cardBox-withfocuscontent-large",cardFooterHtml&&(cardBoxClass+=" cardBox-bottompadded");var cardScalableClass="cardScalable card-focuscontent";cardScalableClass+=" card-focuscontent",enableFocusTransfrom||(cardScalableClass+=" card-focuscontent-large"),html+='
';var icon="";return buttonInfo.icon&&(icon=''+buttonInfo.icon+""),html+='
'+icon+'
'+buttonInfo.name+"
",html+=cardFooterHtml,html+="
",buttonInfo.routeUrl?html+="":html+="",html}function getDesiredAspect(shape){if(shape){if(shape=shape.toLowerCase(),-1!==shape.indexOf("portrait"))return 2/3;if(-1!==shape.indexOf("backdrop"))return 16/9;if(-1!==shape.indexOf("square"))return 1;if(-1!==shape.indexOf("banner"))return 1e3/185}return null}function getCardImageUrl(item,apiClient,options,shape){item=item.ProgramInfo||item;var width=options.width,height=null,primaryImageAspectRatio=item.PrimaryImageAspectRatio,forceName=!1,imgUrl=null,coverImage=!1,uiAspect=null;return options.preferThumb&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):(options.preferBanner||"banner"===shape)&&item.ImageTags&&item.ImageTags.Banner?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Banner",maxWidth:width,tag:item.ImageTags.Banner}):options.preferDisc&&item.ImageTags&&item.ImageTags.Disc?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Disc",maxWidth:width,tag:item.ImageTags.Disc}):options.preferLogo&&item.ImageTags&&item.ImageTags.Logo?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Logo",maxWidth:width,tag:item.ImageTags.Logo}):options.preferLogo&&item.ParentLogoImageTag&&item.ParentLogoItemId?imgUrl=apiClient.getScaledImageUrl(item.ParentLogoItemId,{type:"Logo",maxWidth:width,tag:item.ParentLogoImageTag}):options.preferThumb&&item.SeriesThumbImageTag&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):options.preferThumb&&item.ParentThumbItemId&&!1!==options.inheritThumb&&"Photo"!==item.MediaType?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):options.preferThumb&&item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}),forceName=!0):options.preferThumb&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&!1!==options.inheritThumb&&"Episode"===item.Type?imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Primary?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.ImageTags.Primary}),options.preferThumb&&!1!==options.showTitle&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):item.PrimaryImageTag?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.PrimaryImageItemId||item.Id||item.ItemId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.PrimaryImageTag}),options.preferThumb&&!1!==options.showTitle&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):item.ParentPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.ParentPrimaryImageItemId,{type:"Primary",maxWidth:width,tag:item.ParentPrimaryImageTag}):item.SeriesPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Primary",maxWidth:width,tag:item.SeriesPrimaryImageTag}):item.AlbumId&&item.AlbumPrimaryImageTag?(width=primaryImageAspectRatio?Math.round(height*primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.AlbumId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.AlbumPrimaryImageTag}),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):"Season"===item.Type&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.BackdropImageTags&&item.BackdropImageTags.length?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.SeriesThumbImageTag&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):item.ParentThumbItemId&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&!1!==options.inheritThumb&&(imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]})),{imgUrl:imgUrl,forceName:forceName,coverImage:coverImage}}function getRandomInt(min,max){return Math.floor(Math.random()*(max-min+1))+min}function getDefaultColorIndex(str){if(str){for(var charIndex=Math.floor(str.length/2),character=String(str.substr(charIndex,1).charCodeAt()),sum=0,i=0;i0&&isOuterFooter?currentCssClass+=" cardText-secondary":0===valid&&isOuterFooter&&(currentCssClass+=" cardText-first"),addRightMargin&&(currentCssClass+=" cardText-rightmargin"),text&&(html+="
",html+=text,html+="
",valid++,maxLines&&valid>=maxLines))break}if(forceLines)for(length=maxLines||Math.min(lines.length,maxLines||lines.length);valid ",valid++;return html}function isUsingLiveTvNaming(item){return"Program"===item.Type||"Timer"===item.Type||"Recording"===item.Type}function getAirTimeText(item,showAirDateTime,showAirEndTime){var airTimeText="";if(item.StartDate)try{var date=datetime.parseISO8601Date(item.StartDate);showAirDateTime&&(airTimeText+=datetime.toLocaleDateString(date,{weekday:"short",month:"short",day:"numeric"})+" "),airTimeText+=datetime.getDisplayTime(date),item.EndDate&&showAirEndTime&&(date=datetime.parseISO8601Date(item.EndDate),airTimeText+=" - "+datetime.getDisplayTime(date))}catch(e){console.log("Error parsing date: "+item.StartDate)}return airTimeText}function getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerClass,progressHtml,logoUrl,isOuterFooter){var html="";logoUrl&&(html+='');var showOtherText=isOuterFooter?!overlayText:overlayText;if(isOuterFooter&&options.cardLayout&&!layoutManager.tv&&"none"!==options.cardFooterAside){html+=''}var titleAdded,cssClass=options.centerText?"cardText cardTextCentered":"cardText",lines=[],parentTitleUnderneath="MusicAlbum"===item.Type||"Audio"===item.Type||"MusicVideo"===item.Type;if(showOtherText&&(options.showParentTitle||options.showParentTitleOrTitle)&&!parentTitleUnderneath)if(isOuterFooter&&"Episode"===item.Type&&item.SeriesName)item.SeriesId?lines.push(getTextActionButton({Id:item.SeriesId,ServerId:item.ServerId,Name:item.SeriesName,Type:"Series",IsFolder:!0})):lines.push(item.SeriesName);else if(isUsingLiveTvNaming(item))lines.push(item.Name),item.EpisodeTitle||(titleAdded=!0);else{var parentTitle=item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"";(parentTitle||showTitle)&&lines.push(parentTitle)}var showMediaTitle=showTitle&&!titleAdded||options.showParentTitleOrTitle&&!lines.length;if(showMediaTitle||titleAdded||!showTitle&&!forceName||(showMediaTitle=!0),showMediaTitle){var name="auto"!==options.showTitle||item.IsFolder||"Photo"!==item.MediaType?itemHelper.getDisplayName(item,{includeParentInfo:options.includeParentInfoInTitle}):"";lines.push(name)}if(showOtherText){if(options.showParentTitle&&parentTitleUnderneath&&(isOuterFooter&&item.AlbumArtists&&item.AlbumArtists.length?(item.AlbumArtists[0].Type="MusicArtist",item.AlbumArtists[0].IsFolder=!0,lines.push(getTextActionButton(item.AlbumArtists[0],null,item.ServerId))):lines.push(isUsingLiveTvNaming(item)?item.Name:item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"")),options.showItemCounts){var itemCountHtml=getItemCountsHtml(options,item);lines.push(itemCountHtml)}if(options.textLines)for(var additionalLines=options.textLines(item),i=0,length=additionalLines.length;i'+html,html+=""),html}function getTextActionButton(item,text,serverId){if(text||(text=itemHelper.getDisplayName(item)),layoutManager.tv)return text;var html=""}function getItemCountsHtml(options,item){var childText,counts=[];if("Playlist"===item.Type){if(childText="",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;minutes=minutes||1,childText+=globalize.translate("sharedcomponents#ValueMinutes",Math.round(minutes))}else childText+=globalize.translate("sharedcomponents#ValueMinutes",0);counts.push(childText)}else"Genre"===item.Type||"Studio"===item.Type?(item.MovieCount&&(childText=1===item.MovieCount?globalize.translate("sharedcomponents#ValueOneMovie"):globalize.translate("sharedcomponents#ValueMovieCount",item.MovieCount),counts.push(childText)),item.SeriesCount&&(childText=1===item.SeriesCount?globalize.translate("sharedcomponents#ValueOneSeries"):globalize.translate("sharedcomponents#ValueSeriesCount",item.SeriesCount),counts.push(childText)),item.EpisodeCount&&(childText=1===item.EpisodeCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.EpisodeCount),counts.push(childText)),item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText))):"GameGenre"===item.Type?item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText)):"MusicGenre"===item.Type||"MusicArtist"===options.context?(item.AlbumCount&&(childText=1===item.AlbumCount?globalize.translate("sharedcomponents#ValueOneAlbum"):globalize.translate("sharedcomponents#ValueAlbumCount",item.AlbumCount),counts.push(childText)),item.SongCount&&(childText=1===item.SongCount?globalize.translate("sharedcomponents#ValueOneSong"):globalize.translate("sharedcomponents#ValueSongCount",item.SongCount),counts.push(childText)),item.MusicVideoCount&&(childText=1===item.MusicVideoCount?globalize.translate("sharedcomponents#ValueOneMusicVideo"):globalize.translate("sharedcomponents#ValueMusicVideoCount",item.MusicVideoCount),counts.push(childText))):"Series"===item.Type&&(childText=1===item.RecursiveItemCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.RecursiveItemCount),counts.push(childText));return counts.join(", ")}function requireRefreshIndicator(){refreshIndicatorLoaded||(refreshIndicatorLoaded=!0,require(["emby-itemrefreshindicator"]))}function getDefaultBackgroundClass(str){return"defaultCardBackground defaultCardBackground"+getDefaultColorIndex(str)}function buildCard(index,item,apiClient,options){var action=options.action||"link";"play"===action&&item.IsFolder?action="link":"Photo"===item.MediaType&&(action="play");var shape=options.shape;if("mixed"===shape){shape=null;var primaryImageAspectRatio=item.PrimaryImageAspectRatio;primaryImageAspectRatio&&(shape=primaryImageAspectRatio>=1.33?"mixedBackdrop":primaryImageAspectRatio>.71?"mixedSquare":"mixedPortrait"),shape=shape||"mixedSquare"}var className="card";shape&&(className+=" "+shape+"Card"),options.cardCssClass&&(className+=" "+options.cardCssClass),options.cardClass&&(className+=" "+options.cardClass),layoutManager.desktop&&(className+=" card-hoverable"),enableFocusTransfrom&&layoutManager.tv||(className+=" card-nofocustransform");var imgInfo=getCardImageUrl(item,apiClient,options,shape),imgUrl=imgInfo.imgUrl,forceName=imgInfo.forceName,showTitle="auto"===options.showTitle||(options.showTitle||"PhotoAlbum"===item.Type||"Folder"===item.Type),overlayText=options.overlayText;forceName&&!options.cardLayout&&null==overlayText&&(overlayText=!0);var cardImageContainerClass="cardImageContainer";(options.coverImage||imgInfo.coverImage)&&(cardImageContainerClass+=" coveredImage",("Photo"===item.MediaType||"PhotoAlbum"===item.Type||"Folder"===item.Type||item.ProgramInfo||"Program"===item.Type||"Recording"===item.Type)&&(cardImageContainerClass+=" coveredImage-noScale")),imgUrl||(cardImageContainerClass+=" "+getDefaultBackgroundClass(item.Name));var cardBoxClass=options.cardLayout?"cardBox visualCardBox":"cardBox";layoutManager.tv&&(cardBoxClass+=enableFocusTransfrom?" cardBox-focustransform cardBox-withfocuscontent":" cardBox-withfocuscontent-large",options.cardLayout&&(cardBoxClass+=" card-focuscontent",enableFocusTransfrom||(cardBoxClass+=" card-focuscontent-large")));var footerCssClass,logoUrl,progressHtml=indicators.getProgressBarHtml(item),innerCardFooter="",footerOverlayed=!1;options.showChannelLogo&&item.ChannelPrimaryImageTag?logoUrl=apiClient.getScaledImageUrl(item.ChannelId,{type:"Primary",height:40,tag:item.ChannelPrimaryImageTag}):options.showLogo&&item.ParentLogoImageTag&&(logoUrl=apiClient.getScaledImageUrl(item.ParentLogoItemId,{type:"Logo",height:40,tag:item.ParentLogoImageTag})),overlayText?(logoUrl=null,footerCssClass=progressHtml?"innerCardFooter fullInnerCardFooter":"innerCardFooter",innerCardFooter+=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,logoUrl,!1),footerOverlayed=!0):progressHtml&&(innerCardFooter+='
',innerCardFooter+=progressHtml,innerCardFooter+="
",progressHtml="");var mediaSourceCount=item.MediaSourceCount||1;mediaSourceCount>1&&(innerCardFooter+='
'+mediaSourceCount+"
");var outerCardFooter="";overlayText||footerOverlayed||(footerCssClass=options.cardLayout?"cardFooter":"cardFooter cardFooter-transparent",logoUrl&&(footerCssClass+=" cardFooter-withlogo"),options.cardLayout||(logoUrl=null),outerCardFooter=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,logoUrl,!0)),outerCardFooter&&!options.cardLayout&&(cardBoxClass+=" cardBox-bottompadded");var overlayButtons="";if(layoutManager.mobile){var overlayPlayButton=options.overlayPlayButton;null!=overlayPlayButton||options.overlayMoreButton||options.overlayInfoButton||options.cardLayout||(overlayPlayButton="Video"===item.MediaType);var btnCssClass="cardOverlayButton cardOverlayButton-br itemAction";if(options.centerPlayButton&&(overlayButtons+=''),!overlayPlayButton||item.IsPlaceHolder||"Virtual"===item.LocationType&&item.MediaType&&"Program"!==item.Type||"Person"===item.Type||(overlayButtons+=''),options.overlayMoreButton){overlayButtons+=''}}options.showChildCountIndicator&&item.ChildCount&&(className+=" groupedCard");var cardImageContainerOpen,cardImageContainerClose="",cardBoxClose="",cardScalableClose="",cardContentClass="cardContent";options.cardLayout||(cardContentClass+=" cardContent-shadow"),layoutManager.tv?(cardImageContainerOpen=imgUrl?'
':'
',cardImageContainerClose="
"):(cardImageContainerOpen=imgUrl?'");var cardScalableClass="cardScalable";layoutManager.tv&&!options.cardLayout&&(cardScalableClass+=" card-focuscontent",enableFocusTransfrom||(cardScalableClass+=" card-focuscontent-large")),cardImageContainerOpen='
'+cardImageContainerOpen,cardBoxClose="
",cardScalableClose="
";var indicatorsHtml="";if(!1!==options.missingIndicator&&(indicatorsHtml+=indicators.getMissingIndicator(item)),indicatorsHtml+=indicators.getSyncIndicator(item),indicatorsHtml+=indicators.getTimerIndicator(item),indicatorsHtml+=indicators.getTypeIndicator(item),options.showGroupCount?indicatorsHtml+=indicators.getChildCountIndicatorHtml(item,{minCount:1}):indicatorsHtml+=indicators.getPlayedIndicatorHtml(item),"CollectionFolder"===item.Type||item.CollectionType){indicatorsHtml+='
',requireRefreshIndicator()}indicatorsHtml&&(cardImageContainerOpen+='
'+indicatorsHtml+"
"),imgUrl||(cardImageContainerOpen+=getCardDefaultText(item,options));var tagName=layoutManager.tv&&!overlayButtons?"button":"div",nameWithPrefix=item.SortName||item.Name||"",prefix=nameWithPrefix.substring(0,Math.min(3,nameWithPrefix.length));prefix&&(prefix=prefix.toUpperCase());var timerAttributes="";item.TimerId&&(timerAttributes+=' data-timerid="'+item.TimerId+'"'),item.SeriesTimerId&&(timerAttributes+=' data-seriestimerid="'+item.SeriesTimerId+'"');var actionAttribute;"button"===tagName?(className+=" itemAction",actionAttribute=' data-action="'+action+'"'):actionAttribute="","MusicAlbum"!==item.Type&&"MusicArtist"!==item.Type&&"Audio"!==item.Type&&(className+=" card-withuserdata");var positionTicksData=item.UserData&&item.UserData.PlaybackPositionTicks?' data-positionticks="'+item.UserData.PlaybackPositionTicks+'"':"",collectionIdData=options.collectionId?' data-collectionid="'+options.collectionId+'"':"",playlistIdData=options.playlistId?' data-playlistid="'+options.playlistId+'"':"",mediaTypeData=item.MediaType?' data-mediatype="'+item.MediaType+'"':"",collectionTypeData=item.CollectionType?' data-collectiontype="'+item.CollectionType+'"':"",channelIdData=item.ChannelId?' data-channelid="'+item.ChannelId+'"':"",contextData=options.context?' data-context="'+options.context+'"':"",parentIdData=options.parentId?' data-parentid="'+options.parentId+'"':"",additionalCardContent="";return layoutManager.desktop&&(additionalCardContent+=getHoverMenuHtml(item,action)),"<"+tagName+' data-index="'+index+'"'+timerAttributes+actionAttribute+' data-isfolder="'+(item.IsFolder||!1)+'" data-serverid="'+(item.ServerId||options.serverId)+'" data-id="'+(item.Id||item.ItemId)+'" data-type="'+item.Type+'"'+mediaTypeData+collectionTypeData+channelIdData+positionTicksData+collectionIdData+playlistIdData+contextData+parentIdData+' data-prefix="'+prefix+'" class="'+className+'">'+cardImageContainerOpen+innerCardFooter+cardImageContainerClose+overlayButtons+additionalCardContent+cardScalableClose+outerCardFooter+cardBoxClose+""}function getHoverMenuHtml(item,action){var html="";html+='
';var btnCssClass="cardOverlayButton cardOverlayButton-hover itemAction";playbackManager.canPlay(item)&&(html+=''),html+='
';var userData=item.UserData||{};if(itemHelper.canMarkPlayed(item)&&(require(["emby-playstatebutton"]),html+=''),itemHelper.canRate(item)){var likes=null==userData.Likes?"":userData.Likes;require(["emby-ratingbutton"]),html+=''}return html+='', -html+="
",html+="
"}function getCardDefaultText(item,options){var collectionType=item.CollectionType;return"livetv"===collectionType?'':"homevideos"===collectionType||"photos"===collectionType?'':"music"===collectionType?'':"MusicAlbum"===item.Type?'':"MusicArtist"===item.Type||"Person"===item.Type?'':options.defaultCardImageIcon?''+options.defaultCardImageIcon+"":'
'+(isUsingLiveTvNaming(item)?item.Name:itemHelper.getDisplayName(item))+"
"}function buildCards(items,options){if(document.body.contains(options.itemsContainer)){if(options.parentContainer){if(!items.length)return void options.parentContainer.classList.add("hide");options.parentContainer.classList.remove("hide")}var html=buildCardsHtmlInternal(items,options);html?(options.itemsContainer.cardBuilderHtml!==html&&(options.itemsContainer.innerHTML=html,items.length<50?options.itemsContainer.cardBuilderHtml=html:options.itemsContainer.cardBuilderHtml=null),imageLoader.lazyChildren(options.itemsContainer)):(options.itemsContainer.innerHTML=html,options.itemsContainer.cardBuilderHtml=null),options.autoFocus&&focusManager.autoFocus(options.itemsContainer,!0)}}function ensureIndicators(card,indicatorsElem){if(indicatorsElem)return indicatorsElem;if(!(indicatorsElem=card.querySelector(".cardIndicators"))){var cardImageContainer=card.querySelector(".cardImageContainer");indicatorsElem=document.createElement("div"),indicatorsElem.classList.add("cardIndicators"),cardImageContainer.appendChild(indicatorsElem)}return indicatorsElem}function updateUserData(card,userData){var type=card.getAttribute("data-type"),enableCountIndicator="Series"===type||"BoxSet"===type||"Season"===type,indicatorsElem=null,playedIndicator=null,countIndicator=null,itemProgressBar=null;userData.Played?(playedIndicator=card.querySelector(".playedIndicator"),playedIndicator||(playedIndicator=document.createElement("div"),playedIndicator.classList.add("playedIndicator"),playedIndicator.classList.add("indicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(playedIndicator)),playedIndicator.innerHTML=''):(playedIndicator=card.querySelector(".playedIndicator"))&&playedIndicator.parentNode.removeChild(playedIndicator),userData.UnplayedItemCount?(countIndicator=card.querySelector(".countIndicator"),countIndicator||(countIndicator=document.createElement("div"),countIndicator.classList.add("countIndicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(countIndicator)),countIndicator.innerHTML=userData.UnplayedItemCount):enableCountIndicator&&(countIndicator=card.querySelector(".countIndicator"))&&countIndicator.parentNode.removeChild(countIndicator);var progressHtml=indicators.getProgressBarHtml({Type:type,UserData:userData,MediaType:"Video"});if(progressHtml){if(!(itemProgressBar=card.querySelector(".itemProgressBar"))){itemProgressBar=document.createElement("div"),itemProgressBar.classList.add("itemProgressBar");var innerCardFooter=card.querySelector(".innerCardFooter");if(!innerCardFooter){innerCardFooter=document.createElement("div"),innerCardFooter.classList.add("innerCardFooter");card.querySelector(".cardImageContainer").appendChild(innerCardFooter)}innerCardFooter.appendChild(itemProgressBar)}itemProgressBar.innerHTML=progressHtml}else(itemProgressBar=card.querySelector(".itemProgressBar"))&&itemProgressBar.parentNode.removeChild(itemProgressBar)}function onUserDataChanged(userData,scope){for(var cards=(scope||document.body).querySelectorAll('.card-withuserdata[data-id="'+userData.ItemId+'"]'),i=0,length=cards.length;i')}cell.setAttribute("data-timerid",newTimerId)}}function onTimerCancelled(id,itemsContainer){for(var cells=itemsContainer.querySelectorAll('.card[data-timerid="'+id+'"]'),i=0,length=cells.length;i=2200?10:screenWidth>=1920?9.000000000009:screenWidth>=1600?8:screenWidth>=1400?7.0000000000021:screenWidth>=1200?5.9999999988:screenWidth>=800?5:screenWidth>=700?4:3.0000000003;case"square":return layoutManager.tv?5.9999999988:screenWidth>=2200?10:screenWidth>=1920?9.000000000009:screenWidth>=1600?8:screenWidth>=1400?7.0000000000021:screenWidth>=1200?5.9999999988:screenWidth>=800?5:screenWidth>=700?4:screenWidth>=500?3.0000000003:2;case"banner":return screenWidth>=2200?4:screenWidth>=1200?3.0000000003:screenWidth>=800?2:1;case"backdrop":return layoutManager.tv?4:screenWidth>=2500?6:screenWidth>=1600?5:screenWidth>=1200?4:screenWidth>=770?3:screenWidth>=420?2:1;case"smallBackdrop":return screenWidth>=1600?8:screenWidth>=1400?7.000000000007001:screenWidth>=1200?6:screenWidth>=1e3?5:screenWidth>=800?4:screenWidth>=500?3.0000000003:2;case"overflowSmallBackdrop":return layoutManager.tv?100/18.9:isOrientationLandscape?screenWidth>=800?100/15.5:100/23.3:screenWidth>=540?100/30:100/72;case"overflowPortrait":return layoutManager.tv?100/15.5:isOrientationLandscape?screenWidth>=1700?100/11.6:100/15.5:screenWidth>=1400?100/15:screenWidth>=1200?100/18:screenWidth>=760?100/23:screenWidth>=400?100/31.5:100/42;case"overflowSquare":return layoutManager.tv?100/15.5:isOrientationLandscape?screenWidth>=1700?100/11.6:100/15.5:screenWidth>=1400?100/15:screenWidth>=1200?100/18:screenWidth>=760?100/23:screenWidth>=540?100/31.5:100/42;case"overflowBackdrop":return layoutManager.tv?100/23.3:isOrientationLandscape?screenWidth>=1700?100/18.5:100/23.3:screenWidth>=1800?100/23.5:screenWidth>=1400?100/30:screenWidth>=760?2.5:screenWidth>=640?100/56:100/72;default:return 4}}function isResizable(windowWidth){var screen=window.screen;if(screen){if(screen.availWidth-windowWidth>20)return!0}return!1}function getImageWidth(shape,screenWidth,isOrientationLandscape){var imagesPerRow=getPostersPerRow(shape,screenWidth,isOrientationLandscape),shapeWidth=screenWidth/imagesPerRow;return Math.round(shapeWidth)}function setCardData(items,options){options.shape=options.shape||"auto";var primaryImageAspectRatio=imageLoader.getPrimaryImageAspectRatio(items);if("auto"===options.shape||"autohome"===options.shape||"autooverflow"===options.shape||"autoVertical"===options.shape){var requestedShape=options.shape;options.shape=null,primaryImageAspectRatio&&(primaryImageAspectRatio>=3?(options.shape="banner",options.coverImage=!0):options.shape=primaryImageAspectRatio>=1.33?"autooverflow"===requestedShape?"overflowBackdrop":"backdrop":primaryImageAspectRatio>.71?"autooverflow"===requestedShape?"overflowSquare":"square":"autooverflow"===requestedShape?"overflowPortrait":"portrait"),options.shape||(options.shape=options.defaultShape||("autooverflow"===requestedShape?"overflowSquare":"square"))}if("auto"===options.preferThumb&&(options.preferThumb="backdrop"===options.shape||"overflowBackdrop"===options.shape),options.uiAspect=getDesiredAspect(options.shape),options.primaryImageAspectRatio=primaryImageAspectRatio,!options.width&&options.widths&&(options.width=options.widths[options.shape]),options.rows&&"number"!=typeof options.rows&&(options.rows=options.rows[options.shape]),!options.width){var screenWidth=dom.getWindowSize().innerWidth,screenHeight=dom.getWindowSize().innerHeight;if(isResizable(screenWidth)){screenWidth=100*Math.floor(screenWidth/100)}options.width=getImageWidth(options.shape,screenWidth,screenWidth>1.3*screenHeight)}}function buildCardsHtmlInternal(items,options){var isVertical;"autoVertical"===options.shape&&(isVertical=!0),setCardData(items,options);var currentIndexValue,hasOpenRow,hasOpenSection,apiClient,lastServerId,i,length,html="",itemsInRow=0,sectionTitleTagName=options.sectionTitleTagName||"div";for(i=0,length=items.length;i=.5?.5:0)+"+":null);newIndexValue!==currentIndexValue&&(hasOpenRow&&(html+="
",hasOpenRow=!1,itemsInRow=0),hasOpenSection&&(html+="",isVertical&&(html+=""),hasOpenSection=!1),html+=isVertical?'
':'
',html+="<"+sectionTitleTagName+' class="sectionTitle">'+newIndexValue+"",isVertical&&(html+='
'),currentIndexValue=newIndexValue,hasOpenSection=!0)}options.rows&&0===itemsInRow&&(hasOpenRow&&(html+="
",hasOpenRow=!1),html+='
',hasOpenRow=!0),html+=buildCard(i,item,apiClient,options),itemsInRow++,options.rows&&itemsInRow>=options.rows&&(html+="
",hasOpenRow=!1,itemsInRow=0)}hasOpenRow&&(html+="
"),hasOpenSection&&(html+="
",isVertical&&(html+=""));var cardFooterHtml="";for(i=0,length=options.lines||0;i ':'
 
';return html}function getDesiredAspect(shape){if(shape){if(shape=shape.toLowerCase(),-1!==shape.indexOf("portrait"))return 2/3;if(-1!==shape.indexOf("backdrop"))return 16/9;if(-1!==shape.indexOf("square"))return 1;if(-1!==shape.indexOf("banner"))return 1e3/185}return null}function getCardImageUrl(item,apiClient,options,shape){item=item.ProgramInfo||item;var width=options.width,height=null,primaryImageAspectRatio=item.PrimaryImageAspectRatio,forceName=!1,imgUrl=null,coverImage=!1,uiAspect=null;return options.preferThumb&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):(options.preferBanner||"banner"===shape)&&item.ImageTags&&item.ImageTags.Banner?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Banner",maxWidth:width,tag:item.ImageTags.Banner}):options.preferDisc&&item.ImageTags&&item.ImageTags.Disc?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Disc",maxWidth:width,tag:item.ImageTags.Disc}):options.preferLogo&&item.ImageTags&&item.ImageTags.Logo?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Logo",maxWidth:width,tag:item.ImageTags.Logo}):options.preferLogo&&item.ParentLogoImageTag&&item.ParentLogoItemId?imgUrl=apiClient.getScaledImageUrl(item.ParentLogoItemId,{type:"Logo",maxWidth:width,tag:item.ParentLogoImageTag}):options.preferThumb&&item.SeriesThumbImageTag&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):options.preferThumb&&item.ParentThumbItemId&&!1!==options.inheritThumb&&"Photo"!==item.MediaType?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):options.preferThumb&&item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}),forceName=!0):options.preferThumb&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&!1!==options.inheritThumb&&"Episode"===item.Type?imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Primary?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.ImageTags.Primary}),options.preferThumb&&!1!==options.showTitle&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):item.PrimaryImageTag?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.PrimaryImageItemId||item.Id||item.ItemId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.PrimaryImageTag}),options.preferThumb&&!1!==options.showTitle&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):item.ParentPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.ParentPrimaryImageItemId,{type:"Primary",maxWidth:width,tag:item.ParentPrimaryImageTag}):item.SeriesPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Primary",maxWidth:width,tag:item.SeriesPrimaryImageTag}):item.AlbumId&&item.AlbumPrimaryImageTag?(width=primaryImageAspectRatio?Math.round(height*primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.AlbumId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.AlbumPrimaryImageTag}),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape))&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2)):"Season"===item.Type&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.BackdropImageTags&&item.BackdropImageTags.length?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.SeriesThumbImageTag&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):item.ParentThumbItemId&&!1!==options.inheritThumb?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&!1!==options.inheritThumb&&(imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]})),{imgUrl:imgUrl,forceName:forceName,coverImage:coverImage}}function getRandomInt(min,max){return Math.floor(Math.random()*(max-min+1))+min}function getDefaultColorIndex(str){if(str){for(var charIndex=Math.floor(str.length/2),character=String(str.substr(charIndex,1).charCodeAt()),sum=0,i=0;i0&&isOuterFooter?currentCssClass+=" cardText-secondary":0===valid&&isOuterFooter&&(currentCssClass+=" cardText-first"),addRightMargin&&(currentCssClass+=" cardText-rightmargin"),text&&(html+="
",html+=text,html+="
",valid++,maxLines&&valid>=maxLines))break}if(forceLines)for(length=maxLines||Math.min(lines.length,maxLines||lines.length);valid ",valid++;return html}function isUsingLiveTvNaming(item){return"Program"===item.Type||"Timer"===item.Type||"Recording"===item.Type}function getAirTimeText(item,showAirDateTime,showAirEndTime){var airTimeText="";if(item.StartDate)try{var date=datetime.parseISO8601Date(item.StartDate);showAirDateTime&&(airTimeText+=datetime.toLocaleDateString(date,{weekday:"short",month:"short",day:"numeric"})+" "),airTimeText+=datetime.getDisplayTime(date),item.EndDate&&showAirEndTime&&(date=datetime.parseISO8601Date(item.EndDate),airTimeText+=" - "+datetime.getDisplayTime(date))}catch(e){console.log("Error parsing date: "+item.StartDate)}return airTimeText}function getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerClass,progressHtml,logoUrl,isOuterFooter){var html="";logoUrl&&(html+='');var showOtherText=isOuterFooter?!overlayText:overlayText;if(isOuterFooter&&options.cardLayout&&!layoutManager.tv&&"none"!==options.cardFooterAside){html+=''}var titleAdded,cssClass=options.centerText?"cardText cardTextCentered":"cardText",lines=[],parentTitleUnderneath="MusicAlbum"===item.Type||"Audio"===item.Type||"MusicVideo"===item.Type;if(showOtherText&&(options.showParentTitle||options.showParentTitleOrTitle)&&!parentTitleUnderneath)if(isOuterFooter&&"Episode"===item.Type&&item.SeriesName)item.SeriesId?lines.push(getTextActionButton({Id:item.SeriesId,ServerId:item.ServerId,Name:item.SeriesName,Type:"Series",IsFolder:!0})):lines.push(item.SeriesName);else if(isUsingLiveTvNaming(item))lines.push(item.Name),item.EpisodeTitle||(titleAdded=!0);else{var parentTitle=item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"";(parentTitle||showTitle)&&lines.push(parentTitle)}var showMediaTitle=showTitle&&!titleAdded||options.showParentTitleOrTitle&&!lines.length;if(showMediaTitle||titleAdded||!showTitle&&!forceName||(showMediaTitle=!0),showMediaTitle){var name="auto"!==options.showTitle||item.IsFolder||"Photo"!==item.MediaType?itemHelper.getDisplayName(item,{includeParentInfo:options.includeParentInfoInTitle}):"";lines.push(name)}if(showOtherText){if(options.showParentTitle&&parentTitleUnderneath&&(isOuterFooter&&item.AlbumArtists&&item.AlbumArtists.length?(item.AlbumArtists[0].Type="MusicArtist",item.AlbumArtists[0].IsFolder=!0,lines.push(getTextActionButton(item.AlbumArtists[0],null,item.ServerId))):lines.push(isUsingLiveTvNaming(item)?item.Name:item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"")),options.showItemCounts){var itemCountHtml=getItemCountsHtml(options,item);lines.push(itemCountHtml)}if(options.textLines)for(var additionalLines=options.textLines(item),i=0,length=additionalLines.length;i'+html,html+=""),html}function getTextActionButton(item,text,serverId){if(text||(text=itemHelper.getDisplayName(item)),layoutManager.tv)return text;var html=""}function getItemCountsHtml(options,item){var childText,counts=[];if("Playlist"===item.Type){if(childText="",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;minutes=minutes||1,childText+=globalize.translate("sharedcomponents#ValueMinutes",Math.round(minutes))}else childText+=globalize.translate("sharedcomponents#ValueMinutes",0);counts.push(childText)}else"Genre"===item.Type||"Studio"===item.Type?(item.MovieCount&&(childText=1===item.MovieCount?globalize.translate("sharedcomponents#ValueOneMovie"):globalize.translate("sharedcomponents#ValueMovieCount",item.MovieCount),counts.push(childText)),item.SeriesCount&&(childText=1===item.SeriesCount?globalize.translate("sharedcomponents#ValueOneSeries"):globalize.translate("sharedcomponents#ValueSeriesCount",item.SeriesCount),counts.push(childText)),item.EpisodeCount&&(childText=1===item.EpisodeCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.EpisodeCount),counts.push(childText)),item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText))):"GameGenre"===item.Type?item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText)):"MusicGenre"===item.Type||"MusicArtist"===options.context?(item.AlbumCount&&(childText=1===item.AlbumCount?globalize.translate("sharedcomponents#ValueOneAlbum"):globalize.translate("sharedcomponents#ValueAlbumCount",item.AlbumCount),counts.push(childText)),item.SongCount&&(childText=1===item.SongCount?globalize.translate("sharedcomponents#ValueOneSong"):globalize.translate("sharedcomponents#ValueSongCount",item.SongCount),counts.push(childText)),item.MusicVideoCount&&(childText=1===item.MusicVideoCount?globalize.translate("sharedcomponents#ValueOneMusicVideo"):globalize.translate("sharedcomponents#ValueMusicVideoCount",item.MusicVideoCount),counts.push(childText))):"Series"===item.Type&&(childText=1===item.RecursiveItemCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.RecursiveItemCount),counts.push(childText));return counts.join(", ")}function requireRefreshIndicator(){refreshIndicatorLoaded||(refreshIndicatorLoaded=!0,require(["emby-itemrefreshindicator"]))}function getDefaultBackgroundClass(str){return"defaultCardBackground defaultCardBackground"+getDefaultColorIndex(str)}function buildCard(index,item,apiClient,options){var action=options.action||"link";"play"===action&&item.IsFolder?action="link":"Photo"===item.MediaType&&(action="play");var shape=options.shape;if("mixed"===shape){shape=null;var primaryImageAspectRatio=item.PrimaryImageAspectRatio;primaryImageAspectRatio&&(shape=primaryImageAspectRatio>=1.33?"mixedBackdrop":primaryImageAspectRatio>.71?"mixedSquare":"mixedPortrait"),shape=shape||"mixedSquare"}var className="card";shape&&(className+=" "+shape+"Card"),options.cardCssClass&&(className+=" "+options.cardCssClass),options.cardClass&&(className+=" "+options.cardClass),layoutManager.desktop&&(className+=" card-hoverable"),enableFocusTransfrom&&layoutManager.tv||(className+=" card-nofocustransform");var imgInfo=getCardImageUrl(item,apiClient,options,shape),imgUrl=imgInfo.imgUrl,forceName=imgInfo.forceName,showTitle="auto"===options.showTitle||(options.showTitle||"PhotoAlbum"===item.Type||"Folder"===item.Type),overlayText=options.overlayText;forceName&&!options.cardLayout&&null==overlayText&&(overlayText=!0);var cardImageContainerClass="cardImageContainer";(options.coverImage||imgInfo.coverImage)&&(cardImageContainerClass+=" coveredImage",("Photo"===item.MediaType||"PhotoAlbum"===item.Type||"Folder"===item.Type||item.ProgramInfo||"Program"===item.Type||"Recording"===item.Type)&&(cardImageContainerClass+=" coveredImage-noScale")),imgUrl||(cardImageContainerClass+=" "+getDefaultBackgroundClass(item.Name));var cardBoxClass=options.cardLayout?"cardBox visualCardBox":"cardBox";layoutManager.tv&&(cardBoxClass+=enableFocusTransfrom?" cardBox-focustransform cardBox-withfocuscontent":" cardBox-withfocuscontent-large",options.cardLayout&&(cardBoxClass+=" card-focuscontent",enableFocusTransfrom||(cardBoxClass+=" card-focuscontent-large")));var footerCssClass,logoUrl,progressHtml=indicators.getProgressBarHtml(item),innerCardFooter="",footerOverlayed=!1;options.showChannelLogo&&item.ChannelPrimaryImageTag?logoUrl=apiClient.getScaledImageUrl(item.ChannelId,{type:"Primary",height:40,tag:item.ChannelPrimaryImageTag}):options.showLogo&&item.ParentLogoImageTag&&(logoUrl=apiClient.getScaledImageUrl(item.ParentLogoItemId,{type:"Logo",height:40,tag:item.ParentLogoImageTag})),overlayText?(logoUrl=null,footerCssClass=progressHtml?"innerCardFooter fullInnerCardFooter":"innerCardFooter",innerCardFooter+=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,logoUrl,!1),footerOverlayed=!0):progressHtml&&(innerCardFooter+='
',innerCardFooter+=progressHtml,innerCardFooter+="
",progressHtml="");var mediaSourceCount=item.MediaSourceCount||1;mediaSourceCount>1&&(innerCardFooter+='
'+mediaSourceCount+"
");var outerCardFooter="";overlayText||footerOverlayed||(footerCssClass=options.cardLayout?"cardFooter":"cardFooter cardFooter-transparent",logoUrl&&(footerCssClass+=" cardFooter-withlogo"),options.cardLayout||(logoUrl=null),outerCardFooter=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,logoUrl,!0)),outerCardFooter&&!options.cardLayout&&(cardBoxClass+=" cardBox-bottompadded");var overlayButtons="";if(layoutManager.mobile){var overlayPlayButton=options.overlayPlayButton;null!=overlayPlayButton||options.overlayMoreButton||options.overlayInfoButton||options.cardLayout||(overlayPlayButton="Video"===item.MediaType);var btnCssClass="cardOverlayButton cardOverlayButton-br itemAction";if(options.centerPlayButton&&(overlayButtons+=''),!overlayPlayButton||item.IsPlaceHolder||"Virtual"===item.LocationType&&item.MediaType&&"Program"!==item.Type||"Person"===item.Type||(overlayButtons+=''),options.overlayMoreButton){overlayButtons+=''}}options.showChildCountIndicator&&item.ChildCount&&(className+=" groupedCard");var cardImageContainerOpen,cardImageContainerClose="",cardBoxClose="",cardScalableClose="",cardContentClass="cardContent";options.cardLayout||(cardContentClass+=" cardContent-shadow"),layoutManager.tv?(cardImageContainerOpen=imgUrl?'
':'
',cardImageContainerClose="
"):(cardImageContainerOpen=imgUrl?'");var cardScalableClass="cardScalable";layoutManager.tv&&!options.cardLayout&&(cardScalableClass+=" card-focuscontent",enableFocusTransfrom||(cardScalableClass+=" card-focuscontent-large")),cardImageContainerOpen='
'+cardImageContainerOpen,cardBoxClose="
",cardScalableClose="
";var indicatorsHtml="";if(!1!==options.missingIndicator&&(indicatorsHtml+=indicators.getMissingIndicator(item)),indicatorsHtml+=indicators.getSyncIndicator(item),indicatorsHtml+=indicators.getTimerIndicator(item),indicatorsHtml+=indicators.getTypeIndicator(item),options.showGroupCount?indicatorsHtml+=indicators.getChildCountIndicatorHtml(item,{minCount:1}):indicatorsHtml+=indicators.getPlayedIndicatorHtml(item),"CollectionFolder"===item.Type||item.CollectionType){indicatorsHtml+='
',requireRefreshIndicator()}indicatorsHtml&&(cardImageContainerOpen+='
'+indicatorsHtml+"
"),imgUrl||(cardImageContainerOpen+=getCardDefaultText(item,options));var tagName=layoutManager.tv&&!overlayButtons?"button":"div",nameWithPrefix=item.SortName||item.Name||"",prefix=nameWithPrefix.substring(0,Math.min(3,nameWithPrefix.length));prefix&&(prefix=prefix.toUpperCase());var timerAttributes="";item.TimerId&&(timerAttributes+=' data-timerid="'+item.TimerId+'"'),item.SeriesTimerId&&(timerAttributes+=' data-seriestimerid="'+item.SeriesTimerId+'"');var actionAttribute;"button"===tagName?(className+=" itemAction",actionAttribute=' data-action="'+action+'"'):actionAttribute="","MusicAlbum"!==item.Type&&"MusicArtist"!==item.Type&&"Audio"!==item.Type&&(className+=" card-withuserdata");var positionTicksData=item.UserData&&item.UserData.PlaybackPositionTicks?' data-positionticks="'+item.UserData.PlaybackPositionTicks+'"':"",collectionIdData=options.collectionId?' data-collectionid="'+options.collectionId+'"':"",playlistIdData=options.playlistId?' data-playlistid="'+options.playlistId+'"':"",mediaTypeData=item.MediaType?' data-mediatype="'+item.MediaType+'"':"",collectionTypeData=item.CollectionType?' data-collectiontype="'+item.CollectionType+'"':"",channelIdData=item.ChannelId?' data-channelid="'+item.ChannelId+'"':"",contextData=options.context?' data-context="'+options.context+'"':"",parentIdData=options.parentId?' data-parentid="'+options.parentId+'"':"",additionalCardContent="";return layoutManager.desktop&&(additionalCardContent+=getHoverMenuHtml(item,action)),"<"+tagName+' data-index="'+index+'"'+timerAttributes+actionAttribute+' data-isfolder="'+(item.IsFolder||!1)+'" data-serverid="'+(item.ServerId||options.serverId)+'" data-id="'+(item.Id||item.ItemId)+'" data-type="'+item.Type+'"'+mediaTypeData+collectionTypeData+channelIdData+positionTicksData+collectionIdData+playlistIdData+contextData+parentIdData+' data-prefix="'+prefix+'" class="'+className+'">'+cardImageContainerOpen+innerCardFooter+cardImageContainerClose+overlayButtons+additionalCardContent+cardScalableClose+outerCardFooter+cardBoxClose+""}function getHoverMenuHtml(item,action){var html="";html+='
';var btnCssClass="cardOverlayButton cardOverlayButton-hover itemAction";playbackManager.canPlay(item)&&(html+=''),html+='
';var userData=item.UserData||{};if(itemHelper.canMarkPlayed(item)&&(require(["emby-playstatebutton"]),html+=''),itemHelper.canRate(item)){var likes=null==userData.Likes?"":userData.Likes;require(["emby-ratingbutton"]),html+=''}return html+='',html+="
",html+="
"}function getCardDefaultText(item,options){var collectionType=item.CollectionType;return"livetv"===collectionType?'':"homevideos"===collectionType||"photos"===collectionType?'':"music"===collectionType?'':"MusicAlbum"===item.Type?'':"MusicArtist"===item.Type||"Person"===item.Type?'':options.defaultCardImageIcon?''+options.defaultCardImageIcon+"":'
'+(isUsingLiveTvNaming(item)?item.Name:itemHelper.getDisplayName(item))+"
"}function buildCards(items,options){if(document.body.contains(options.itemsContainer)){if(options.parentContainer){if(!items.length)return void options.parentContainer.classList.add("hide");options.parentContainer.classList.remove("hide")}var html=buildCardsHtmlInternal(items,options);html?(options.itemsContainer.cardBuilderHtml!==html&&(options.itemsContainer.innerHTML=html,items.length<50?options.itemsContainer.cardBuilderHtml=html:options.itemsContainer.cardBuilderHtml=null),imageLoader.lazyChildren(options.itemsContainer)):(options.itemsContainer.innerHTML=html,options.itemsContainer.cardBuilderHtml=null),options.autoFocus&&focusManager.autoFocus(options.itemsContainer,!0)}}function ensureIndicators(card,indicatorsElem){if(indicatorsElem)return indicatorsElem;if(!(indicatorsElem=card.querySelector(".cardIndicators"))){ +var cardImageContainer=card.querySelector(".cardImageContainer");indicatorsElem=document.createElement("div"),indicatorsElem.classList.add("cardIndicators"),cardImageContainer.appendChild(indicatorsElem)}return indicatorsElem}function updateUserData(card,userData){var type=card.getAttribute("data-type"),enableCountIndicator="Series"===type||"BoxSet"===type||"Season"===type,indicatorsElem=null,playedIndicator=null,countIndicator=null,itemProgressBar=null;userData.Played?(playedIndicator=card.querySelector(".playedIndicator"),playedIndicator||(playedIndicator=document.createElement("div"),playedIndicator.classList.add("playedIndicator"),playedIndicator.classList.add("indicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(playedIndicator)),playedIndicator.innerHTML=''):(playedIndicator=card.querySelector(".playedIndicator"))&&playedIndicator.parentNode.removeChild(playedIndicator),userData.UnplayedItemCount?(countIndicator=card.querySelector(".countIndicator"),countIndicator||(countIndicator=document.createElement("div"),countIndicator.classList.add("countIndicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(countIndicator)),countIndicator.innerHTML=userData.UnplayedItemCount):enableCountIndicator&&(countIndicator=card.querySelector(".countIndicator"))&&countIndicator.parentNode.removeChild(countIndicator);var progressHtml=indicators.getProgressBarHtml({Type:type,UserData:userData,MediaType:"Video"});if(progressHtml){if(!(itemProgressBar=card.querySelector(".itemProgressBar"))){itemProgressBar=document.createElement("div"),itemProgressBar.classList.add("itemProgressBar");var innerCardFooter=card.querySelector(".innerCardFooter");if(!innerCardFooter){innerCardFooter=document.createElement("div"),innerCardFooter.classList.add("innerCardFooter");card.querySelector(".cardImageContainer").appendChild(innerCardFooter)}innerCardFooter.appendChild(itemProgressBar)}itemProgressBar.innerHTML=progressHtml}else(itemProgressBar=card.querySelector(".itemProgressBar"))&&itemProgressBar.parentNode.removeChild(itemProgressBar)}function onUserDataChanged(userData,scope){for(var cards=(scope||document.body).querySelectorAll('.card-withuserdata[data-id="'+userData.ItemId+'"]'),i=0,length=cards.length;i')}cell.setAttribute("data-timerid",newTimerId)}}function onTimerCancelled(id,itemsContainer){for(var cells=itemsContainer.querySelectorAll('.card[data-timerid="'+id+'"]'),i=0,length=cells.length;i.emby-select{padding:.3em 1.9em .3em .5em;font-size:inherit}.selectContainer-inline>.emby-select[disabled]{padding:.4em 0}.emby-select::-moz-focus-inner{border:0}.emby-select-focusscale{-webkit-transition:-webkit-transform 180ms ease-out!important;-o-transition:transform 180ms ease-out!important;transition:transform 180ms ease-out!important;-webkit-transform-origin:center center;transform-origin:center center}.emby-select-focusscale:focus{-webkit-transform:scale(1.04);transform:scale(1.04);z-index:1}.emby-select+.fieldDescription{margin-top:.25em}.selectContainer{margin-bottom:1.8em;position:relative}.selectContainer-inline{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;margin-bottom:0;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.selectLabel{display:block;margin-bottom:.25em}.selectContainer-inline>.selectLabel{margin-bottom:0;margin-right:.5em;-webkit-flex-shrink:0;flex-shrink:0}.emby-select-withcolor{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:.2em;border-radius:.2em}.selectArrowContainer{position:absolute;right:.3em;top:.2em;color:inherit;pointer-events:none}.selectContainer-inline>.selectArrowContainer{top:initial;bottom:.24em;font-size:90%}.emby-select[disabled]+.selectArrowContainer{display:none}.selectArrow{margin-top:.35em;font-size:1.7em}.emby-select-iconbutton{-webkit-align-self:flex-end;align-self:flex-end} \ No newline at end of file +.emby-select{display:block;margin:0;margin-bottom:0!important;font-size:110%;font-family:inherit;font-weight:inherit;padding:.5em 1.9em .5em .5em;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0!important;-webkit-tap-highlight-color:transparent;width:100%}.emby-select[disabled]{background:0 0!important;border-color:transparent!important;color:inherit!important;-webkit-appearance:none;-moz-appearance:none;appearance:none}.selectContainer-inline>.emby-select{padding:.3em 1.9em .3em .5em;font-size:inherit}.selectContainer-inline>.emby-select[disabled]{padding-left:0;padding-right:0}.emby-select::-moz-focus-inner{border:0}.emby-select-focusscale{-webkit-transition:-webkit-transform 180ms ease-out!important;-o-transition:transform 180ms ease-out!important;transition:transform 180ms ease-out!important;-webkit-transform-origin:center center;transform-origin:center center}.emby-select-focusscale:focus{-webkit-transform:scale(1.04);transform:scale(1.04);z-index:1}.emby-select+.fieldDescription{margin-top:.25em}.selectContainer{margin-bottom:1.8em;position:relative}.selectContainer-inline{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;margin-bottom:0;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.selectLabel{display:block;margin-bottom:.25em}.selectContainer-inline>.selectLabel{margin-bottom:0;margin-right:.5em;-webkit-flex-shrink:0;flex-shrink:0}.emby-select-withcolor{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:.2em;border-radius:.2em}.selectArrowContainer{position:absolute;right:.3em;top:.2em;color:inherit;pointer-events:none}.selectContainer-inline>.selectArrowContainer{top:initial;bottom:.24em;font-size:90%}.emby-select[disabled]+.selectArrowContainer{display:none}.selectArrow{margin-top:.35em;font-size:1.7em}.emby-select-iconbutton{-webkit-align-self:flex-end;align-self:flex-end} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/2fcryfnatjcs6g4u3t-y5ewrjpiaoeww8aihgqwrjao.woff b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/2fcryfnatjcs6g4u3t-y5ewrjpiaoeww8aihgqwrjao.woff deleted file mode 100644 index 0d59b5c94b..0000000000 Binary files a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/2fcryfnatjcs6g4u3t-y5ewrjpiaoeww8aihgqwrjao.woff and /dev/null differ diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/2fcryfnatjcs6g4u3t-y5zjzjt5fdej140u2djyc3my.woff2 b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/2fcryfnatjcs6g4u3t-y5zjzjt5fdej140u2djyc3my.woff2 deleted file mode 100644 index e7cbf7ac64..0000000000 Binary files a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/2fcryfnatjcs6g4u3t-y5zjzjt5fdej140u2djyc3my.woff2 and /dev/null differ diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff new file mode 100644 index 0000000000..9357bfc6ff Binary files /dev/null and b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff differ diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 new file mode 100644 index 0000000000..db867bc362 Binary files /dev/null and b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 differ diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/style.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/style.css index ec2df19a29..fb66dfd107 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/style.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/fonts/material-icons/style.css @@ -1 +1 @@ -@font-face{font-family:'Material Icons';font-style:normal;font-weight:400;src:local('Material Icons'),local('MaterialIcons-Regular'),url(2fcryfnatjcs6g4u3t-y5zjzjt5fdej140u2djyc3my.woff2) format('woff2'),url(2fcryfnatjcs6g4u3t-y5ewrjpiaoeww8aihgqwrjao.woff) format('woff')}.md-icon{font-family:'Material Icons';font-weight:400;font-style:normal;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-webkit-font-feature-settings:"liga" 1;-moz-font-feature-settings:"liga" 1;font-feature-settings:"liga" 1;line-height:1;overflow:hidden;vertical-align:middle} \ No newline at end of file +@font-face{font-family:'Material Icons';font-style:normal;font-weight:400;src:local('Material Icons'),local('MaterialIcons-Regular'),url(flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2'),url(flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff) format('woff')}.md-icon{font-family:'Material Icons';font-weight:400;font-style:normal;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-webkit-font-feature-settings:"liga" 1;-moz-font-feature-settings:"liga" 1;font-feature-settings:"liga" 1;line-height:1;overflow:hidden;vertical-align:middle} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js index 708c7273e7..7c66d74943 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js @@ -1 +1 @@ -define(["require","inputManager","browser","globalize","connectionManager","scrollHelper","serverNotifications","loading","datetime","focusManager","playbackManager","userSettings","imageLoader","events","layoutManager","itemShortcuts","dom","css!./guide.css","programStyles","material-icons","scrollStyles","emby-button","paper-icon-button-light","emby-tabs","emby-scroller","flexStyles","registerElement"],function(require,inputManager,browser,globalize,connectionManager,scrollHelper,serverNotifications,loading,datetime,focusManager,playbackManager,userSettings,imageLoader,events,layoutManager,itemShortcuts,dom){"use strict";function showViewSettings(instance){require(["guide-settings-dialog"],function(guideSettingsDialog){guideSettingsDialog.show(instance.categoryOptions).then(function(){instance.refresh()})})}function updateProgramCellOnScroll(cell,scrollPct){var left=cell.posLeft;left||(left=parseFloat(cell.style.left.replace("%","")),cell.posLeft=left);var width=cell.posWidth;width||(width=parseFloat(cell.style.width.replace("%","")),cell.posWidth=width);var right=left+width,newPct=Math.max(Math.min(scrollPct,right),left),offset=newPct-left,pctOfWidth=offset/width*100,guideProgramName=cell.guideProgramName;guideProgramName||(guideProgramName=cell.querySelector(".guideProgramName"),cell.guideProgramName=guideProgramName);var caret=cell.caret;caret||(caret=cell.querySelector(".guide-programNameCaret"),cell.caret=caret),guideProgramName&&(pctOfWidth>0&&pctOfWidth<=100?(guideProgramName.style.transform="translateX("+pctOfWidth+"%)",caret.classList.remove("hide")):(guideProgramName.style.transform="none",caret.classList.add("hide")))}function updateProgramCellsOnScroll(programGrid,programCells){isUpdatingProgramCellScroll||(isUpdatingProgramCellScroll=!0,requestAnimationFrame(function(){for(var scrollLeft=programGrid.scrollLeft,scrollPct=scrollLeft?scrollLeft/programGrid.scrollWidth*100:0,i=0,length=programCells.length;i=startDate&&now=0?date.setHours(date.getHours(),cellCurationMinutes,0,0):date.setHours(date.getHours(),0,0,0),date}function showLoading(){loading.show()}function hideLoading(){loading.hide()}function reloadGuide(context,newStartDate,scrollToTimeMs,focusToTimeMs,startTimeOfDayMs,focusProgramOnRender){var apiClient=connectionManager.getApiClient(options.serverId),channelQuery={StartIndex:0,EnableFavoriteSorting:"false"!==userSettings.get("livetv-favoritechannelsattop")};channelQuery.UserId=apiClient.getCurrentUserId();currentChannelLimit=500,showLoading(),channelQuery.StartIndex=currentStartIndex,channelQuery.Limit=500,channelQuery.AddCurrentProgram=!1,channelQuery.EnableUserData=!1,channelQuery.EnableImageTypes="Primary";var categories=self.categoryOptions.categories||[],displayMovieContent=!categories.length||-1!==categories.indexOf("movies"),displaySportsContent=!categories.length||-1!==categories.indexOf("sports"),displayNewsContent=!categories.length||-1!==categories.indexOf("news"),displayKidsContent=!categories.length||-1!==categories.indexOf("kids"),displaySeriesContent=!categories.length||-1!==categories.indexOf("series");displayMovieContent&&displaySportsContent&&displayNewsContent&&displayKidsContent?(channelQuery.IsMovie=null,channelQuery.IsSports=null,channelQuery.IsKids=null,channelQuery.IsNews=null,channelQuery.IsSeries=null):(displayNewsContent&&(channelQuery.IsNews=!0),displaySportsContent&&(channelQuery.IsSports=!0),displayKidsContent&&(channelQuery.IsKids=!0),displayMovieContent&&(channelQuery.IsMovie=!0),displaySeriesContent&&(channelQuery.IsSeries=!0)),"DatePlayed"===userSettings.get("livetv-channelorder")?(channelQuery.SortBy="DatePlayed",channelQuery.SortOrder="Descending"):(channelQuery.SortBy=null,channelQuery.SortOrder=null);var date=newStartDate;date=new Date(date.getTime()+1e3);var nextDay=new Date(date.getTime()+msPerDay-2e3),allowIndicators=dom.getWindowSize().innerWidth>=600,renderOptions={showHdIcon:allowIndicators&&"true"===userSettings.get("guide-indicator-hd"),showLiveIndicator:allowIndicators&&"false"!==userSettings.get("guide-indicator-live"),showPremiereIndicator:allowIndicators&&"false"!==userSettings.get("guide-indicator-premiere"),showNewIndicator:allowIndicators&&"true"===userSettings.get("guide-indicator-new"),showRepeatIndicator:allowIndicators&&"true"===userSettings.get("guide-indicator-repeat"),showEpisodeTitle:!layoutManager.tv};apiClient.getLiveTvChannels(channelQuery).then(function(channelsResult){var btnPreviousPage=context.querySelector(".btnPreviousPage"),btnNextPage=context.querySelector(".btnNextPage");channelsResult.TotalRecordCount>500?(context.querySelector(".guideOptions").classList.remove("hide"),btnPreviousPage.classList.remove("hide"),btnNextPage.classList.remove("hide"),channelQuery.StartIndex?context.querySelector(".btnPreviousPage").disabled=!1:context.querySelector(".btnPreviousPage").disabled=!0,channelQuery.StartIndex+500",startDate.setTime(startDate.getTime()+cellDurationMs);return html}function parseDates(program){if(!program.StartDateLocal)try{program.StartDateLocal=datetime.parseISO8601Date(program.StartDate,{toLocal:!0})}catch(err){}if(!program.EndDateLocal)try{program.EndDateLocal=datetime.parseISO8601Date(program.EndDate,{toLocal:!0})}catch(err){}return null}function getTimerIndicator(item){var status;if("SeriesTimer"===item.Type)return'';if(item.TimerId||item.SeriesTimerId)status=item.Status||"Cancelled";else{if("Timer"!==item.Type)return"";status=item.Status}return item.SeriesTimerId?"Cancelled"!==status?'':'':''}function getChannelProgramsHtml(context,date,channel,programs,options,listInfo){var html="",startMs=date.getTime(),endMs=startMs+msPerDay-1;html+='
';for(var programsFound,clickAction=layoutManager.tv?"link":"programdialog",categories=self.categoryOptions.categories||[],displayMovieContent=!categories.length||-1!==categories.indexOf("movies"),displaySportsContent=!categories.length||-1!==categories.indexOf("sports"),displayNewsContent=!categories.length||-1!==categories.indexOf("news"),displayKidsContent=!categories.length||-1!==categories.indexOf("kids"),displaySeriesContent=!categories.length||-1!==categories.indexOf("series"),enableColorCodedBackgrounds="true"===userSettings.get("guide-colorcodedbackgrounds"),now=(new Date).getTime(),i=listInfo.startIndex,length=programs.length;iendMs)break;items[program.Id]=program;var renderStartMs=Math.max(startDateLocalMs,startMs),startPercent=(startDateLocalMs-startMs)/msPerDay;startPercent*=100,startPercent=Math.max(startPercent,0);var renderEndMs=Math.min(endDateLocalMs,endMs),endPercent=(renderEndMs-renderStartMs)/msPerDay;endPercent*=100;var cssClass="programCell itemAction",accentCssClass=null,displayInnerContent=!0;program.IsKids?(displayInnerContent=displayKidsContent,accentCssClass="kids"):program.IsSports?(displayInnerContent=displaySportsContent,accentCssClass="sports"):program.IsNews?(displayInnerContent=displayNewsContent,accentCssClass="news"):program.IsMovie?(displayInnerContent=displayMovieContent,accentCssClass="movie"):displayInnerContent=program.IsSeries?displaySeriesContent:displayMovieContent&&displayNewsContent&&displaySportsContent&&displayKidsContent&&displaySeriesContent,displayInnerContent&&enableColorCodedBackgrounds&&accentCssClass&&(cssClass+=" programCell-"+accentCssClass),now>=startDateLocalMs&&now=2?' is="emby-programcell"':"")+' data-action="'+clickAction+'"'+timerAttributes+' data-channelid="'+program.ChannelId+'" data-id="'+program.Id+'" data-serverid="'+program.ServerId+'" data-startdate="'+program.StartDate+'" data-enddate="'+program.EndDate+'" data-type="'+program.Type+'" class="'+cssClass+'" style="left:'+startPercent+"%;width:"+endPercent+'%;">',displayInnerContent){html+='
',html+='
',html+='
'+program.Name;var indicatorHtml=null;program.IsLive&&options.showLiveIndicator?indicatorHtml=''+globalize.translate("sharedcomponents#Live")+"":program.IsPremiere&&options.showPremiereIndicator?indicatorHtml=''+globalize.translate("sharedcomponents#Premiere")+"":program.IsSeries&&!program.IsRepeat&&options.showNewIndicator?indicatorHtml=''+globalize.translate("sharedcomponents#AttributeNew")+"":program.IsSeries&&program.IsRepeat&&options.showRepeatIndicator&&(indicatorHtml=''+globalize.translate("sharedcomponents#Repeat")+""),html+=indicatorHtml||"",program.EpisodeTitle&&options.showEpisodeTitle&&(html+='
',program.EpisodeTitle&&options.showEpisodeTitle&&(html+=''+program.EpisodeTitle+""),html+="
"),html+="
",program.IsHD&&options.showHdIcon&&(layoutManager.tv?html+='
HD
':html+='
HD
'),html+=getTimerIndicator(program),html+="
"}html+=""}}else if(programsFound)break}return html+="
"}function renderChannelHeaders(context,channels,apiClient){for(var html="",i=0,length=channels.length;i',hasChannelImage){html+='
'}channel.ChannelNumber&&(html+='

'+channel.ChannelNumber+"

"),!hasChannelImage&&channel.Name&&(html+='
'+channel.Name+"
"),html+=""}var channelList=context.querySelector(".channelsContainer");channelList.innerHTML=html,imageLoader.lazyChildren(channelList)}function renderPrograms(context,date,channels,programs,options){for(var listInfo={startIndex:0},html=[],i=0,length=channels.length;i=pct||left+width>=pct)break;programCell=programCell.nextSibling}programCell?focusManager.focus(programCell):focusManager.autoFocus(autoFocusParent,!0)}}function nativeScrollTo(container,pos,horizontal){container.scrollTo?horizontal?container.scrollTo(pos,0):container.scrollTo(0,pos):horizontal?container.scrollLeft=Math.round(pos):container.scrollTop=Math.round(pos)}function onProgramGridScroll(context,elem,timeslotHeaders){if((new Date).getTime()-lastHeaderScroll>=1e3){lastGridScroll=(new Date).getTime();var scrollLeft=elem.scrollLeft;scrollXPct=100*scrollLeft/elem.scrollWidth,nativeScrollTo(timeslotHeaders,scrollLeft,!0)}updateProgramCellsOnScroll(elem,programCells)}function onTimeslotHeadersScroll(context,elem){(new Date).getTime()-lastGridScroll>=1e3&&(lastHeaderScroll=(new Date).getTime(),nativeScrollTo(programGrid,elem.scrollLeft,!0))}function changeDate(page,date,scrollToTimeMs,focusToTimeMs,startTimeOfDayMs,focusProgramOnRender){var newStartDate=normalizeDateToTimeslot(date);currentDate=newStartDate,reloadGuide(page,newStartDate,scrollToTimeMs,focusToTimeMs,startTimeOfDayMs,focusProgramOnRender)}function getDateTabText(date,isActive,tabIndex){var cssClass=isActive?"emby-tab-button guide-date-tab-button emby-tab-button-active":"emby-tab-button guide-date-tab-button",html='"}function setDateRange(page,guideInfo){var today=new Date,nowHours=today.getHours();today.setHours(nowHours,0,0,0);var start=datetime.parseISO8601Date(guideInfo.StartDate,{toLocal:!0}),end=datetime.parseISO8601Date(guideInfo.EndDate,{toLocal:!0});start.setHours(nowHours,0,0,0),end.setHours(0,0,0,0),start.getTime()>=end.getTime()&&end.setDate(start.getDate()+1),start=new Date(Math.max(today,start));var dateTabsHtml="",tabIndex=0,date=new Date;currentDate&&date.setTime(currentDate.getTime()),date.setHours(nowHours,0,0,0);var startTimeOfDayMs=60*start.getHours()*60*1e3;for(startTimeOfDayMs+=60*start.getMinutes()*1e3;start<=end;){dateTabsHtml+=getDateTabText(start,date.getDate()===start.getDate()&&date.getMonth()===start.getMonth()&&date.getFullYear()===start.getFullYear(),tabIndex),start.setDate(start.getDate()+1),start.setHours(0,0,0,0),tabIndex++}page.querySelector(".emby-tabs-slider").innerHTML=dateTabsHtml,page.querySelector(".guideDateTabs").refresh();var newDate=new Date,newDateHours=newDate.getHours(),scrollToTimeMs=60*newDateHours*60*1e3,minutes=newDate.getMinutes();minutes>=30&&(scrollToTimeMs+=18e5),changeDate(page,date,scrollToTimeMs,60*(60*newDateHours+minutes)*1e3,startTimeOfDayMs,layoutManager.tv)}function reloadPage(page){showLoading(),connectionManager.getApiClient(options.serverId).getLiveTvGuideInfo().then(function(guideInfo){setDateRange(page,guideInfo)})}function getChannelProgramsFocusableElements(container){for(var elements=container.querySelectorAll(".programCell"),list=[],currentScrollXPct=scrollXPct+1,i=0,length=elements.length;i=currentScrollXPct&&list.push(elem)}return list}function onInputCommand(e){var container,channelPrograms,focusableElements,newRow,target=e.target,programCell=dom.parentWithClass(target,"programCell");switch(e.detail.command){case"up":programCell?(container=programGrid,channelPrograms=dom.parentWithClass(programCell,"channelPrograms"),newRow=channelPrograms.previousSibling,newRow?(focusableElements=getChannelProgramsFocusableElements(newRow),focusableElements.length?container=newRow:focusableElements=null):container=null):container=null,lastFocusDirection=e.detail.command,focusManager.moveUp(target,{container:container,focusableElements:focusableElements});break;case"down":programCell?(container=programGrid,channelPrograms=dom.parentWithClass(programCell,"channelPrograms"),newRow=channelPrograms.nextSibling,newRow?(focusableElements=getChannelProgramsFocusableElements(newRow),focusableElements.length?container=newRow:focusableElements=null):container=null):container=null,lastFocusDirection=e.detail.command,focusManager.moveDown(target,{container:container,focusableElements:focusableElements});break;case"left":container=programCell?dom.parentWithClass(programCell,"channelPrograms"):null,container&&!programCell.previousSibling&&(container=null),lastFocusDirection=e.detail.command,focusManager.moveLeft(target,{container:container}),!0;break;case"right":container=programCell?dom.parentWithClass(programCell,"channelPrograms"):null,lastFocusDirection=e.detail.command,focusManager.moveRight(target,{container:container}),!0;break;default:return}e.preventDefault(),e.stopPropagation()}function onScrollerFocus(e){var target=e.target,programCell=dom.parentWithClass(target,"programCell");if(programCell){var focused=target,id=focused.getAttribute("data-id"),item=items[id];item&&events.trigger(self,"focus",[{item:item}])}if("left"===lastFocusDirection)programCell&&scrollHelper.toStart(programGrid,programCell,!0,!0);else if("right"===lastFocusDirection)programCell&&scrollHelper.toCenter(programGrid,programCell,!0,!0);else if("up"===lastFocusDirection||"down"===lastFocusDirection){var verticalScroller=dom.parentWithClass(target,"guideVerticalScroller");if(verticalScroller){var focusedElement=programCell||dom.parentWithTag(target,"BUTTON");verticalScroller.toCenter(focusedElement,!0)}}}function setScrollEvents(view,enabled){if(layoutManager.tv){var guideVerticalScroller=view.querySelector(".guideVerticalScroller");enabled?inputManager.on(guideVerticalScroller,onInputCommand):inputManager.off(guideVerticalScroller,onInputCommand)}}function onTimerCreated(e,apiClient,data){for(var programId=data.ProgramId,newTimerId=data.Id,cells=options.element.querySelectorAll('.programCell[data-id="'+programId+'"]'),i=0,length=cells.length;i'),newTimerId&&cell.setAttribute("data-timerid",newTimerId)}}function onSeriesTimerCreated(e,apiClient,data){}function onTimerCancelled(e,apiClient,data){for(var id=data.Id,cells=options.element.querySelectorAll('.programCell[data-timerid="'+id+'"]'),i=0,length=cells.length;i0&&pctOfWidth<=100?(guideProgramName.style.transform="translateX("+pctOfWidth+"%)",caret.classList.remove("hide")):(guideProgramName.style.transform="none",caret.classList.add("hide")))}function updateProgramCellsOnScroll(programGrid,programCells){isUpdatingProgramCellScroll||(isUpdatingProgramCellScroll=!0,requestAnimationFrame(function(){for(var scrollLeft=programGrid.scrollLeft,scrollPct=scrollLeft?scrollLeft/programGrid.scrollWidth*100:0,i=0,length=programCells.length;i=startDate&&now=0?date.setHours(date.getHours(),cellCurationMinutes,0,0):date.setHours(date.getHours(),0,0,0),date}function showLoading(){loading.show()}function hideLoading(){loading.hide()}function reloadGuide(context,newStartDate,scrollToTimeMs,focusToTimeMs,startTimeOfDayMs,focusProgramOnRender){var apiClient=connectionManager.getApiClient(options.serverId),channelQuery={StartIndex:0,EnableFavoriteSorting:"false"!==userSettings.get("livetv-favoritechannelsattop")};channelQuery.UserId=apiClient.getCurrentUserId();currentChannelLimit=500,showLoading(),channelQuery.StartIndex=currentStartIndex,channelQuery.Limit=500,channelQuery.AddCurrentProgram=!1,channelQuery.EnableUserData=!1,channelQuery.EnableImageTypes="Primary";var categories=self.categoryOptions.categories||[],displayMovieContent=!categories.length||-1!==categories.indexOf("movies"),displaySportsContent=!categories.length||-1!==categories.indexOf("sports"),displayNewsContent=!categories.length||-1!==categories.indexOf("news"),displayKidsContent=!categories.length||-1!==categories.indexOf("kids"),displaySeriesContent=!categories.length||-1!==categories.indexOf("series");displayMovieContent&&displaySportsContent&&displayNewsContent&&displayKidsContent?(channelQuery.IsMovie=null,channelQuery.IsSports=null,channelQuery.IsKids=null,channelQuery.IsNews=null,channelQuery.IsSeries=null):(displayNewsContent&&(channelQuery.IsNews=!0),displaySportsContent&&(channelQuery.IsSports=!0),displayKidsContent&&(channelQuery.IsKids=!0),displayMovieContent&&(channelQuery.IsMovie=!0),displaySeriesContent&&(channelQuery.IsSeries=!0)),"DatePlayed"===userSettings.get("livetv-channelorder")?(channelQuery.SortBy="DatePlayed",channelQuery.SortOrder="Descending"):(channelQuery.SortBy=null,channelQuery.SortOrder=null);var date=newStartDate;date=new Date(date.getTime()+1e3);var nextDay=new Date(date.getTime()+msPerDay-2e3),allowIndicators=dom.getWindowSize().innerWidth>=600,renderOptions={showHdIcon:allowIndicators&&"true"===userSettings.get("guide-indicator-hd"),showLiveIndicator:allowIndicators&&"false"!==userSettings.get("guide-indicator-live"),showPremiereIndicator:allowIndicators&&"false"!==userSettings.get("guide-indicator-premiere"),showNewIndicator:allowIndicators&&"false"!==userSettings.get("guide-indicator-new"),showRepeatIndicator:allowIndicators&&"true"===userSettings.get("guide-indicator-repeat"),showEpisodeTitle:!layoutManager.tv};apiClient.getLiveTvChannels(channelQuery).then(function(channelsResult){var btnPreviousPage=context.querySelector(".btnPreviousPage"),btnNextPage=context.querySelector(".btnNextPage");channelsResult.TotalRecordCount>500?(context.querySelector(".guideOptions").classList.remove("hide"),btnPreviousPage.classList.remove("hide"),btnNextPage.classList.remove("hide"),channelQuery.StartIndex?context.querySelector(".btnPreviousPage").disabled=!1:context.querySelector(".btnPreviousPage").disabled=!0,channelQuery.StartIndex+500",startDate.setTime(startDate.getTime()+cellDurationMs);return html}function parseDates(program){if(!program.StartDateLocal)try{program.StartDateLocal=datetime.parseISO8601Date(program.StartDate,{toLocal:!0})}catch(err){}if(!program.EndDateLocal)try{program.EndDateLocal=datetime.parseISO8601Date(program.EndDate,{toLocal:!0})}catch(err){}return null}function getTimerIndicator(item){var status;if("SeriesTimer"===item.Type)return'';if(item.TimerId||item.SeriesTimerId)status=item.Status||"Cancelled";else{if("Timer"!==item.Type)return"";status=item.Status}return item.SeriesTimerId?"Cancelled"!==status?'':'':''}function getChannelProgramsHtml(context,date,channel,programs,options,listInfo){var html="",startMs=date.getTime(),endMs=startMs+msPerDay-1;html+='
';for(var programsFound,clickAction=layoutManager.tv?"link":"programdialog",categories=self.categoryOptions.categories||[],displayMovieContent=!categories.length||-1!==categories.indexOf("movies"),displaySportsContent=!categories.length||-1!==categories.indexOf("sports"),displayNewsContent=!categories.length||-1!==categories.indexOf("news"),displayKidsContent=!categories.length||-1!==categories.indexOf("kids"),displaySeriesContent=!categories.length||-1!==categories.indexOf("series"),enableColorCodedBackgrounds="true"===userSettings.get("guide-colorcodedbackgrounds"),now=(new Date).getTime(),i=listInfo.startIndex,length=programs.length;iendMs)break;items[program.Id]=program;var renderStartMs=Math.max(startDateLocalMs,startMs),startPercent=(startDateLocalMs-startMs)/msPerDay;startPercent*=100,startPercent=Math.max(startPercent,0);var renderEndMs=Math.min(endDateLocalMs,endMs),endPercent=(renderEndMs-renderStartMs)/msPerDay;endPercent*=100;var cssClass="programCell itemAction",accentCssClass=null,displayInnerContent=!0;program.IsKids?(displayInnerContent=displayKidsContent,accentCssClass="kids"):program.IsSports?(displayInnerContent=displaySportsContent,accentCssClass="sports"):program.IsNews?(displayInnerContent=displayNewsContent,accentCssClass="news"):program.IsMovie?(displayInnerContent=displayMovieContent,accentCssClass="movie"):displayInnerContent=program.IsSeries?displaySeriesContent:displayMovieContent&&displayNewsContent&&displaySportsContent&&displayKidsContent&&displaySeriesContent,displayInnerContent&&enableColorCodedBackgrounds&&accentCssClass&&(cssClass+=" programCell-"+accentCssClass),now>=startDateLocalMs&&now=2?' is="emby-programcell"':"")+' data-action="'+clickAction+'"'+timerAttributes+' data-channelid="'+program.ChannelId+'" data-id="'+program.Id+'" data-serverid="'+program.ServerId+'" data-startdate="'+program.StartDate+'" data-enddate="'+program.EndDate+'" data-type="'+program.Type+'" class="'+cssClass+'" style="left:'+startPercent+"%;width:"+endPercent+'%;">',displayInnerContent){html+='
',html+='
',html+='
'+program.Name;var indicatorHtml=null;program.IsLive&&options.showLiveIndicator?indicatorHtml=''+globalize.translate("sharedcomponents#Live")+"":program.IsPremiere&&options.showPremiereIndicator?indicatorHtml=''+globalize.translate("sharedcomponents#Premiere")+"":program.IsSeries&&!program.IsRepeat&&options.showNewIndicator?indicatorHtml=''+globalize.translate("sharedcomponents#AttributeNew")+"":program.IsSeries&&program.IsRepeat&&options.showRepeatIndicator&&(indicatorHtml=''+globalize.translate("sharedcomponents#Repeat")+""),html+=indicatorHtml||"",program.EpisodeTitle&&options.showEpisodeTitle&&(html+='
',program.EpisodeTitle&&options.showEpisodeTitle&&(html+=''+program.EpisodeTitle+""),html+="
"),html+="
",program.IsHD&&options.showHdIcon&&(layoutManager.tv?html+='
HD
':html+='
HD
'),html+=getTimerIndicator(program),html+="
"}html+=""}}else if(programsFound)break}return html+="
"}function renderChannelHeaders(context,channels,apiClient){for(var html="",i=0,length=channels.length;i',hasChannelImage){html+='
'}channel.ChannelNumber&&(html+='

'+channel.ChannelNumber+"

"),!hasChannelImage&&channel.Name&&(html+='
'+channel.Name+"
"),html+=""}var channelList=context.querySelector(".channelsContainer");channelList.innerHTML=html,imageLoader.lazyChildren(channelList)}function renderPrograms(context,date,channels,programs,options){for(var listInfo={startIndex:0},html=[],i=0,length=channels.length;i=pct||left+width>=pct)break;programCell=programCell.nextSibling}programCell?focusManager.focus(programCell):focusManager.autoFocus(autoFocusParent,!0)}}function nativeScrollTo(container,pos,horizontal){container.scrollTo?horizontal?container.scrollTo(pos,0):container.scrollTo(0,pos):horizontal?container.scrollLeft=Math.round(pos):container.scrollTop=Math.round(pos)}function onProgramGridScroll(context,elem,timeslotHeaders){if((new Date).getTime()-lastHeaderScroll>=1e3){lastGridScroll=(new Date).getTime();var scrollLeft=elem.scrollLeft;scrollXPct=100*scrollLeft/elem.scrollWidth,nativeScrollTo(timeslotHeaders,scrollLeft,!0)}updateProgramCellsOnScroll(elem,programCells)}function onTimeslotHeadersScroll(context,elem){(new Date).getTime()-lastGridScroll>=1e3&&(lastHeaderScroll=(new Date).getTime(),nativeScrollTo(programGrid,elem.scrollLeft,!0))}function changeDate(page,date,scrollToTimeMs,focusToTimeMs,startTimeOfDayMs,focusProgramOnRender){var newStartDate=normalizeDateToTimeslot(date);currentDate=newStartDate,reloadGuide(page,newStartDate,scrollToTimeMs,focusToTimeMs,startTimeOfDayMs,focusProgramOnRender)}function getDateTabText(date,isActive,tabIndex){var cssClass=isActive?"emby-tab-button guide-date-tab-button emby-tab-button-active":"emby-tab-button guide-date-tab-button",html='"}function setDateRange(page,guideInfo){var today=new Date,nowHours=today.getHours();today.setHours(nowHours,0,0,0);var start=datetime.parseISO8601Date(guideInfo.StartDate,{toLocal:!0}),end=datetime.parseISO8601Date(guideInfo.EndDate,{toLocal:!0});start.setHours(nowHours,0,0,0),end.setHours(0,0,0,0),start.getTime()>=end.getTime()&&end.setDate(start.getDate()+1),start=new Date(Math.max(today,start));var dateTabsHtml="",tabIndex=0,date=new Date;currentDate&&date.setTime(currentDate.getTime()),date.setHours(nowHours,0,0,0);var startTimeOfDayMs=60*start.getHours()*60*1e3;for(startTimeOfDayMs+=60*start.getMinutes()*1e3;start<=end;){dateTabsHtml+=getDateTabText(start,date.getDate()===start.getDate()&&date.getMonth()===start.getMonth()&&date.getFullYear()===start.getFullYear(),tabIndex),start.setDate(start.getDate()+1),start.setHours(0,0,0,0),tabIndex++}page.querySelector(".emby-tabs-slider").innerHTML=dateTabsHtml,page.querySelector(".guideDateTabs").refresh();var newDate=new Date,newDateHours=newDate.getHours(),scrollToTimeMs=60*newDateHours*60*1e3,minutes=newDate.getMinutes();minutes>=30&&(scrollToTimeMs+=18e5),changeDate(page,date,scrollToTimeMs,60*(60*newDateHours+minutes)*1e3,startTimeOfDayMs,layoutManager.tv)}function reloadPage(page){showLoading(),connectionManager.getApiClient(options.serverId).getLiveTvGuideInfo().then(function(guideInfo){setDateRange(page,guideInfo)})}function getChannelProgramsFocusableElements(container){for(var elements=container.querySelectorAll(".programCell"),list=[],currentScrollXPct=scrollXPct+1,i=0,length=elements.length;i=currentScrollXPct&&list.push(elem)}return list}function onInputCommand(e){var container,channelPrograms,focusableElements,newRow,target=e.target,programCell=dom.parentWithClass(target,"programCell");switch(e.detail.command){case"up":programCell?(container=programGrid,channelPrograms=dom.parentWithClass(programCell,"channelPrograms"),newRow=channelPrograms.previousSibling,newRow?(focusableElements=getChannelProgramsFocusableElements(newRow),focusableElements.length?container=newRow:focusableElements=null):container=null):container=null,lastFocusDirection=e.detail.command,focusManager.moveUp(target,{container:container,focusableElements:focusableElements});break;case"down":programCell?(container=programGrid,channelPrograms=dom.parentWithClass(programCell,"channelPrograms"),newRow=channelPrograms.nextSibling,newRow?(focusableElements=getChannelProgramsFocusableElements(newRow),focusableElements.length?container=newRow:focusableElements=null):container=null):container=null,lastFocusDirection=e.detail.command,focusManager.moveDown(target,{container:container,focusableElements:focusableElements});break;case"left":container=programCell?dom.parentWithClass(programCell,"channelPrograms"):null,container&&!programCell.previousSibling&&(container=null),lastFocusDirection=e.detail.command,focusManager.moveLeft(target,{container:container}),!0;break;case"right":container=programCell?dom.parentWithClass(programCell,"channelPrograms"):null,lastFocusDirection=e.detail.command,focusManager.moveRight(target,{container:container}),!0;break;default:return}e.preventDefault(),e.stopPropagation()}function onScrollerFocus(e){var target=e.target,programCell=dom.parentWithClass(target,"programCell");if(programCell){var focused=target,id=focused.getAttribute("data-id"),item=items[id];item&&events.trigger(self,"focus",[{item:item}])}if("left"===lastFocusDirection)programCell&&scrollHelper.toStart(programGrid,programCell,!0,!0);else if("right"===lastFocusDirection)programCell&&scrollHelper.toCenter(programGrid,programCell,!0,!0);else if("up"===lastFocusDirection||"down"===lastFocusDirection){var verticalScroller=dom.parentWithClass(target,"guideVerticalScroller");if(verticalScroller){var focusedElement=programCell||dom.parentWithTag(target,"BUTTON");verticalScroller.toCenter(focusedElement,!0)}}}function setScrollEvents(view,enabled){if(layoutManager.tv){var guideVerticalScroller=view.querySelector(".guideVerticalScroller");enabled?inputManager.on(guideVerticalScroller,onInputCommand):inputManager.off(guideVerticalScroller,onInputCommand)}}function onTimerCreated(e,apiClient,data){for(var programId=data.ProgramId,newTimerId=data.Id,cells=options.element.querySelectorAll('.programCell[data-id="'+programId+'"]'),i=0,length=cells.length;i'),newTimerId&&cell.setAttribute("data-timerid",newTimerId)}}function onSeriesTimerCreated(e,apiClient,data){}function onTimerCancelled(e,apiClient,data){for(var id=data.Id,cells=options.element.querySelectorAll('.programCell[data-timerid="'+id+'"]'),i=0,length=cells.length;i
';elem.innerHTML=html,elem.classList.add("homeSectionsContainer");var promises=[],sections=getAllSectionsToShow(userSettings,7);for(i=0,length=sections.length;i",layoutManager.tv||(html+=''),html+="",html+='
';for(var i=0,length=items.length;i'+icon+""+item.Name+""}return html+="
",html+=""}function loadlibraryButtons(elem,apiClient,user,userSettings,userViews){return Promise.all([getAppInfo(apiClient),getDownloadsSectionHtml(apiClient,user,userSettings)]).then(function(responses){var infoHtml=responses[0],downloadsHtml=responses[1];elem.classList.remove("verticalSection");var html=getLibraryButtonsHtml(userViews);elem.innerHTML=html+downloadsHtml+infoHtml,bindHomeScreenSettingsIcon(elem,apiClient,user.Id,userSettings),infoHtml&&bindAppInfoEvents(elem),imageLoader.lazyChildren(elem)})}function bindAppInfoEvents(elem){elem.querySelector(".appInfoSection").addEventListener("click",function(e){dom.parentWithClass(e.target,"card")&®istrationServices.showPremiereInfo()})}function getRandomInt(min,max){return Math.floor(Math.random()*(max-min+1))+min}function getAppInfo(apiClient){var cacheKey="lastappinfopresent5",lastDatePresented=parseInt(appSettings.get(cacheKey)||"0");return lastDatePresented?(new Date).getTime()-lastDatePresented<1728e5?Promise.resolve(""):registrationServices.validateFeature("dvr",{showDialog:!1,viewOnly:!0}).then(function(){return appSettings.set(cacheKey,(new Date).getTime()),""},function(){appSettings.set(cacheKey,(new Date).getTime());var infos=[getPremiereInfo];return appHost.supports("otherapppromotions")&&infos.push(getTheaterInfo),infos[getRandomInt(0,infos.length-1)]()}):(appSettings.set(cacheKey,(new Date).getTime()),Promise.resolve(""))}function getCard(img,shape){shape=shape||"backdropCard";var html='
';return html+='
',html+='
',html+="
",html+="
"}function getTheaterInfo(){var html="";html+='
',html+='
',html+='

Discover Emby Theater

',html+='',html+="
";return html+='
',html+='

A beautiful app for your TV and large screen tablet. Emby Theater runs on Windows, Xbox One, Raspberry Pi, Samsung Smart TVs, Sony PS4, Web Browsers, and more.

',html+='
',html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater1.png"),html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater2.png"),html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater3.png"),html+="
",html+="
",html+="
"}function getPremiereInfo(){var html="";return html+='
',html+='
',html+='

Discover Emby Premiere

',html+='',html+="
",html+='
',html+='

Enjoy Emby DVR, get free access to Emby apps, and more.

',html+='
',html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater1.png"),html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater2.png"),html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater3.png"),html+="
",html+="
",html+="
"}function getFetchLatestItemsFn(serverId,parentId,collectionType){return function(){var apiClient=connectionManager.getApiClient(serverId),limit=16;enableScrollX()?"music"===collectionType&&(limit=30):limit="tvshows"===collectionType?5:"music"===collectionType?9:8;var options={Limit:limit,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",ParentId:parentId};return apiClient.getLatestItems(options)}}function getLatestItemsHtmlFn(itemType,viewType){return function(items){var shape="Channel"===itemType||"movies"===viewType?getPortraitShape():"music"===viewType?getSquareShape():getThumbShape();return cardBuilder.getCardsHtml({items:items,shape:shape,preferThumb:"movies"!==viewType&&"Channel"!==itemType&&"music"!==viewType?"auto":null,showUnplayedIndicator:!1,showChildCountIndicator:!0,context:"home",overlayText:!1,centerText:!0,overlayPlayButton:"photos"!==viewType,allowBottomPadding:!enableScrollX()&&!0,cardLayout:!1,showTitle:"photos"!==viewType,showYear:"movies"===viewType||"tvshows"===viewType||!viewType,showParentTitle:"music"===viewType||"tvshows"===viewType||!viewType||!1,lines:2})}}function renderLatestSection(elem,apiClient,user,parent){var html="";html+='
',layoutManager.tv?html+='

'+globalize.translate("sharedcomponents#LatestFromLibrary",parent.Name)+"

":(html+='',html+='

',html+=globalize.translate("sharedcomponents#LatestFromLibrary",parent.Name),html+="

",html+='',html+="
"),html+="
",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getFetchLatestItemsFn(apiClient.serverId(),parent.Id,parent.CollectionType),itemsContainer.getItemsHtml=getLatestItemsHtmlFn(parent.Type,parent.CollectionType),itemsContainer.parentContainer=elem}function loadRecentlyAdded(elem,apiClient,user,userViews){elem.classList.remove("verticalSection");for(var excludeViewTypes=["playlists","livetv","boxsets","channels"],i=0,length=userViews.length;i":(html+='',html+='

',html+=globalize.translate("sharedcomponents#HeaderMyDownloads"),html+="

",html+='',html+="
",html+=''),html+="
",html+='
',html+=cardBuilder.getCardsHtml({items:items,preferThumb:"auto",shape:"autooverflow",overlayText:!1,showTitle:!0,showParentTitle:!0,lazy:!0,showDetailsMenu:!0,overlayPlayButton:!0,context:"home",centerText:!0,allowBottomPadding:!1,cardLayout:!1,showYear:!0,lines:2}),html+="
",html+="
"}):Promise.resolve("")}function loadLibraryTiles(elem,apiClient,user,userSettings,shape,userViews,allSections){elem.classList.remove("verticalSection");var html="",scrollX=!layoutManager.desktop;return userViews.length&&(html+='
',html+='
',html+='

'+globalize.translate("sharedcomponents#HeaderMyMedia")+"

",layoutManager.tv||(html+=''),html+="
",html+=scrollX?'
':'
',html+=cardBuilder.getCardsHtml({items:userViews,shape:scrollX?"overflowSmallBackdrop":shape,showTitle:!0,centerText:!0,overlayText:!1,lazy:!0,transition:!1,allowBottomPadding:!scrollX}),scrollX&&(html+="
"),html+="
",html+="
"),Promise.all([getAppInfo(apiClient),getDownloadsSectionHtml(apiClient,user,userSettings)]).then(function(responses){var infoHtml=responses[0],downloadsHtml=responses[1];elem.innerHTML=html+downloadsHtml+infoHtml,bindHomeScreenSettingsIcon(elem,apiClient,user.Id,userSettings),infoHtml&&bindAppInfoEvents(elem),imageLoader.lazyChildren(elem)})}function getContinueWatchingFetchFn(serverId){return function(){var limit,apiClient=connectionManager.getApiClient(serverId),screenWidth=dom.getWindowSize().innerWidth;enableScrollX()?limit=12:(limit=screenWidth>=1920?8:screenWidth>=1600?8:screenWidth>=1200?9:6,limit=Math.min(limit,5));var options={Limit:limit,Recursive:!0,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1,MediaTypes:"Video"};return apiClient.getResumableItems(apiClient.getCurrentUserId(),options)}}function getContinueWatchingItemsHtml(items){return cardBuilder.getCardsHtml({items:items,preferThumb:!0,shape:getThumbShape(),overlayText:!1,showTitle:!0,showParentTitle:!0,lazy:!0,showDetailsMenu:!0,overlayPlayButton:!0,context:"home",centerText:!0,allowBottomPadding:!1,cardLayout:!1,showYear:!0,lines:2})}function loadResumeVideo(elem,apiClient,userId){var html="";html+='

'+globalize.translate("sharedcomponents#HeaderContinueWatching")+"

",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.classList.add("hide"),elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getContinueWatchingFetchFn(apiClient.serverId()),itemsContainer.getItemsHtml=getContinueWatchingItemsHtml,itemsContainer.parentContainer=elem}function getContinueListeningFetchFn(serverId){return function(){var limit,apiClient=connectionManager.getApiClient(serverId),screenWidth=dom.getWindowSize().innerWidth;enableScrollX()?limit=12:(limit=screenWidth>=1920?8:screenWidth>=1600?8:screenWidth>=1200?9:6,limit=Math.min(limit,5));var options={Limit:limit,Recursive:!0,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1,MediaTypes:"Audio"};return apiClient.getResumableItems(apiClient.getCurrentUserId(),options)}}function getContinueListeningItemsHtml(items){return cardBuilder.getCardsHtml({items:items,preferThumb:!0,shape:getThumbShape(),overlayText:!1,showTitle:!0,showParentTitle:!0,lazy:!0,showDetailsMenu:!0,overlayPlayButton:!0,context:"home",centerText:!0,allowBottomPadding:!1,cardLayout:!1,showYear:!0,lines:2})}function loadResumeAudio(elem,apiClient,userId){var html="";html+='

'+globalize.translate("sharedcomponents#HeaderContinueWatching")+"

",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.classList.add("hide"),elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getContinueListeningFetchFn(apiClient.serverId()),itemsContainer.getItemsHtml=getContinueListeningItemsHtml,itemsContainer.parentContainer=elem}function bindUnlockClick(elem){var btnUnlock=elem.querySelector(".btnUnlock");btnUnlock&&btnUnlock.addEventListener("click",function(e){registrationServices.validateFeature("livetv",{viewOnly:!0}).then(function(){dom.parentWithClass(elem,"homeSectionsContainer").dispatchEvent(new CustomEvent("settingschange",{cancelable:!1}))})})}function getOnNowFetchFn(serverId){return function(){var apiClient=connectionManager.getApiClient(serverId);return apiClient.getLiveTvRecommendedPrograms({userId:apiClient.getCurrentUserId(),IsAiring:!0,limit:24,ImageTypeLimit:1,EnableImageTypes:"Primary,Thumb,Backdrop",EnableTotalRecordCount:!1,Fields:"ChannelInfo,PrimaryImageAspectRatio"})}}function getOnNowItemsHtml(items){return cardBuilder.getCardsHtml({items:items,preferThumb:"auto",inheritThumb:!1,shape:enableScrollX()?"autooverflow":"auto",showParentTitleOrTitle:!0,showTitle:!0,centerText:!0,coverImage:!0,overlayText:!1,allowBottomPadding:!enableScrollX(),showAirTime:!0,showChannelName:!1,showAirDateTime:!1,showAirEndTime:!0,defaultShape:getThumbShape(),lines:3,overlayPlayButton:!0})}function loadOnNow(elem,apiClient,user){if(!user.Policy.EnableLiveTvAccess)return Promise.resolve();var promises=[];promises.push(registrationServices.validateFeature("livetv",{viewOnly:!0,showDialog:!1}).then(function(){return!0},function(){return!1}));user.Id;return promises.push(apiClient.getLiveTvRecommendedPrograms({userId:apiClient.getCurrentUserId(),IsAiring:!0,limit:1,ImageTypeLimit:1,EnableImageTypes:"Primary,Thumb,Backdrop",EnableTotalRecordCount:!1,Fields:"ChannelInfo,PrimaryImageAspectRatio"})),Promise.all(promises).then(function(responses){var registered=responses[0],result=responses[1],html="";if(result.Items.length&®istered){elem.classList.remove("padded-left"),elem.classList.remove("padded-right"),elem.classList.remove("padded-bottom"),elem.classList.remove("verticalSection"),html+='
',html+='
',html+='

'+globalize.translate("sharedcomponents#LiveTV")+"

",html+="
",enableScrollX()?(html+='",html+="
",html+='
',html+='
',layoutManager.tv?html+='

'+globalize.translate("sharedcomponents#HeaderOnNow")+"

":(html+='',html+='

',html+=globalize.translate("sharedcomponents#HeaderOnNow"),html+="

",html+='',html+="
"),html+="
",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",html+="
",elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.parentContainer=elem,itemsContainer.fetchData=getOnNowFetchFn(apiClient.serverId()),itemsContainer.getItemsHtml=getOnNowItemsHtml}else result.Items.length&&!registered&&(elem.classList.add("padded-left"),elem.classList.add("padded-right"),elem.classList.add("padded-bottom"),html+='

'+globalize.translate("sharedcomponents#LiveTvRequiresUnlock")+"

",html+='",elem.innerHTML=html);bindUnlockClick(elem)})}function getNextUpFetchFn(serverId){return function(){var apiClient=connectionManager.getApiClient(serverId);return apiClient.getNextUpEpisodes({Limit:enableScrollX()?24:15,Fields:"PrimaryImageAspectRatio,SeriesInfo,DateCreated,BasicSyncInfo",UserId:apiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1})}}function getNextUpItemsHtml(items){return cardBuilder.getCardsHtml({items:items,preferThumb:!0,shape:getThumbShape(),overlayText:!1,showTitle:!0,showParentTitle:!0,lazy:!0,overlayPlayButton:!0,context:"home",centerText:!0,allowBottomPadding:!enableScrollX(),cardLayout:!1})}function loadNextUp(elem,apiClient,userId){var html="";html+='
',layoutManager.tv?html+='

'+globalize.translate("sharedcomponents#HeaderNextUp")+"

":(html+='',html+='

',html+=globalize.translate("sharedcomponents#HeaderNextUp"),html+="

",html+='',html+="
"),html+="
",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.classList.add("hide"),elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getNextUpFetchFn(apiClient.serverId()),itemsContainer.getItemsHtml=getNextUpItemsHtml,itemsContainer.parentContainer=elem}function getLatestRecordingsFetchFn(serverId,activeRecordingsOnly){return function(){var apiClient=connectionManager.getApiClient(serverId);return apiClient.getLiveTvRecordings({userId:apiClient.getCurrentUserId(),Limit:enableScrollX()?12:5,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",EnableTotalRecordCount:!1,IsLibraryItem:!!activeRecordingsOnly&&null,IsInProgress:!!activeRecordingsOnly||null})}}function getLatestRecordingItemsHtml(activeRecordingsOnly){return function(items){return cardBuilder.getCardsHtml({items:items,shape:enableScrollX()?"autooverflow":"auto",showTitle:!0,showParentTitle:!0,coverImage:!0,lazy:!0,showDetailsMenu:!0,centerText:!0,overlayText:!1,showYear:!0,lines:2,overlayPlayButton:!activeRecordingsOnly,allowBottomPadding:!enableScrollX(),preferThumb:!0,cardLayout:!1,overlayMoreButton:activeRecordingsOnly,action:activeRecordingsOnly?"none":null,centerPlayButton:activeRecordingsOnly})}}function loadLatestLiveTvRecordings(elem,activeRecordingsOnly,apiClient,userId){var title=activeRecordingsOnly?globalize.translate("sharedcomponents#HeaderActiveRecordings"):globalize.translate("sharedcomponents#HeaderLatestRecordings"),html="";html+='
',html+='

'+title+"

",layoutManager.tv,html+="
",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.classList.add("hide"),elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getLatestRecordingsFetchFn(apiClient.serverId(),activeRecordingsOnly),itemsContainer.getItemsHtml=getLatestRecordingItemsHtml(activeRecordingsOnly),itemsContainer.parentContainer=elem}return{loadLibraryTiles:loadLibraryTiles,getDefaultSection:getDefaultSection,loadSections:loadSections,destroySections:destroySections,pause:pause,resume:resume}}); \ No newline at end of file +define(["connectionManager","cardBuilder","registrationServices","appSettings","dom","apphost","layoutManager","imageLoader","globalize","itemShortcuts","itemHelper","appRouter","emby-button","paper-icon-button-light","emby-itemscontainer","emby-scroller","emby-linkbutton","css!./homesections"],function(connectionManager,cardBuilder,registrationServices,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
';elem.innerHTML=html,elem.classList.add("homeSectionsContainer");var promises=[],sections=getAllSectionsToShow(userSettings,7);for(i=0,length=sections.length;i",layoutManager.tv||(html+=''),html+="
",html+='
';for(var i=0,length=items.length;i'+icon+""+item.Name+""}return html+="
",html+="
"}function loadlibraryButtons(elem,apiClient,user,userSettings,userViews){return Promise.all([getAppInfo(apiClient),getDownloadsSectionHtml(apiClient,user,userSettings)]).then(function(responses){var infoHtml=responses[0],downloadsHtml=responses[1];elem.classList.remove("verticalSection");var html=getLibraryButtonsHtml(userViews);elem.innerHTML=html+downloadsHtml+infoHtml,bindHomeScreenSettingsIcon(elem,apiClient,user.Id,userSettings),infoHtml&&bindAppInfoEvents(elem),imageLoader.lazyChildren(elem)})}function bindAppInfoEvents(elem){elem.querySelector(".appInfoSection").addEventListener("click",function(e){dom.parentWithClass(e.target,"card")&®istrationServices.showPremiereInfo()})}function getRandomInt(min,max){return Math.floor(Math.random()*(max-min+1))+min}function getAppInfo(apiClient){var cacheKey="lastappinfopresent5",lastDatePresented=parseInt(appSettings.get(cacheKey)||"0");return lastDatePresented?(new Date).getTime()-lastDatePresented<1728e5?Promise.resolve(""):registrationServices.validateFeature("dvr",{showDialog:!1,viewOnly:!0}).then(function(){return appSettings.set(cacheKey,(new Date).getTime()),""},function(){appSettings.set(cacheKey,(new Date).getTime());var infos=[getPremiereInfo];return appHost.supports("otherapppromotions")&&infos.push(getTheaterInfo),infos[getRandomInt(0,infos.length-1)]()}):(appSettings.set(cacheKey,(new Date).getTime()),Promise.resolve(""))}function getCard(img,shape){shape=shape||"backdropCard";var html='
';return html+='
',html+='
',html+="
",html+="
"}function getTheaterInfo(){var html="";html+='
',html+='
',html+='

Discover Emby Theater

',html+='',html+="
";return html+='
',html+='

A beautiful app for your TV and large screen tablet. Emby Theater runs on Windows, Xbox One, Raspberry Pi, Samsung Smart TVs, Sony PS4, Web Browsers, and more.

',html+='
',html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater1.png"),html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater2.png"),html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater3.png"),html+="
",html+="
",html+="
"}function getPremiereInfo(){var html="";return html+='
',html+='
',html+='

Discover Emby Premiere

',html+='',html+="
",html+='
',html+='

Enjoy Emby DVR, get free access to Emby apps, and more.

',html+='
',html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater1.png"),html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater2.png"),html+=getCard("https://raw.githubusercontent.com/MediaBrowser/Emby.Resources/master/apps/theater3.png"),html+="
",html+="
",html+="
"}function getFetchLatestItemsFn(serverId,parentId,collectionType){return function(){var apiClient=connectionManager.getApiClient(serverId),limit=16;enableScrollX()?"music"===collectionType&&(limit=30):limit="tvshows"===collectionType?5:"music"===collectionType?9:8;var options={Limit:limit,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",ParentId:parentId};return apiClient.getLatestItems(options)}}function getLatestItemsHtmlFn(itemType,viewType){return function(items){var shape="Channel"===itemType||"movies"===viewType?getPortraitShape():"music"===viewType?getSquareShape():getThumbShape();return cardBuilder.getCardsHtml({items:items,shape:shape,preferThumb:"movies"!==viewType&&"Channel"!==itemType&&"music"!==viewType?"auto":null,showUnplayedIndicator:!1,showChildCountIndicator:!0,context:"home",overlayText:!1,centerText:!0,overlayPlayButton:"photos"!==viewType,allowBottomPadding:!enableScrollX()&&!0,cardLayout:!1,showTitle:"photos"!==viewType,showYear:"movies"===viewType||"tvshows"===viewType||!viewType,showParentTitle:"music"===viewType||"tvshows"===viewType||!viewType||!1,lines:2})}}function renderLatestSection(elem,apiClient,user,parent){var html="";html+='
',layoutManager.tv?html+='

'+globalize.translate("sharedcomponents#LatestFromLibrary",parent.Name)+"

":(html+='',html+='

',html+=globalize.translate("sharedcomponents#LatestFromLibrary",parent.Name),html+="

",html+='',html+="
"),html+="
",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getFetchLatestItemsFn(apiClient.serverId(),parent.Id,parent.CollectionType),itemsContainer.getItemsHtml=getLatestItemsHtmlFn(parent.Type,parent.CollectionType),itemsContainer.parentContainer=elem}function loadRecentlyAdded(elem,apiClient,user,userViews){elem.classList.remove("verticalSection");for(var excludeViewTypes=["playlists","livetv","boxsets","channels"],i=0,length=userViews.length;i":(html+='',html+='

',html+=globalize.translate("sharedcomponents#HeaderMyDownloads"),html+="

",html+='',html+="
",html+=''),html+="
",html+='
',html+=cardBuilder.getCardsHtml({items:items,preferThumb:"auto",shape:"autooverflow",overlayText:!1,showTitle:!0,showParentTitle:!0,lazy:!0,showDetailsMenu:!0,overlayPlayButton:!0,context:"home",centerText:!0,allowBottomPadding:!1,cardLayout:!1,showYear:!0,lines:2}),html+="
",html+="
"}):Promise.resolve("")}function loadLibraryTiles(elem,apiClient,user,userSettings,shape,userViews,allSections){elem.classList.remove("verticalSection");var html="",scrollX=!layoutManager.desktop;return userViews.length&&(html+='
',html+='
',html+='

'+globalize.translate("sharedcomponents#HeaderMyMedia")+"

",layoutManager.tv||(html+=''),html+="
",html+=scrollX?'
':'
',html+=cardBuilder.getCardsHtml({items:userViews,shape:scrollX?"overflowSmallBackdrop":shape,showTitle:!0,centerText:!0,overlayText:!1,lazy:!0,transition:!1,allowBottomPadding:!scrollX}),scrollX&&(html+="
"),html+="
",html+="
"),Promise.all([getAppInfo(apiClient),getDownloadsSectionHtml(apiClient,user,userSettings)]).then(function(responses){var infoHtml=responses[0],downloadsHtml=responses[1];elem.innerHTML=html+downloadsHtml+infoHtml,bindHomeScreenSettingsIcon(elem,apiClient,user.Id,userSettings),infoHtml&&bindAppInfoEvents(elem),imageLoader.lazyChildren(elem)})}function getContinueWatchingFetchFn(serverId){return function(){var limit,apiClient=connectionManager.getApiClient(serverId),screenWidth=dom.getWindowSize().innerWidth;enableScrollX()?limit=12:(limit=screenWidth>=1920?8:screenWidth>=1600?8:screenWidth>=1200?9:6,limit=Math.min(limit,5));var options={Limit:limit,Recursive:!0,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1,MediaTypes:"Video"};return apiClient.getResumableItems(apiClient.getCurrentUserId(),options)}}function getContinueWatchingItemsHtml(items){return cardBuilder.getCardsHtml({items:items,preferThumb:!0,shape:getThumbShape(),overlayText:!1,showTitle:!0,showParentTitle:!0,lazy:!0,showDetailsMenu:!0,overlayPlayButton:!0,context:"home",centerText:!0,allowBottomPadding:!1,cardLayout:!1,showYear:!0,lines:2})}function loadResumeVideo(elem,apiClient,userId){var html="";html+='

'+globalize.translate("sharedcomponents#HeaderContinueWatching")+"

",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.classList.add("hide"),elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getContinueWatchingFetchFn(apiClient.serverId()),itemsContainer.getItemsHtml=getContinueWatchingItemsHtml,itemsContainer.parentContainer=elem}function getContinueListeningFetchFn(serverId){return function(){var limit,apiClient=connectionManager.getApiClient(serverId),screenWidth=dom.getWindowSize().innerWidth;enableScrollX()?limit=12:(limit=screenWidth>=1920?8:screenWidth>=1600?8:screenWidth>=1200?9:6,limit=Math.min(limit,5));var options={Limit:limit,Recursive:!0,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1,MediaTypes:"Audio"};return apiClient.getResumableItems(apiClient.getCurrentUserId(),options)}}function getContinueListeningItemsHtml(items){return cardBuilder.getCardsHtml({items:items,preferThumb:!0,shape:getThumbShape(),overlayText:!1,showTitle:!0,showParentTitle:!0,lazy:!0,showDetailsMenu:!0,overlayPlayButton:!0,context:"home",centerText:!0,allowBottomPadding:!1,cardLayout:!1,showYear:!0,lines:2})}function loadResumeAudio(elem,apiClient,userId){var html="";html+='

'+globalize.translate("sharedcomponents#HeaderContinueWatching")+"

",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.classList.add("hide"),elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getContinueListeningFetchFn(apiClient.serverId()),itemsContainer.getItemsHtml=getContinueListeningItemsHtml,itemsContainer.parentContainer=elem}function bindUnlockClick(elem){var btnUnlock=elem.querySelector(".btnUnlock");btnUnlock&&btnUnlock.addEventListener("click",function(e){registrationServices.validateFeature("livetv",{viewOnly:!0}).then(function(){dom.parentWithClass(elem,"homeSectionsContainer").dispatchEvent(new CustomEvent("settingschange",{cancelable:!1}))})})}function getOnNowFetchFn(serverId){return function(){var apiClient=connectionManager.getApiClient(serverId);return apiClient.getLiveTvRecommendedPrograms({userId:apiClient.getCurrentUserId(),IsAiring:!0,limit:24,ImageTypeLimit:1,EnableImageTypes:"Primary,Thumb,Backdrop",EnableTotalRecordCount:!1,Fields:"ChannelInfo,PrimaryImageAspectRatio"})}}function getOnNowItemsHtml(items){return cardBuilder.getCardsHtml({items:items,preferThumb:"auto",inheritThumb:!1,shape:enableScrollX()?"autooverflow":"auto",showParentTitleOrTitle:!0,showTitle:!0,centerText:!0,coverImage:!0,overlayText:!1,allowBottomPadding:!enableScrollX(),showAirTime:!0,showChannelName:!1,showAirDateTime:!1,showAirEndTime:!0,defaultShape:getThumbShape(),lines:3,overlayPlayButton:!0})}function loadOnNow(elem,apiClient,user){if(!user.Policy.EnableLiveTvAccess)return Promise.resolve();var promises=[];promises.push(registrationServices.validateFeature("livetv",{viewOnly:!0,showDialog:!1}).then(function(){return!0},function(){return!1}));user.Id;return promises.push(apiClient.getLiveTvRecommendedPrograms({userId:apiClient.getCurrentUserId(),IsAiring:!0,limit:1,ImageTypeLimit:1,EnableImageTypes:"Primary,Thumb,Backdrop",EnableTotalRecordCount:!1,Fields:"ChannelInfo,PrimaryImageAspectRatio"})),Promise.all(promises).then(function(responses){var registered=responses[0],result=responses[1],html="";if(result.Items.length&®istered){elem.classList.remove("padded-left"),elem.classList.remove("padded-right"),elem.classList.remove("padded-bottom"),elem.classList.remove("verticalSection"),html+='
',html+='
',html+='

'+globalize.translate("sharedcomponents#LiveTV")+"

",html+="
",enableScrollX()?(html+='",html+="
",html+='
',html+='
',layoutManager.tv?html+='

'+globalize.translate("sharedcomponents#HeaderOnNow")+"

":(html+='',html+='

',html+=globalize.translate("sharedcomponents#HeaderOnNow"),html+="

",html+='',html+="
"),html+="
",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",html+="
",elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.parentContainer=elem,itemsContainer.fetchData=getOnNowFetchFn(apiClient.serverId()),itemsContainer.getItemsHtml=getOnNowItemsHtml}else result.Items.length&&!registered&&(elem.classList.add("padded-left"),elem.classList.add("padded-right"),elem.classList.add("padded-bottom"),html+='

'+globalize.translate("sharedcomponents#LiveTvRequiresUnlock")+"

",html+='",elem.innerHTML=html);bindUnlockClick(elem)})}function getNextUpFetchFn(serverId){return function(){var apiClient=connectionManager.getApiClient(serverId);return apiClient.getNextUpEpisodes({Limit:enableScrollX()?24:15,Fields:"PrimaryImageAspectRatio,SeriesInfo,DateCreated,BasicSyncInfo",UserId:apiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1})}}function getNextUpItemsHtml(items){return cardBuilder.getCardsHtml({items:items,preferThumb:!0,shape:getThumbShape(),overlayText:!1,showTitle:!0,showParentTitle:!0,lazy:!0,overlayPlayButton:!0,context:"home",centerText:!0,allowBottomPadding:!enableScrollX(),cardLayout:!1})}function loadNextUp(elem,apiClient,userId){var html="";html+='
',layoutManager.tv?html+='

'+globalize.translate("sharedcomponents#HeaderNextUp")+"

":(html+='',html+='

',html+=globalize.translate("sharedcomponents#HeaderNextUp"),html+="

",html+='',html+="
"),html+="
",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.classList.add("hide"),elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getNextUpFetchFn(apiClient.serverId()),itemsContainer.getItemsHtml=getNextUpItemsHtml,itemsContainer.parentContainer=elem}function getLatestRecordingsFetchFn(serverId,activeRecordingsOnly){return function(){var apiClient=connectionManager.getApiClient(serverId);return apiClient.getLiveTvRecordings({userId:apiClient.getCurrentUserId(),Limit:enableScrollX()?12:5,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",EnableTotalRecordCount:!1,IsLibraryItem:!!activeRecordingsOnly&&null,IsInProgress:!!activeRecordingsOnly||null})}}function getLatestRecordingItemsHtml(activeRecordingsOnly){return function(items){return cardBuilder.getCardsHtml({items:items,shape:enableScrollX()?"autooverflow":"auto",showTitle:!0,showParentTitle:!0,coverImage:!0,lazy:!0,showDetailsMenu:!0,centerText:!0,overlayText:!1,showYear:!0,lines:2,overlayPlayButton:!activeRecordingsOnly,allowBottomPadding:!enableScrollX(),preferThumb:!0,cardLayout:!1,overlayMoreButton:activeRecordingsOnly,action:activeRecordingsOnly?"none":null,centerPlayButton:activeRecordingsOnly})}}function loadLatestLiveTvRecordings(elem,activeRecordingsOnly,apiClient,userId){var title=activeRecordingsOnly?globalize.translate("sharedcomponents#HeaderActiveRecordings"):globalize.translate("sharedcomponents#HeaderLatestRecordings"),html="";html+='
',html+='

'+title+"

",layoutManager.tv,html+="
",enableScrollX()?html+='
':html+='
',enableScrollX()&&(html+="
"),html+="
",elem.classList.add("hide"),elem.innerHTML=html;var itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getLatestRecordingsFetchFn(apiClient.serverId(),activeRecordingsOnly),itemsContainer.getItemsHtml=getLatestRecordingItemsHtml(activeRecordingsOnly),itemsContainer.parentContainer=elem}return{loadLibraryTiles:loadLibraryTiles,getDefaultSection:getDefaultSection,loadSections:loadSections,destroySections:destroySections,pause:pause,resume:resume}}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js index f91873166c..04d17bfbcb 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js @@ -1 +1 @@ -define(["apphost","globalize","connectionManager","itemHelper","appRouter","playbackManager","loading","appSettings","browser","actionsheet"],function(appHost,globalize,connectionManager,itemHelper,appRouter,playbackManager,loading,appSettings,browser,actionsheet){"use strict";function getCommands(options){var item=options.item,canPlay=playbackManager.canPlay(item),commands=[],user=options.user,restrictOptions=(browser.operaTv||browser.web0s)&&!user.Policy.IsAdministrator;canPlay&&"Photo"!==item.MediaType&&(!1!==options.play&&commands.push({name:globalize.translate("sharedcomponents#Play"),id:"resume"}),options.playAllFromHere&&"Program"!==item.Type&&"TvChannel"!==item.Type&&commands.push({name:globalize.translate("sharedcomponents#PlayAllFromHere"),id:"playallfromhere"})),playbackManager.canQueue(item)&&(!1!==options.queue&&commands.push({name:globalize.translate("sharedcomponents#AddToPlayQueue"),id:"queue"}),!1!==options.queue&&commands.push({name:globalize.translate("sharedcomponents#PlayNext"),id:"queuenext"})),(item.IsFolder||"MusicArtist"===item.Type||"MusicGenre"===item.Type)&&!1!==options.shuffle&&commands.push({name:globalize.translate("sharedcomponents#Shuffle"),id:"shuffle"}),"Audio"!==item.MediaType&&"MusicAlbum"!==item.Type&&"MusicArtist"!==item.Type&&"MusicGenre"!==item.Type||!1===options.instantMix||itemHelper.isLocalItem(item)||commands.push({name:globalize.translate("sharedcomponents#InstantMix"),id:"instantmix"}),commands.length&&commands.push({divider:!0}),restrictOptions||(itemHelper.supportsAddingToCollection(item)&&commands.push({name:globalize.translate("sharedcomponents#AddToCollection"),id:"addtocollection"}),itemHelper.supportsAddingToPlaylist(item)&&commands.push({name:globalize.translate("sharedcomponents#AddToPlaylist"),id:"addtoplaylist"})),"Timer"===item.Type&&user.Policy.EnableLiveTvManagement&&!1!==options.cancelTimer&&commands.push({name:globalize.translate("sharedcomponents#CancelRecording"),id:"canceltimer"}),"Recording"===item.Type&&"InProgress"===item.Status&&user.Policy.EnableLiveTvManagement&&!1!==options.cancelTimer&&commands.push({name:globalize.translate("sharedcomponents#CancelRecording"),id:"canceltimer"}),"SeriesTimer"===item.Type&&user.Policy.EnableLiveTvManagement&&!1!==options.cancelTimer&&commands.push({name:globalize.translate("sharedcomponents#CancelSeries"),id:"cancelseriestimer"}),itemHelper.canConvert(item,user,connectionManager.getApiClient(item))&&commands.push({name:globalize.translate("sharedcomponents#Convert"),id:"convert"}),item.CanDelete&&!1!==options.deleteItem&&("Playlist"===item.Type||"BoxSet"===item.Type?commands.push({name:globalize.translate("sharedcomponents#Delete"),id:"delete"}):commands.push({name:globalize.translate("sharedcomponents#DeleteMedia"),id:"delete"})),item.CanDownload&&appHost.supports("filedownload")&&commands.push({name:globalize.translate("sharedcomponents#Download"),id:"download"}),appHost.supports("sync")&&!1!==options.syncLocal&&itemHelper.canSync(user,item)&&commands.push({name:globalize.translate("sharedcomponents#Download"),id:"synclocal"});var canEdit=itemHelper.canEdit(user,item);if(canEdit&&!1!==options.edit&&"SeriesTimer"!==item.Type){var text="Timer"===item.Type||"SeriesTimer"===item.Type?globalize.translate("sharedcomponents#Edit"):globalize.translate("sharedcomponents#EditMetadata");commands.push({name:text,id:"edit"})}return itemHelper.canEditImages(user,item)&&!1!==options.editImages&&commands.push({name:globalize.translate("sharedcomponents#EditImages"),id:"editimages"}),canEdit&&("Video"!==item.MediaType||"TvChannel"===item.Type||"Program"===item.Type||"Virtual"===item.LocationType||"Recording"===item.Type&&"Completed"!==item.Status||!1!==options.editSubtitles&&commands.push({name:globalize.translate("sharedcomponents#EditSubtitles"),id:"editsubtitles"})),!1!==options.identify&&itemHelper.canIdentify(user,item)&&commands.push({name:globalize.translate("sharedcomponents#Identify"),id:"identify"}),"Program"===item.Type&&!1!==options.record&&item.TimerId&&commands.push({name:Globalize.translate("sharedcomponents#ManageRecording"),id:"record"}),"Program"===item.Type&&!1!==options.record&&(item.TimerId||commands.push({name:Globalize.translate("sharedcomponents#Record"),id:"record"})),itemHelper.canRefreshMetadata(item,user)&&commands.push({name:globalize.translate("sharedcomponents#RefreshMetadata"),id:"refresh"}),item.PlaylistItemId&&options.playlistId&&commands.push({name:globalize.translate("sharedcomponents#RemoveFromPlaylist"),id:"removefromplaylist"}),options.collectionId&&commands.push({name:globalize.translate("sharedcomponents#RemoveFromCollection"),id:"removefromcollection"}),restrictOptions||!0===options.share&&itemHelper.canShare(item,user)&&commands.push({name:globalize.translate("sharedcomponents#Share"),id:"share"}),!1!==options.sync&&itemHelper.canSync(user,item)&&commands.push({name:globalize.translate("sharedcomponents#Sync"),id:"sync"}),!1!==options.openAlbum&&item.AlbumId&&"Photo"!==item.MediaType&&commands.push({name:Globalize.translate("sharedcomponents#ViewAlbum"),id:"album"}),!1!==options.openArtist&&item.ArtistItems&&item.ArtistItems.length&&commands.push({name:Globalize.translate("sharedcomponents#ViewArtist"),id:"artist"}),commands}function getResolveFunction(resolve,id,changed,deleted){return function(){resolve({command:id,updated:changed,deleted:deleted})}}function executeCommand(item,id,options){var itemId=item.Id,serverId=item.ServerId,apiClient=connectionManager.getApiClient(serverId);return new Promise(function(resolve,reject){switch(id){case"addtocollection":require(["collectionEditor"],function(collectionEditor){(new collectionEditor).show({items:[itemId],serverId:serverId}).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"addtoplaylist":require(["playlistEditor"],function(playlistEditor){(new playlistEditor).show({items:[itemId],serverId:serverId}).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"download":require(["fileDownloader"],function(fileDownloader){var downloadHref=apiClient.getItemDownloadUrl(itemId);fileDownloader.download([{url:downloadHref,itemId:itemId,serverId:serverId}]),getResolveFunction(getResolveFunction(resolve,id),id)()});break;case"editsubtitles":require(["subtitleEditor"],function(subtitleEditor){subtitleEditor.show(itemId,serverId).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"edit":editItem(apiClient,item).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id));break;case"editimages":require(["imageEditor"],function(imageEditor){imageEditor.show({itemId:itemId,serverId:serverId}).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"identify":require(["itemIdentifier"],function(itemIdentifier){itemIdentifier.show(itemId,serverId).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"refresh":refresh(apiClient,item),getResolveFunction(resolve,id)();break;case"open":appRouter.showItem(item),getResolveFunction(resolve,id)();break;case"play":play(item,!1),getResolveFunction(resolve,id)();break;case"resume":play(item,!0),getResolveFunction(resolve,id)();break;case"queue":play(item,!1,!0),getResolveFunction(resolve,id)();break;case"queuenext":play(item,!1,!0,!0),getResolveFunction(resolve,id)();break;case"record":require(["recordingCreator"],function(recordingCreator){recordingCreator.show(itemId,serverId).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"shuffle":playbackManager.shuffle(item),getResolveFunction(resolve,id)();break;case"instantmix":playbackManager.instantMix(item),getResolveFunction(resolve,id)();break;case"delete":deleteItem(apiClient,item).then(getResolveFunction(resolve,id,!0,!0),getResolveFunction(resolve,id));break;case"share":navigator.share({title:item.Name,text:item.Overview,url:"https://emby.media"});break;case"album":appRouter.showItem(item.AlbumId,item.ServerId),getResolveFunction(resolve,id)();break;case"artist":appRouter.showItem(item.ArtistItems[0].Id,item.ServerId),getResolveFunction(resolve,id)();break;case"playallfromhere":case"queueallfromhere":getResolveFunction(resolve,id)();break;case"convert":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:[item],serverId:serverId,mode:"convert"})}),getResolveFunction(resolve,id)();break;case"sync":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:[item],serverId:serverId,mode:"sync"})}),getResolveFunction(resolve,id)();break;case"synclocal":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:[item],serverId:serverId,mode:"download"})}),getResolveFunction(resolve,id)();break;case"removefromplaylist":apiClient.ajax({url:apiClient.getUrl("Playlists/"+options.playlistId+"/Items",{EntryIds:[item.PlaylistItemId].join(",")}),type:"DELETE"}).then(function(){getResolveFunction(resolve,id,!0)()});break;case"removefromcollection":apiClient.ajax({type:"DELETE",url:apiClient.getUrl("Collections/"+options.collectionId+"/Items",{Ids:[item.Id].join(",")})}).then(function(){getResolveFunction(resolve,id,!0)()});break;case"canceltimer":deleteTimer(apiClient,item,resolve,id);break;case"cancelseriestimer":deleteSeriesTimer(apiClient,item,resolve,id);break;default:reject()}})}function deleteTimer(apiClient,item,resolve,command){require(["recordingHelper"],function(recordingHelper){var timerId=item.TimerId||item.Id;recordingHelper.cancelTimerWithConfirmation(timerId,item.ServerId).then(function(){getResolveFunction(resolve,command,!0)()})})}function deleteSeriesTimer(apiClient,item,resolve,command){require(["recordingHelper"],function(recordingHelper){recordingHelper.cancelSeriesTimerWithConfirmation(item.Id,item.ServerId).then(function(){getResolveFunction(resolve,command,!0)()})})}function play(item,resume,queue,queueNext){var method=queue?queueNext?"queueNext":"queue":"play",startPosition=0;resume&&item.UserData&&item.UserData.PlaybackPositionTicks&&(startPosition=item.UserData.PlaybackPositionTicks),"Program"===item.Type?playbackManager[method]({ids:[item.ChannelId],startPositionTicks:startPosition,serverId:item.ServerId}):playbackManager[method]({items:[item],startPositionTicks:startPosition})}function editItem(apiClient,item){return new Promise(function(resolve,reject){var serverId=apiClient.serverInfo().Id;"Timer"===item.Type?require(["recordingEditor"],function(recordingEditor){recordingEditor.show(item.Id,serverId).then(resolve,reject)}):"SeriesTimer"===item.Type?require(["seriesRecordingEditor"],function(recordingEditor){recordingEditor.show(item.Id,serverId).then(resolve,reject)}):require(["metadataEditor"],function(metadataEditor){metadataEditor.show(item.Id,serverId).then(resolve,reject)})})}function deleteItem(apiClient,item){return new Promise(function(resolve,reject){require(["deleteHelper"],function(deleteHelper){deleteHelper.deleteItem({item:item,navigate:!1}).then(function(){resolve(!0)},reject)})})}function refresh(apiClient,item){require(["refreshDialog"],function(refreshDialog){new refreshDialog({itemIds:[item.Id],serverId:apiClient.serverInfo().Id,mode:"CollectionFolder"===item.Type?"scan":null}).show()})}function show(options){var commands=getCommands(options);return commands.length?actionsheet.show({items:commands,positionTo:options.positionTo,resolveOnClick:["share"]}).then(function(id){return executeCommand(options.item,id,options)}):Promise.reject()}return{getCommands:getCommands,show:show}}); \ No newline at end of file +define(["apphost","globalize","connectionManager","itemHelper","appRouter","playbackManager","loading","appSettings","browser","actionsheet"],function(appHost,globalize,connectionManager,itemHelper,appRouter,playbackManager,loading,appSettings,browser,actionsheet){"use strict";function getCommands(options){var item=options.item,canPlay=playbackManager.canPlay(item),commands=[],user=options.user,restrictOptions=(browser.operaTv||browser.web0s)&&!user.Policy.IsAdministrator;canPlay&&"Photo"!==item.MediaType&&(!1!==options.play&&commands.push({name:globalize.translate("sharedcomponents#Play"),id:"resume"}),options.playAllFromHere&&"Program"!==item.Type&&"TvChannel"!==item.Type&&commands.push({name:globalize.translate("sharedcomponents#PlayAllFromHere"),id:"playallfromhere"})),playbackManager.canQueue(item)&&(!1!==options.queue&&commands.push({name:globalize.translate("sharedcomponents#AddToPlayQueue"),id:"queue"}),!1!==options.queue&&commands.push({name:globalize.translate("sharedcomponents#PlayNext"),id:"queuenext"})),(item.IsFolder||"MusicArtist"===item.Type||"MusicGenre"===item.Type)&&"livetv"!==item.CollectionType&&!1!==options.shuffle&&commands.push({name:globalize.translate("sharedcomponents#Shuffle"),id:"shuffle"}),"Audio"!==item.MediaType&&"MusicAlbum"!==item.Type&&"MusicArtist"!==item.Type&&"MusicGenre"!==item.Type||!1===options.instantMix||itemHelper.isLocalItem(item)||commands.push({name:globalize.translate("sharedcomponents#InstantMix"),id:"instantmix"}),commands.length&&commands.push({divider:!0}),restrictOptions||(itemHelper.supportsAddingToCollection(item)&&commands.push({name:globalize.translate("sharedcomponents#AddToCollection"),id:"addtocollection"}),itemHelper.supportsAddingToPlaylist(item)&&commands.push({name:globalize.translate("sharedcomponents#AddToPlaylist"),id:"addtoplaylist"})),"Timer"===item.Type&&user.Policy.EnableLiveTvManagement&&!1!==options.cancelTimer&&commands.push({name:globalize.translate("sharedcomponents#CancelRecording"),id:"canceltimer"}),"Recording"===item.Type&&"InProgress"===item.Status&&user.Policy.EnableLiveTvManagement&&!1!==options.cancelTimer&&commands.push({name:globalize.translate("sharedcomponents#CancelRecording"),id:"canceltimer"}),"SeriesTimer"===item.Type&&user.Policy.EnableLiveTvManagement&&!1!==options.cancelTimer&&commands.push({name:globalize.translate("sharedcomponents#CancelSeries"),id:"cancelseriestimer"}),itemHelper.canConvert(item,user,connectionManager.getApiClient(item))&&commands.push({name:globalize.translate("sharedcomponents#Convert"),id:"convert"}),item.CanDelete&&!1!==options.deleteItem&&("Playlist"===item.Type||"BoxSet"===item.Type?commands.push({name:globalize.translate("sharedcomponents#Delete"),id:"delete"}):commands.push({name:globalize.translate("sharedcomponents#DeleteMedia"),id:"delete"})),item.CanDownload&&appHost.supports("filedownload")&&commands.push({name:globalize.translate("sharedcomponents#Download"),id:"download"}),appHost.supports("sync")&&!1!==options.syncLocal&&itemHelper.canSync(user,item)&&commands.push({name:globalize.translate("sharedcomponents#Download"),id:"synclocal"});var canEdit=itemHelper.canEdit(user,item);if(canEdit&&!1!==options.edit&&"SeriesTimer"!==item.Type){var text="Timer"===item.Type||"SeriesTimer"===item.Type?globalize.translate("sharedcomponents#Edit"):globalize.translate("sharedcomponents#EditMetadata");commands.push({name:text,id:"edit"})}return itemHelper.canEditImages(user,item)&&!1!==options.editImages&&commands.push({name:globalize.translate("sharedcomponents#EditImages"),id:"editimages"}),canEdit&&("Video"!==item.MediaType||"TvChannel"===item.Type||"Program"===item.Type||"Virtual"===item.LocationType||"Recording"===item.Type&&"Completed"!==item.Status||!1!==options.editSubtitles&&commands.push({name:globalize.translate("sharedcomponents#EditSubtitles"),id:"editsubtitles"})),!1!==options.identify&&itemHelper.canIdentify(user,item)&&commands.push({name:globalize.translate("sharedcomponents#Identify"),id:"identify"}),"Program"===item.Type&&!1!==options.record&&item.TimerId&&commands.push({name:Globalize.translate("sharedcomponents#ManageRecording"),id:"record"}),"Program"===item.Type&&!1!==options.record&&(item.TimerId||commands.push({name:Globalize.translate("sharedcomponents#Record"),id:"record"})),itemHelper.canRefreshMetadata(item,user)&&commands.push({name:globalize.translate("sharedcomponents#RefreshMetadata"),id:"refresh"}),item.PlaylistItemId&&options.playlistId&&commands.push({name:globalize.translate("sharedcomponents#RemoveFromPlaylist"),id:"removefromplaylist"}),options.collectionId&&commands.push({name:globalize.translate("sharedcomponents#RemoveFromCollection"),id:"removefromcollection"}),restrictOptions||!0===options.share&&itemHelper.canShare(item,user)&&commands.push({name:globalize.translate("sharedcomponents#Share"),id:"share"}),!1!==options.sync&&itemHelper.canSync(user,item)&&commands.push({name:globalize.translate("sharedcomponents#Sync"),id:"sync"}),!1!==options.openAlbum&&item.AlbumId&&"Photo"!==item.MediaType&&commands.push({name:Globalize.translate("sharedcomponents#ViewAlbum"),id:"album"}),!1!==options.openArtist&&item.ArtistItems&&item.ArtistItems.length&&commands.push({name:Globalize.translate("sharedcomponents#ViewArtist"),id:"artist"}),commands}function getResolveFunction(resolve,id,changed,deleted){return function(){resolve({command:id,updated:changed,deleted:deleted})}}function executeCommand(item,id,options){var itemId=item.Id,serverId=item.ServerId,apiClient=connectionManager.getApiClient(serverId);return new Promise(function(resolve,reject){switch(id){case"addtocollection":require(["collectionEditor"],function(collectionEditor){(new collectionEditor).show({items:[itemId],serverId:serverId}).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"addtoplaylist":require(["playlistEditor"],function(playlistEditor){(new playlistEditor).show({items:[itemId],serverId:serverId}).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"download":require(["fileDownloader"],function(fileDownloader){var downloadHref=apiClient.getItemDownloadUrl(itemId);fileDownloader.download([{url:downloadHref,itemId:itemId,serverId:serverId}]),getResolveFunction(getResolveFunction(resolve,id),id)()});break;case"editsubtitles":require(["subtitleEditor"],function(subtitleEditor){subtitleEditor.show(itemId,serverId).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"edit":editItem(apiClient,item).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id));break;case"editimages":require(["imageEditor"],function(imageEditor){imageEditor.show({itemId:itemId,serverId:serverId}).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"identify":require(["itemIdentifier"],function(itemIdentifier){itemIdentifier.show(itemId,serverId).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"refresh":refresh(apiClient,item),getResolveFunction(resolve,id)();break;case"open":appRouter.showItem(item),getResolveFunction(resolve,id)();break;case"play":play(item,!1),getResolveFunction(resolve,id)();break;case"resume":play(item,!0),getResolveFunction(resolve,id)();break;case"queue":play(item,!1,!0),getResolveFunction(resolve,id)();break;case"queuenext":play(item,!1,!0,!0),getResolveFunction(resolve,id)();break;case"record":require(["recordingCreator"],function(recordingCreator){recordingCreator.show(itemId,serverId).then(getResolveFunction(resolve,id,!0),getResolveFunction(resolve,id))});break;case"shuffle":playbackManager.shuffle(item),getResolveFunction(resolve,id)();break;case"instantmix":playbackManager.instantMix(item),getResolveFunction(resolve,id)();break;case"delete":deleteItem(apiClient,item).then(getResolveFunction(resolve,id,!0,!0),getResolveFunction(resolve,id));break;case"share":navigator.share({title:item.Name,text:item.Overview,url:"https://emby.media"});break;case"album":appRouter.showItem(item.AlbumId,item.ServerId),getResolveFunction(resolve,id)();break;case"artist":appRouter.showItem(item.ArtistItems[0].Id,item.ServerId),getResolveFunction(resolve,id)();break;case"playallfromhere":case"queueallfromhere":getResolveFunction(resolve,id)();break;case"convert":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:[item],serverId:serverId,mode:"convert"})}),getResolveFunction(resolve,id)();break;case"sync":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:[item],serverId:serverId,mode:"sync"})}),getResolveFunction(resolve,id)();break;case"synclocal":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:[item],serverId:serverId,mode:"download"})}),getResolveFunction(resolve,id)();break;case"removefromplaylist":apiClient.ajax({url:apiClient.getUrl("Playlists/"+options.playlistId+"/Items",{EntryIds:[item.PlaylistItemId].join(",")}),type:"DELETE"}).then(function(){getResolveFunction(resolve,id,!0)()});break;case"removefromcollection":apiClient.ajax({type:"DELETE",url:apiClient.getUrl("Collections/"+options.collectionId+"/Items",{Ids:[item.Id].join(",")})}).then(function(){getResolveFunction(resolve,id,!0)()});break;case"canceltimer":deleteTimer(apiClient,item,resolve,id);break;case"cancelseriestimer":deleteSeriesTimer(apiClient,item,resolve,id);break;default:reject()}})}function deleteTimer(apiClient,item,resolve,command){require(["recordingHelper"],function(recordingHelper){var timerId=item.TimerId||item.Id;recordingHelper.cancelTimerWithConfirmation(timerId,item.ServerId).then(function(){getResolveFunction(resolve,command,!0)()})})}function deleteSeriesTimer(apiClient,item,resolve,command){require(["recordingHelper"],function(recordingHelper){recordingHelper.cancelSeriesTimerWithConfirmation(item.Id,item.ServerId).then(function(){getResolveFunction(resolve,command,!0)()})})}function play(item,resume,queue,queueNext){var method=queue?queueNext?"queueNext":"queue":"play",startPosition=0;resume&&item.UserData&&item.UserData.PlaybackPositionTicks&&(startPosition=item.UserData.PlaybackPositionTicks),"Program"===item.Type?playbackManager[method]({ids:[item.ChannelId],startPositionTicks:startPosition,serverId:item.ServerId}):playbackManager[method]({items:[item],startPositionTicks:startPosition})}function editItem(apiClient,item){return new Promise(function(resolve,reject){var serverId=apiClient.serverInfo().Id;"Timer"===item.Type?require(["recordingEditor"],function(recordingEditor){recordingEditor.show(item.Id,serverId).then(resolve,reject)}):"SeriesTimer"===item.Type?require(["seriesRecordingEditor"],function(recordingEditor){recordingEditor.show(item.Id,serverId).then(resolve,reject)}):require(["metadataEditor"],function(metadataEditor){metadataEditor.show(item.Id,serverId).then(resolve,reject)})})}function deleteItem(apiClient,item){return new Promise(function(resolve,reject){require(["deleteHelper"],function(deleteHelper){deleteHelper.deleteItem({item:item,navigate:!1}).then(function(){resolve(!0)},reject)})})}function refresh(apiClient,item){require(["refreshDialog"],function(refreshDialog){new refreshDialog({itemIds:[item.Id],serverId:apiClient.serverInfo().Id,mode:"CollectionFolder"===item.Type?"scan":null}).show()})}function show(options){var commands=getCommands(options);return commands.length?actionsheet.show({items:commands,positionTo:options.positionTo,resolveOnClick:["share"]}).then(function(id){return executeCommand(options.item,id,options)}):Promise.reject()}return{getCommands:getCommands,show:show}}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js index cedb30eb92..6bfa100011 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js @@ -1 +1 @@ -define(["apphost","globalize"],function(appHost,globalize){"use strict";function getDisplayName(item,options){if(!item)throw new Error("null item passed into getDisplayName");options=options||{},"Timer"===item.Type&&(item=item.ProgramInfo||item);var name=("Program"!==item.Type&&"Recording"!==item.Type||!item.IsSeries&&!item.EpisodeTitle?item.Name:item.EpisodeTitle)||"";if("TvChannel"===item.Type)return item.ChannelNumber?item.ChannelNumber+" "+name:name;if("Episode"===item.Type&&0===item.ParentIndexNumber)name=globalize.translate("sharedcomponents#ValueSpecialEpisodeName",name);else if(("Episode"===item.Type||"Program"===item.Type)&&null!=item.IndexNumber&&null!=item.ParentIndexNumber&&!1!==options.includeIndexNumber){var displayIndexNumber=item.IndexNumber,number=displayIndexNumber,nameSeparator=" - ";!1!==options.includeParentInfo?number="S"+item.ParentIndexNumber+":E"+number:nameSeparator=". ",item.IndexNumberEnd&&(displayIndexNumber=item.IndexNumberEnd,number+="-"+displayIndexNumber),number&&(name=name?number+nameSeparator+name:number)}return name}function supportsAddingToCollection(item){var invalidTypes=["Genre","MusicGenre","Studio","GameGenre","UserView","CollectionFolder","Audio","Program","Timer","SeriesTimer"];return("Recording"!==item.Type||"Completed"===item.Status)&&(!item.CollectionType&&-1===invalidTypes.indexOf(item.Type)&&"Photo"!==item.MediaType&&!isLocalItem(item))}function supportsAddingToPlaylist(item){return"Program"!==item.Type&&("TvChannel"!==item.Type&&("Timer"!==item.Type&&("SeriesTimer"!==item.Type&&("Photo"!==item.MediaType&&(("Recording"!==item.Type||"Completed"===item.Status)&&(!isLocalItem(item)&&(item.MediaType||item.IsFolder||"Genre"===item.Type||"MusicGenre"===item.Type||"MusicArtist"===item.Type)))))))}function canEdit(user,item){var itemType=item.Type;return"UserRootFolder"!==itemType&&"UserView"!==itemType&&("Program"!==itemType&&("Timer"!==itemType&&("SeriesTimer"!==itemType&&(("Recording"!==item.Type||"Completed"===item.Status)&&(!isLocalItem(item)&&user.Policy.IsAdministrator)))))}function isLocalItem(item){return!(!item||!item.Id||0!==item.Id.indexOf("local"))}return{getDisplayName:getDisplayName,supportsAddingToCollection:supportsAddingToCollection,supportsAddingToPlaylist:supportsAddingToPlaylist,isLocalItem:isLocalItem,canIdentify:function(user,item){var itemType=item.Type;return!("Movie"!==itemType&&"Trailer"!==itemType&&"Series"!==itemType&&"Game"!==itemType&&"BoxSet"!==itemType&&"Person"!==itemType&&"Book"!==itemType&&"MusicAlbum"!==itemType&&"MusicArtist"!==itemType&&"MusicVideo"!==itemType||!user.Policy.IsAdministrator||isLocalItem(item))},canEdit:canEdit,canEditImages:function(user,item){var itemType=item.Type;return"Photo"!==item.MediaType&&("UserView"===itemType?!!user.Policy.IsAdministrator:("Recording"!==item.Type||"Completed"===item.Status)&&("Timer"!==itemType&&"SeriesTimer"!==itemType&&canEdit(user,item)&&!isLocalItem(item)))},canSync:function(user,item){return!(user&&!user.Policy.EnableContentDownloading)&&(!isLocalItem(item)&&item.SupportsSync)},canShare:function(item,user){return"Program"!==item.Type&&("TvChannel"!==item.Type&&("Timer"!==item.Type&&("SeriesTimer"!==item.Type&&(("Recording"!==item.Type||"Completed"===item.Status)&&(!isLocalItem(item)&&(user.Policy.EnablePublicSharing&&appHost.supports("sharing")))))))},enableDateAddedDisplay:function(item){return!item.IsFolder&&item.MediaType&&"Program"!==item.Type&&"TvChannel"!==item.Type&&"Trailer"!==item.Type},canMarkPlayed:function(item){if("Program"===item.Type)return!1;if("Video"===item.MediaType){if("TvChannel"!==item.Type)return!0}else if("Audio"===item.MediaType){if("AudioPodcast"===item.Type)return!0;if("AudioBook"===item.Type)return!0}return"Series"===item.Type||"Season"===item.Type||"BoxSet"===item.Type||"Game"===item.MediaType||"Book"===item.MediaType||"Recording"===item.MediaType},canRate:function(item){return"Program"!==item.Type&&"Timer"!==item.Type&&"SeriesTimer"!==item.Type&&"CollectionFolder"!==item.Type&&"UserView"!==item.Type&&"Channel"!==item.Type},canConvert:function(item,user){if(!item.SupportsSync)return!1;if(isLocalItem(item))return!1;var mediaType=item.MediaType;return"Book"!==mediaType&&"Photo"!==mediaType&&"Game"!==mediaType&&"Audio"!==mediaType&&("livetv"!==item.CollectionType&&("Channel"!==item.Type&&!!user.Policy.EnableMediaConversion))},canRefreshMetadata:function(item,user){return!(!user.Policy.IsAdministrator||"Timer"===item.Type||"SeriesTimer"===item.Type||"Program"===item.Type||"TvChannel"===item.Type||"Recording"===item.Type&&"Completed"!==item.Status||isLocalItem(item))},supportsMediaSourceSelection:function(item){return"Video"===item.MediaType&&("TvChannel"!==item.Type&&(!(!item.MediaSources||1===item.MediaSources.length&&"Placeholder"===item.MediaSources[0].Type)&&(!1!==item.EnableMediaSourceDisplay&&(null!=item.EnableMediaSourceDisplay||!item.SourceType||"Library"===item.SourceType))))}}}); \ No newline at end of file +define(["apphost","globalize"],function(appHost,globalize){"use strict";function getDisplayName(item,options){if(!item)throw new Error("null item passed into getDisplayName");options=options||{},"Timer"===item.Type&&(item=item.ProgramInfo||item);var name=("Program"!==item.Type&&"Recording"!==item.Type||!item.IsSeries&&!item.EpisodeTitle?item.Name:item.EpisodeTitle)||"";if("TvChannel"===item.Type)return item.ChannelNumber?item.ChannelNumber+" "+name:name;if("Episode"===item.Type&&0===item.ParentIndexNumber)name=globalize.translate("sharedcomponents#ValueSpecialEpisodeName",name);else if(("Episode"===item.Type||"Program"===item.Type)&&null!=item.IndexNumber&&null!=item.ParentIndexNumber&&!1!==options.includeIndexNumber){var displayIndexNumber=item.IndexNumber,number=displayIndexNumber,nameSeparator=" - ";!1!==options.includeParentInfo?number="S"+item.ParentIndexNumber+":E"+number:nameSeparator=". ",item.IndexNumberEnd&&(displayIndexNumber=item.IndexNumberEnd,number+="-"+displayIndexNumber),number&&(name=name?number+nameSeparator+name:number)}return name}function supportsAddingToCollection(item){var invalidTypes=["Genre","MusicGenre","Studio","GameGenre","UserView","CollectionFolder","Audio","Program","Timer","SeriesTimer"];return("Recording"!==item.Type||"Completed"===item.Status)&&(!item.CollectionType&&-1===invalidTypes.indexOf(item.Type)&&"Photo"!==item.MediaType&&!isLocalItem(item))}function supportsAddingToPlaylist(item){return"Program"!==item.Type&&("TvChannel"!==item.Type&&("Timer"!==item.Type&&("SeriesTimer"!==item.Type&&("Photo"!==item.MediaType&&(("Recording"!==item.Type||"Completed"===item.Status)&&(!isLocalItem(item)&&("livetv"!==item.CollectionType&&(item.MediaType||item.IsFolder||"Genre"===item.Type||"MusicGenre"===item.Type||"MusicArtist"===item.Type))))))))}function canEdit(user,item){var itemType=item.Type;return"UserRootFolder"!==itemType&&"UserView"!==itemType&&("Program"!==itemType&&("Timer"!==itemType&&("SeriesTimer"!==itemType&&(("Recording"!==item.Type||"Completed"===item.Status)&&(!isLocalItem(item)&&user.Policy.IsAdministrator)))))}function isLocalItem(item){return!(!item||!item.Id||0!==item.Id.indexOf("local"))}return{getDisplayName:getDisplayName,supportsAddingToCollection:supportsAddingToCollection,supportsAddingToPlaylist:supportsAddingToPlaylist,isLocalItem:isLocalItem,canIdentify:function(user,item){var itemType=item.Type;return!("Movie"!==itemType&&"Trailer"!==itemType&&"Series"!==itemType&&"Game"!==itemType&&"BoxSet"!==itemType&&"Person"!==itemType&&"Book"!==itemType&&"MusicAlbum"!==itemType&&"MusicArtist"!==itemType&&"MusicVideo"!==itemType||!user.Policy.IsAdministrator||isLocalItem(item))},canEdit:canEdit,canEditImages:function(user,item){var itemType=item.Type;return"Photo"!==item.MediaType&&("UserView"===itemType?!!user.Policy.IsAdministrator:("Recording"!==item.Type||"Completed"===item.Status)&&("Timer"!==itemType&&"SeriesTimer"!==itemType&&canEdit(user,item)&&!isLocalItem(item)))},canSync:function(user,item){return!(user&&!user.Policy.EnableContentDownloading)&&(!isLocalItem(item)&&item.SupportsSync)},canShare:function(item,user){return"Program"!==item.Type&&("TvChannel"!==item.Type&&("Timer"!==item.Type&&("SeriesTimer"!==item.Type&&(("Recording"!==item.Type||"Completed"===item.Status)&&(!isLocalItem(item)&&(user.Policy.EnablePublicSharing&&appHost.supports("sharing")))))))},enableDateAddedDisplay:function(item){return!item.IsFolder&&item.MediaType&&"Program"!==item.Type&&"TvChannel"!==item.Type&&"Trailer"!==item.Type},canMarkPlayed:function(item){if("Program"===item.Type)return!1;if("Video"===item.MediaType){if("TvChannel"!==item.Type)return!0}else if("Audio"===item.MediaType){if("AudioPodcast"===item.Type)return!0;if("AudioBook"===item.Type)return!0}return"Series"===item.Type||"Season"===item.Type||"BoxSet"===item.Type||"Game"===item.MediaType||"Book"===item.MediaType||"Recording"===item.MediaType},canRate:function(item){return"Program"!==item.Type&&"Timer"!==item.Type&&"SeriesTimer"!==item.Type&&"CollectionFolder"!==item.Type&&"UserView"!==item.Type&&"Channel"!==item.Type},canConvert:function(item,user){if(!item.SupportsSync)return!1;if(isLocalItem(item))return!1;var mediaType=item.MediaType;return"Book"!==mediaType&&"Photo"!==mediaType&&"Game"!==mediaType&&"Audio"!==mediaType&&("livetv"!==item.CollectionType&&("Channel"!==item.Type&&!!user.Policy.EnableMediaConversion))},canRefreshMetadata:function(item,user){if(user.Policy.IsAdministrator){if("livetv"===item.CollectionType)return!1;if("Timer"!==item.Type&&"SeriesTimer"!==item.Type&&"Program"!==item.Type&&"TvChannel"!==item.Type&&("Recording"!==item.Type||"Completed"===item.Status)&&!isLocalItem(item))return!0}return!1},supportsMediaSourceSelection:function(item){return"Video"===item.MediaType&&("TvChannel"!==item.Type&&(!(!item.MediaSources||1===item.MediaSources.length&&"Placeholder"===item.MediaSources[0].Type)&&(!1!==item.EnableMediaSourceDisplay&&(null!=item.EnableMediaSourceDisplay||!item.SourceType||"Library"===item.SourceType))))}}}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/lazyloader/lazyloader-intersectionobserver.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/lazyloader/lazyloader-intersectionobserver.js index ffde1532cb..f31fe3d2a8 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/lazyloader/lazyloader-intersectionobserver.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/lazyloader/lazyloader-intersectionobserver.js @@ -1 +1 @@ -define(["require","browser"],function(require,browser){"use strict";function LazyLoader(options){this.options=options}function unveilElements(elements,root,callback){if(elements.length){new LazyLoader({callback:callback}).addElements(elements)}}return browser.edge&&require(["css!./lazyedgehack"]),LazyLoader.prototype.createObserver=function(){var observerOptions={},options=this.options,loadedCount=0,callback=options.callback;observerOptions.rootMargin="40%";var observerId="obs"+(new Date).getTime(),self=this,observer=new IntersectionObserver(function(entries){for(var j=0,length2=entries.length;j0){var target=entry.target;observer.unobserve(target),target[observerId]||(target[observerId]=1,callback(target),++loadedCount>=self.elementCount&&self.destroyObserver())}}},observerOptions);this.observer=observer},LazyLoader.prototype.addElements=function(elements){var observer=this.observer;observer||(this.createObserver(),observer=this.observer),this.elementCount=(this.elementCount||0)+elements.length;for(var i=0,length=elements.length;i0){var target=entry.target;observer.unobserve(target),target[observerId]||(target[observerId]=1,callback(target),++loadedCount>=self.elementCount&&self.destroyObserver())}}},observerOptions);this.observer=observer},LazyLoader.prototype.addElements=function(elements){var observer=this.observer;observer||(this.createObserver(),observer=this.observer),this.elementCount=(this.elementCount||0)+elements.length;for(var i=0,length=elements.length;i'+icon+""}return function(options){function createElements(options){dlg=dialogHelper.createDialog({exitAnimationDuration:options.interactive?400:800,size:"fullscreen",autoFocus:!1,scrollY:!1,exitAnimation:"fadeout",removeOnClose:!0}),dlg.classList.add("slideshowDialog");var html="";if(options.interactive){var actionButtonsOnTop=layoutManager.mobile;html+="
",html+='
',html+=getIcon("keyboard_arrow_left","btnSlideshowPrevious slideshowButton hide-mouse-idle-tv",!1),html+=getIcon("keyboard_arrow_right","btnSlideshowNext slideshowButton hide-mouse-idle-tv",!1),html+='
',actionButtonsOnTop&&(appHost.supports("filedownload")&&(html+=getIcon("file_download","btnDownload slideshowButton",!0)),appHost.supports("sharing")&&(html+=getIcon("share","btnShare slideshowButton",!0))),html+=getIcon("close","slideshowButton btnSlideshowExit hide-mouse-idle-tv",!1),html+="
",actionButtonsOnTop||(html+='
',html+=getIcon("pause","btnSlideshowPause slideshowButton",!0,!0),appHost.supports("filedownload")&&(html+=getIcon("file_download","btnDownload slideshowButton",!0)),appHost.supports("sharing")&&(html+=getIcon("share","btnShare slideshowButton",!0)),html+="
"),html+="
"}else html+='

';if(dlg.innerHTML=html,options.interactive){dlg.querySelector(".btnSlideshowExit").addEventListener("click",function(e){dialogHelper.close(dlg)}),dlg.querySelector(".btnSlideshowNext").addEventListener("click",nextImage),dlg.querySelector(".btnSlideshowPrevious").addEventListener("click",previousImage);var btnPause=dlg.querySelector(".btnSlideshowPause");btnPause&&btnPause.addEventListener("click",playPause);var btnDownload=dlg.querySelector(".btnDownload");btnDownload&&btnDownload.addEventListener("click",download);var btnShare=dlg.querySelector(".btnShare");btnShare&&btnShare.addEventListener("click",share)}dialogHelper.open(dlg).then(function(){stopInterval()}),inputmanager.on(window,onInputCommand),document.addEventListener(window.PointerEvent?"pointermove":"mousemove",onPointerMove),dlg.addEventListener("close",onDialogClosed),options.interactive&&loadSwiper(dlg)}function loadSwiper(dlg){currentOptions.slides?dlg.querySelector(".swiper-wrapper").innerHTML=currentOptions.slides.map(getSwiperSlideHtmlFromSlide).join(""):dlg.querySelector(".swiper-wrapper").innerHTML=currentOptions.items.map(getSwiperSlideHtmlFromItem).join(""),require(["swiper"],function(swiper){swiperInstance=new Swiper(dlg.querySelector(".slideshowSwiperContainer"),{direction:"horizontal",loop:!1!==options.loop,autoplay:options.interval||8e3,preloadImages:!1,lazyLoading:!0,lazyLoadingInPrevNext:!0,autoplayDisableOnInteraction:!1,initialSlide:options.startIndex||0,speed:240}),layoutManager.mobile?pause():play()})}function getSwiperSlideHtmlFromItem(item){return getSwiperSlideHtmlFromSlide({imageUrl:getImgUrl(item),originalImage:getImgUrl(item,!0),Id:item.Id,ServerId:item.ServerId})}function getSwiperSlideHtmlFromSlide(item){var html="";return html+='
',html+='',(item.title||item.subtitle)&&(html+='
',html+='
',item.title&&(html+='

',html+=item.title,html+="

"),item.description&&(html+='
',html+=item.description,html+="
"),html+="
",html+="
"),html+="
"}function previousImage(){swiperInstance?swiperInstance.slidePrev():(stopInterval(),showNextImage(currentIndex-1))}function nextImage(){if(swiperInstance){if(!1===options.loop&&swiperInstance.activeIndex>=swiperInstance.slides.length-1)return void dialogHelper.close(dlg);swiperInstance.slideNext()}else stopInterval(),showNextImage(currentIndex+1)}function getCurrentImageInfo(){if(swiperInstance){var slide=document.querySelector(".swiper-slide-active");return slide?{url:slide.getAttribute("data-original"),shareUrl:slide.getAttribute("data-imageurl"),itemId:slide.getAttribute("data-itemid"),serverId:slide.getAttribute("data-serverid")}:null}return null}function download(){var imageInfo=getCurrentImageInfo();require(["fileDownloader"],function(fileDownloader){fileDownloader.download([imageInfo])})}function share(){var imageInfo=getCurrentImageInfo();navigator.share({url:imageInfo.shareUrl})}function play(){var btnSlideshowPause=dlg.querySelector(".btnSlideshowPause i");btnSlideshowPause&&(btnSlideshowPause.innerHTML="pause"),swiperInstance.startAutoplay()}function pause(){var btnSlideshowPause=dlg.querySelector(".btnSlideshowPause i");btnSlideshowPause&&(btnSlideshowPause.innerHTML="play_arrow"),swiperInstance.stopAutoplay()}function playPause(){"pause"!==dlg.querySelector(".btnSlideshowPause i").innerHTML?play():pause()}function onDialogClosed(){var swiper=swiperInstance;swiper&&(swiper.destroy(!0,!0),swiperInstance=null),inputmanager.off(window,onInputCommand),document.removeEventListener(window.PointerEvent?"pointermove":"mousemove",onPointerMove)}function startInterval(options){currentOptions=options,stopInterval(),createElements(options),options.interactive||(currentIntervalMs=options.interval||11e3,showNextImage(options.startIndex||0,!0))}function isOsdOpen(){return _osdOpen}function getOsdBottom(){return dlg.querySelector(".slideshowBottomBar")}function showOsd(){var bottom=getOsdBottom();bottom&&(slideUpToShow(bottom),startHideTimer())}function hideOsd(){var bottom=getOsdBottom();bottom&&slideDownToHide(bottom)}function startHideTimer(){stopHideTimer(),hideTimeout=setTimeout(hideOsd,4e3)}function stopHideTimer(){hideTimeout&&(clearTimeout(hideTimeout),hideTimeout=null)}function slideUpToShow(elem){if(elem.classList.contains("hide")){_osdOpen=!0,elem.classList.remove("hide");var onFinish=function(){focusManager.focus(elem.querySelector(".btnSlideshowPause"))};if(!elem.animate)return void onFinish();requestAnimationFrame(function(){var keyframes=[{transform:"translate3d(0,"+elem.offsetHeight+"px,0)",opacity:".3",offset:0},{transform:"translate3d(0,0,0)",opacity:"1",offset:1}],timing={duration:300,iterations:1,easing:"ease-out"};elem.animate(keyframes,timing).onfinish=onFinish})}}function slideDownToHide(elem){if(!elem.classList.contains("hide")){var onFinish=function(){elem.classList.add("hide"),_osdOpen=!1};if(!elem.animate)return void onFinish();requestAnimationFrame(function(){var keyframes=[{transform:"translate3d(0,0,0)",opacity:"1",offset:0},{transform:"translate3d(0,"+elem.offsetHeight+"px,0)",opacity:".3",offset:1}],timing={duration:300,iterations:1,easing:"ease-out"};elem.animate(keyframes,timing).onfinish=onFinish})}}function onPointerMove(e){if("mouse"===(e.pointerType||(layoutManager.mobile?"touch":"mouse"))){var eventX=e.screenX||0,eventY=e.screenY||0,obj=lastMouseMoveData;if(!obj)return void(lastMouseMoveData={x:eventX,y:eventY});if(Math.abs(eventX-obj.x)<10&&Math.abs(eventY-obj.y)<10)return;obj.x=eventX,obj.y=eventY,showOsd()}}function onInputCommand(e){switch(e.detail.command){case"left":isOsdOpen()||(e.preventDefault(),e.stopPropagation(),previousImage());break;case"right":isOsdOpen()||(e.preventDefault(),e.stopPropagation(),nextImage());break;case"up":case"down":case"select":case"menu":case"info":case"play":case"playpause":case"pause":showOsd()}}function showNextImage(index,skipPreload){index=Math.max(0,index),index>=currentOptions.items.length&&(index=0),currentIndex=index;var options=currentOptions,items=options.items,item=items[index],imgUrl=getImgUrl(item),onSrcLoaded=function(){var cardImageContainer=dlg.querySelector(".slideshowImage"),newCardImageContainer=document.createElement("div");newCardImageContainer.className=cardImageContainer.className,options.cover&&newCardImageContainer.classList.add("slideshowImage-cover"),newCardImageContainer.style.backgroundImage="url('"+imgUrl+"')",newCardImageContainer.classList.add("hide"),cardImageContainer.parentNode.appendChild(newCardImageContainer),options.showTitle?dlg.querySelector(".slideshowImageText").innerHTML=item.Name:dlg.querySelector(".slideshowImageText").innerHTML="",newCardImageContainer.classList.remove("hide");var onAnimationFinished=function(){var parentNode=cardImageContainer.parentNode;parentNode&&parentNode.removeChild(cardImageContainer)};if(newCardImageContainer.animate){var keyframes=[{opacity:"0",offset:0},{opacity:"1",offset:1}],timing={duration:1200,iterations:1};newCardImageContainer.animate(keyframes,timing).onfinish=onAnimationFinished}else onAnimationFinished();stopInterval(),currentTimeout=setTimeout(function(){showNextImage(index+1,!0)},currentIntervalMs)};if(skipPreload)onSrcLoaded();else{var img=new Image;img.onload=onSrcLoaded,img.src=imgUrl}}function stopInterval(){currentTimeout&&(clearTimeout(currentTimeout),currentTimeout=null)}var swiperInstance,dlg,currentTimeout,currentIntervalMs,currentOptions,currentIndex,hideTimeout,lastMouseMoveData,self=this,_osdOpen=!1;self.show=function(){startInterval(options)},self.hide=function(){var dialog=dlg;dialog&&dialogHelper.close(dialog)}}}); \ No newline at end of file +define(["dialogHelper","inputManager","connectionManager","layoutManager","focusManager","browser","apphost","loading","css!./style","material-icons","paper-icon-button-light"],function(dialogHelper,inputmanager,connectionManager,layoutManager,focusManager,browser,appHost,loading){"use strict";function getImageUrl(item,options,apiClient){return options=options||{},options.type=options.type||"Primary","string"==typeof item?apiClient.getScaledImageUrl(item,options):item.ImageTags&&item.ImageTags[options.type]?(options.tag=item.ImageTags[options.type],apiClient.getScaledImageUrl(item.Id,options)):"Primary"===options.type&&item.AlbumId&&item.AlbumPrimaryImageTag?(options.tag=item.AlbumPrimaryImageTag,apiClient.getScaledImageUrl(item.AlbumId,options)):null}function getBackdropImageUrl(item,options,apiClient){return options=options||{},options.type=options.type||"Backdrop",options.maxWidth||options.width||options.maxHeight||options.height||(options.quality=100),item.BackdropImageTags&&item.BackdropImageTags.length?(options.tag=item.BackdropImageTags[0],apiClient.getScaledImageUrl(item.Id,options)):null}function getImgUrl(item,original){var apiClient=connectionManager.getApiClient(item.ServerId),imageOptions={};return original||(imageOptions.maxWidth=screen.availWidth),item.BackdropImageTags&&item.BackdropImageTags.length?getBackdropImageUrl(item,imageOptions,apiClient):"Photo"===item.MediaType&&original?apiClient.getItemDownloadUrl(item.Id):(imageOptions.type="Primary",getImageUrl(item,imageOptions,apiClient))}function getIcon(icon,cssClass,canFocus,autoFocus){var tabIndex=canFocus?"":' tabindex="-1"';return autoFocus=autoFocus?" autofocus":"",'"}function setUserScalable(scalable){try{appHost.setUserScalable(scalable)}catch(err){console.log("error in appHost.setUserScalable: "+err)}}return function(options){function createElements(options){dlg=dialogHelper.createDialog({exitAnimationDuration:options.interactive?400:800,size:"fullscreen",autoFocus:!1,scrollY:!1,exitAnimation:"fadeout",removeOnClose:!0}),dlg.classList.add("slideshowDialog");var html="";if(options.interactive){var actionButtonsOnTop=layoutManager.mobile;html+="
",html+='
',html+=getIcon("keyboard_arrow_left","btnSlideshowPrevious slideshowButton hide-mouse-idle-tv",!1),html+=getIcon("keyboard_arrow_right","btnSlideshowNext slideshowButton hide-mouse-idle-tv",!1),html+='
',actionButtonsOnTop&&(appHost.supports("filedownload")&&(html+=getIcon("file_download","btnDownload slideshowButton",!0)),appHost.supports("sharing")&&(html+=getIcon("share","btnShare slideshowButton",!0))),html+=getIcon("close","slideshowButton btnSlideshowExit hide-mouse-idle-tv",!1),html+="
",actionButtonsOnTop||(html+='
',html+=getIcon("pause","btnSlideshowPause slideshowButton",!0,!0),appHost.supports("filedownload")&&(html+=getIcon("file_download","btnDownload slideshowButton",!0)),appHost.supports("sharing")&&(html+=getIcon("share","btnShare slideshowButton",!0)),html+="
"),html+="
"}else html+='

';if(dlg.innerHTML=html,options.interactive){dlg.querySelector(".btnSlideshowExit").addEventListener("click",function(e){dialogHelper.close(dlg)}),dlg.querySelector(".btnSlideshowNext").addEventListener("click",nextImage),dlg.querySelector(".btnSlideshowPrevious").addEventListener("click",previousImage);var btnPause=dlg.querySelector(".btnSlideshowPause");btnPause&&btnPause.addEventListener("click",playPause);var btnDownload=dlg.querySelector(".btnDownload");btnDownload&&btnDownload.addEventListener("click",download);var btnShare=dlg.querySelector(".btnShare");btnShare&&btnShare.addEventListener("click",share)}setUserScalable(!0),dialogHelper.open(dlg).then(function(){setUserScalable(!1),stopInterval()}),inputmanager.on(window,onInputCommand),document.addEventListener(window.PointerEvent?"pointermove":"mousemove",onPointerMove),dlg.addEventListener("close",onDialogClosed),options.interactive&&loadSwiper(dlg)}function loadSwiper(dlg){currentOptions.slides?dlg.querySelector(".swiper-wrapper").innerHTML=currentOptions.slides.map(getSwiperSlideHtmlFromSlide).join(""):dlg.querySelector(".swiper-wrapper").innerHTML=currentOptions.items.map(getSwiperSlideHtmlFromItem).join(""),require(["swiper"],function(swiper){swiperInstance=new Swiper(dlg.querySelector(".slideshowSwiperContainer"),{direction:"horizontal",loop:!1!==options.loop,autoplay:options.interval||8e3,preloadImages:!1,lazyLoading:!0,lazyLoadingInPrevNext:!0,autoplayDisableOnInteraction:!1,initialSlide:options.startIndex||0,speed:240}),layoutManager.mobile?pause():play()})}function getSwiperSlideHtmlFromItem(item){return getSwiperSlideHtmlFromSlide({imageUrl:getImgUrl(item),originalImage:getImgUrl(item,!0),Id:item.Id,ServerId:item.ServerId})}function getSwiperSlideHtmlFromSlide(item){var html="";return html+='
',html+='',(item.title||item.subtitle)&&(html+='
',html+='
',item.title&&(html+='

',html+=item.title,html+="

"),item.description&&(html+='
',html+=item.description,html+="
"),html+="
",html+="
"),html+="
"}function previousImage(){swiperInstance?swiperInstance.slidePrev():(stopInterval(),showNextImage(currentIndex-1))}function nextImage(){if(swiperInstance){if(!1===options.loop&&swiperInstance.activeIndex>=swiperInstance.slides.length-1)return void dialogHelper.close(dlg);swiperInstance.slideNext()}else stopInterval(),showNextImage(currentIndex+1)}function getCurrentImageInfo(){if(swiperInstance){var slide=document.querySelector(".swiper-slide-active");return slide?{url:slide.getAttribute("data-original"),shareUrl:slide.getAttribute("data-imageurl"),itemId:slide.getAttribute("data-itemid"),serverId:slide.getAttribute("data-serverid")}:null}return null}function download(){var imageInfo=getCurrentImageInfo();require(["fileDownloader"],function(fileDownloader){fileDownloader.download([imageInfo])})}function share(){var imageInfo=getCurrentImageInfo();navigator.share({url:imageInfo.shareUrl})}function play(){var btnSlideshowPause=dlg.querySelector(".btnSlideshowPause i");btnSlideshowPause&&(btnSlideshowPause.innerHTML="pause"),swiperInstance.startAutoplay()}function pause(){var btnSlideshowPause=dlg.querySelector(".btnSlideshowPause i");btnSlideshowPause&&(btnSlideshowPause.innerHTML="play_arrow"),swiperInstance.stopAutoplay()}function playPause(){"pause"!==dlg.querySelector(".btnSlideshowPause i").innerHTML?play():pause()}function onDialogClosed(){var swiper=swiperInstance;swiper&&(swiper.destroy(!0,!0),swiperInstance=null),inputmanager.off(window,onInputCommand),document.removeEventListener(window.PointerEvent?"pointermove":"mousemove",onPointerMove)}function startInterval(options){currentOptions=options,stopInterval(),createElements(options),options.interactive||(currentIntervalMs=options.interval||11e3,showNextImage(options.startIndex||0,!0))}function isOsdOpen(){return _osdOpen}function getOsdBottom(){return dlg.querySelector(".slideshowBottomBar")}function showOsd(){var bottom=getOsdBottom();bottom&&(slideUpToShow(bottom),startHideTimer())}function hideOsd(){var bottom=getOsdBottom();bottom&&slideDownToHide(bottom)}function startHideTimer(){stopHideTimer(),hideTimeout=setTimeout(hideOsd,4e3)}function stopHideTimer(){hideTimeout&&(clearTimeout(hideTimeout),hideTimeout=null)}function slideUpToShow(elem){if(elem.classList.contains("hide")){_osdOpen=!0,elem.classList.remove("hide");var onFinish=function(){focusManager.focus(elem.querySelector(".btnSlideshowPause"))};if(!elem.animate)return void onFinish();requestAnimationFrame(function(){var keyframes=[{transform:"translate3d(0,"+elem.offsetHeight+"px,0)",opacity:".3",offset:0},{transform:"translate3d(0,0,0)",opacity:"1",offset:1}],timing={duration:300,iterations:1,easing:"ease-out"};elem.animate(keyframes,timing).onfinish=onFinish})}}function slideDownToHide(elem){if(!elem.classList.contains("hide")){var onFinish=function(){elem.classList.add("hide"),_osdOpen=!1};if(!elem.animate)return void onFinish();requestAnimationFrame(function(){var keyframes=[{transform:"translate3d(0,0,0)",opacity:"1",offset:0},{transform:"translate3d(0,"+elem.offsetHeight+"px,0)",opacity:".3",offset:1}],timing={duration:300,iterations:1,easing:"ease-out"};elem.animate(keyframes,timing).onfinish=onFinish})}}function onPointerMove(e){if("mouse"===(e.pointerType||(layoutManager.mobile?"touch":"mouse"))){var eventX=e.screenX||0,eventY=e.screenY||0,obj=lastMouseMoveData;if(!obj)return void(lastMouseMoveData={x:eventX,y:eventY});if(Math.abs(eventX-obj.x)<10&&Math.abs(eventY-obj.y)<10)return;obj.x=eventX,obj.y=eventY,showOsd()}}function onInputCommand(e){switch(e.detail.command){case"left":isOsdOpen()||(e.preventDefault(),e.stopPropagation(),previousImage());break;case"right":isOsdOpen()||(e.preventDefault(),e.stopPropagation(),nextImage());break;case"up":case"down":case"select":case"menu":case"info":case"play":case"playpause":case"pause":showOsd()}}function showNextImage(index,skipPreload){index=Math.max(0,index),index>=currentOptions.items.length&&(index=0),currentIndex=index;var options=currentOptions,items=options.items,item=items[index],imgUrl=getImgUrl(item),onSrcLoaded=function(){var cardImageContainer=dlg.querySelector(".slideshowImage"),newCardImageContainer=document.createElement("div");newCardImageContainer.className=cardImageContainer.className,options.cover&&newCardImageContainer.classList.add("slideshowImage-cover"),newCardImageContainer.style.backgroundImage="url('"+imgUrl+"')",newCardImageContainer.classList.add("hide"),cardImageContainer.parentNode.appendChild(newCardImageContainer),options.showTitle?dlg.querySelector(".slideshowImageText").innerHTML=item.Name:dlg.querySelector(".slideshowImageText").innerHTML="",newCardImageContainer.classList.remove("hide");var onAnimationFinished=function(){var parentNode=cardImageContainer.parentNode;parentNode&&parentNode.removeChild(cardImageContainer)};if(newCardImageContainer.animate){var keyframes=[{opacity:"0",offset:0},{opacity:"1",offset:1}],timing={duration:1200,iterations:1};newCardImageContainer.animate(keyframes,timing).onfinish=onAnimationFinished}else onAnimationFinished();stopInterval(),currentTimeout=setTimeout(function(){showNextImage(index+1,!0)},currentIntervalMs)};if(skipPreload)onSrcLoaded();else{var img=new Image;img.onload=onSrcLoaded,img.src=imgUrl}}function stopInterval(){currentTimeout&&(clearTimeout(currentTimeout),currentTimeout=null)}var swiperInstance,dlg,currentTimeout,currentIntervalMs,currentOptions,currentIndex,hideTimeout,lastMouseMoveData,self=this,_osdOpen=!1;self.show=function(){startInterval(options)},self.hide=function(){var dialog=dlg;dialog&&dialogHelper.close(dialog)}}}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/de.json b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/de.json index 683b174227..2950242140 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/de.json +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/de.json @@ -247,7 +247,7 @@ "LabelParentNumber": "Ursprungsnummer:", "SortName": "Sortiername", "ReleaseDate": "Ver\u00f6ffentlichungsdatum", - "Continuing": "Fortdauernd", + "Continuing": "Fortlaufend", "Ended": "Beendent", "HeaderEnabledFields": "Aktiviere Felder", "HeaderEnabledFieldsHelp": "W\u00e4hle Felder ab um das \u00c4ndern von Daten zu verhindern.", diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json index a51ca1dc18..6ceffe8540 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json @@ -250,7 +250,7 @@ "Continuing": "Wordt vervolgd...", "Ended": "Gestopt", "HeaderEnabledFields": "Schakel velden in", - "HeaderEnabledFieldsHelp": "Haal een vinkje weg om het veld te vergrendelen en voorkom dat gegevens gewijzigd kunnen worden", + "HeaderEnabledFieldsHelp": "Verwijder een vinkje om het veld te vergrendelen en voorkom dat gegevens gewijzigd kunnen worden.", "Backdrops": "Achtergronden", "Images": "Afbeeldingen", "Runtime": "Speelduur", diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json index 86d99a0ffb..a6c8cd4c86 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json @@ -183,7 +183,7 @@ "LabelDateAdded": "Data dodania:", "DateAdded": "Data dodania", "DatePlayed": "Data odtwarzania", - "ConfigureDateAdded": "Skonfiguruj jak ustalana jest data dodania, w Kokpicie serwera Emby, w ustawieniach biblioteki", + "ConfigureDateAdded": "Spos\u00f3b ustalania daty dodania, mo\u017cna skonfigurowa\u0107, w ustawieniach biblioteki, w kokpicie serwera Emby.", "LabelStatus": "Stan:", "LabelArtists": "Wykonawcy:", "LabelArtistsHelp": "Oddzielaj u\u017cywaj\u0105c ;", diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json index 99012962cf..3bd37ae6cc 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json @@ -192,10 +192,10 @@ "LabelAlbum": "Album:", "Artists": "Umelci", "ImdbRating": "IMDb hodnotenie", - "CommunityRating": "Community rating", + "CommunityRating": "Hodnotenie komunity", "LabelCommunityRating": "Hodnotenie komunity:", "LabelCriticRating": "Hodnotenie kritikov:", - "CriticRating": "Critic rating", + "CriticRating": "Hodnotenie kritikov", "LabelWebsite": "Website:", "LabelTagline": "Tagline:", "LabelOverview": "Preh\u013ead:", diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json index 309d10c2af..295136c2bb 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json @@ -483,8 +483,8 @@ "LabelSelectFolderGroups": "Gruppera automatiskt inneh\u00e5ll fr\u00e5n dessa mappar i vyer, t ex Filmer, Musik eller TV:", "LabelSelectFolderGroupsHelp": "Ej valda mappar kommer att visas f\u00f6r sig sj\u00e4lva i en egen vy.", "Folders": "Mappar", - "DisplayInOtherHomeScreenSections": "Display in home screen sections such as latest media and continue watching", - "DisplayInMyMedia": "Display on home screen", + "DisplayInOtherHomeScreenSections": "Visa sektioner p\u00e5 hemsk\u00e4rmen som till exempel senast media och forts\u00e4tt kolla p\u00e5", + "DisplayInMyMedia": "Visa p\u00e5 hemsk\u00e4rmen", "Shows": "Serier", "HeaderLibraryFolders": "Biblioteksmappar", "HeaderTermsOfPurchase": "K\u00f6pvillkor", @@ -493,7 +493,7 @@ "RepeatMode": "Repeat-l\u00e4ge", "RepeatOne": "Upprepa en g\u00e5ng", "RepeatAll": "Upprepa alla", - "LabelDefaultScreen": "Default screen:", + "LabelDefaultScreen": "F\u00f6rvald sektion:", "ConfirmEndPlayerSession": "Vill du st\u00e4nga ner Emby p\u00e5 {0}?", "Yes": "Ja", "No": "Nej", diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/appletv/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/appletv/theme.css index f3ab075368..11932eb081 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/appletv/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/appletv/theme.css @@ -1 +1 @@ -.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.formDialogHeader:not(.formDialogHeader-clear),.skinHeader-withBackground{color:rgba(0,0,0,.7);background:#303030;background:-webkit-gradient(linear,left top,right top,from(#BCBCBC),color-stop(#A7B4B7),color-stop(#BEB5A5),color-stop(#ADBEC2),to(#B9C7CB));background:-webkit-linear-gradient(left,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB);background:-o-linear-gradient(left,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB);background:linear-gradient(to right,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB)}@supports (backdrop-filter:blur(1.5em)) or (-webkit-backdrop-filter:blur(1.5em)){.skinHeader-blurred{background:-webkit-gradient(linear,left top,right top,from(rgba(188,188,188,.7)),color-stop(rgba(167,180,183,.7)),color-stop(rgba(190,181,165,.7)),color-stop(rgba(173,190,194,.7)),to(rgba(185,199,203,.7)));background:-webkit-linear-gradient(left,rgba(188,188,188,.7),rgba(167,180,183,.7),rgba(190,181,165,.7),rgba(173,190,194,.7),rgba(185,199,203,.7));background:-o-linear-gradient(left,rgba(188,188,188,.7),rgba(167,180,183,.7),rgba(190,181,165,.7),rgba(173,190,194,.7),rgba(185,199,203,.7));background:linear-gradient(to right,rgba(188,188,188,.7),rgba(167,180,183,.7),rgba(190,181,165,.7),rgba(173,190,194,.7),rgba(185,199,203,.7));-webkit-backdrop-filter:blur(1.5em);backdrop-filter:blur(1.5em)}}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}.pageTitleWithDefaultLogo{background-image:url(../logodark.png)}html{background:#D5E9F2}.backgroundContainer,.dialog{background:url(https://github.com/MediaBrowser/Emby.Resources/raw/master/images/wallpaper/atv1-1080.png) center center no-repeat #D5E9F2;-webkit-background-size:100% 100%;background-size:100% 100%}.backgroundContainer.withBackdrop{background:-webkit-gradient(linear,left top,left bottom,from(rgba(192,212,222,.94)),color-stop(rgba(235,250,254,.94)),color-stop(rgba(227,220,212,.94)),color-stop(rgba(206,214,216,.94)),to(rgba(192,211,218,.94)));background:-webkit-linear-gradient(top,rgba(192,212,222,.94),rgba(235,250,254,.94),rgba(227,220,212,.94),rgba(206,214,216,.94),rgba(192,211,218,.94));background:-o-linear-gradient(top,rgba(192,212,222,.94),rgba(235,250,254,.94),rgba(227,220,212,.94),rgba(206,214,216,.94),rgba(192,211,218,.94));background:linear-gradient(to bottom,rgba(192,212,222,.94),rgba(235,250,254,.94),rgba(227,220,212,.94),rgba(206,214,216,.94),rgba(192,211,218,.94))}.actionSheet{background:#f0f0f0}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:#fff;background:rgba(0,0,0,.14);color:inherit}.fab:focus,.raised:focus{background:rgba(0,0,0,.24)}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555;color:rgba(0,0,0,.7)}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:green}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff;background-color:rgba(0,0,0,.1)}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogFooter:not(.formDialogFooter-clear){border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08)}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888;color:rgba(0,0,0,.5)}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter,.formDialogFooter:not(.formDialogFooter-clear){color:rgba(0,0,0,.7);background:#303030;background:-webkit-gradient(linear,left top,right top,from(#BCBCBC),color-stop(#A7B4B7),color-stop(#BEB5A5),color-stop(#ADBEC2),to(#B9C7CB));background:-webkit-linear-gradient(left,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB);background:-o-linear-gradient(left,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB);background:linear-gradient(to right,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8;background:rgba(0,0,0,.1)}.listItem-border{border-color:rgba(0,0,0,.1)!important}.listItem:focus{background:rgba(0,0,0,.2)}.progressring-spiner{border-color:#52B54B}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:rgba(255,255,255,.9);border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:rgba(255,255,255,.9);border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#52B54B;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(0,0,0,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#fff;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#555;border-color:rgba(0,0,0,.1)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#E4E2DC));background:-webkit-linear-gradient(rgba(0,0,0,0),#E4E2DC);background:-o-linear-gradient(rgba(0,0,0,0),#E4E2DC);background:linear-gradient(rgba(0,0,0,0),#E4E2DC)}@media all and (min-width:62.5em){.detailButton-mobile{background:rgba(0,0,0,.14)!important;backdrop-filter:blur(10px)}}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B} \ No newline at end of file +.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.formDialogHeader:not(.formDialogHeader-clear),.skinHeader-withBackground{color:rgba(0,0,0,.7);background:#303030;background:-webkit-gradient(linear,left top,right top,from(#BCBCBC),color-stop(#A7B4B7),color-stop(#BEB5A5),color-stop(#ADBEC2),to(#B9C7CB));background:-webkit-linear-gradient(left,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB);background:-o-linear-gradient(left,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB);background:linear-gradient(to right,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB)}@supports (backdrop-filter:blur(1.5em)) or (-webkit-backdrop-filter:blur(1.5em)){.skinHeader-blurred{background:-webkit-gradient(linear,left top,right top,from(rgba(188,188,188,.7)),color-stop(rgba(167,180,183,.7)),color-stop(rgba(190,181,165,.7)),color-stop(rgba(173,190,194,.7)),to(rgba(185,199,203,.7)));background:-webkit-linear-gradient(left,rgba(188,188,188,.7),rgba(167,180,183,.7),rgba(190,181,165,.7),rgba(173,190,194,.7),rgba(185,199,203,.7));background:-o-linear-gradient(left,rgba(188,188,188,.7),rgba(167,180,183,.7),rgba(190,181,165,.7),rgba(173,190,194,.7),rgba(185,199,203,.7));background:linear-gradient(to right,rgba(188,188,188,.7),rgba(167,180,183,.7),rgba(190,181,165,.7),rgba(173,190,194,.7),rgba(185,199,203,.7));-webkit-backdrop-filter:blur(1.5em);backdrop-filter:blur(1.5em)}}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}.pageTitleWithDefaultLogo{background-image:url(../logodark.png)}html{background:#D5E9F2}.backgroundContainer,.dialog{background:url(https://github.com/MediaBrowser/Emby.Resources/raw/master/images/wallpaper/atv1-1080.png) center center no-repeat #D5E9F2;-webkit-background-size:100% 100%;background-size:100% 100%}.backgroundContainer.withBackdrop{background:-webkit-gradient(linear,left top,left bottom,from(rgba(192,212,222,.94)),color-stop(rgba(235,250,254,.94)),color-stop(rgba(227,220,212,.94)),color-stop(rgba(206,214,216,.94)),to(rgba(192,211,218,.94)));background:-webkit-linear-gradient(top,rgba(192,212,222,.94),rgba(235,250,254,.94),rgba(227,220,212,.94),rgba(206,214,216,.94),rgba(192,211,218,.94));background:-o-linear-gradient(top,rgba(192,212,222,.94),rgba(235,250,254,.94),rgba(227,220,212,.94),rgba(206,214,216,.94),rgba(192,211,218,.94));background:linear-gradient(to bottom,rgba(192,212,222,.94),rgba(235,250,254,.94),rgba(227,220,212,.94),rgba(206,214,216,.94),rgba(192,211,218,.94))}.actionSheet{background:#f0f0f0}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:#fff;background:rgba(0,0,0,.14);color:inherit}.fab:focus,.raised:focus{background:rgba(0,0,0,.24)}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555;color:rgba(0,0,0,.7)}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:green}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff;background-color:rgba(0,0,0,.1)}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogFooter:not(.formDialogFooter-clear){border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08)}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888;color:rgba(0,0,0,.5)}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter,.formDialogFooter:not(.formDialogFooter-clear){color:rgba(0,0,0,.7);background:#303030;background:-webkit-gradient(linear,left top,right top,from(#BCBCBC),color-stop(#A7B4B7),color-stop(#BEB5A5),color-stop(#ADBEC2),to(#B9C7CB));background:-webkit-linear-gradient(left,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB);background:-o-linear-gradient(left,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB);background:linear-gradient(to right,#BCBCBC,#A7B4B7,#BEB5A5,#ADBEC2,#B9C7CB)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8;background:rgba(0,0,0,.1)}.listItem-border{border-color:rgba(0,0,0,.1)!important}.listItem:focus{background:rgba(0,0,0,.2)}.progressring-spiner{border-color:#52B54B}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:rgba(255,255,255,.9);border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:rgba(255,255,255,.9);border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#52B54B;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(0,0,0,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#fff;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#555;border-color:rgba(0,0,0,.1)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#E4E2DC));background:-webkit-linear-gradient(rgba(0,0,0,0),#E4E2DC);background:-o-linear-gradient(rgba(0,0,0,0),#E4E2DC);background:linear-gradient(rgba(0,0,0,0),#E4E2DC)}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/blueradiance/bg_transparent1.png b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/blueradiance/bg_transparent1.png new file mode 100644 index 0000000000..7327425bd6 Binary files /dev/null and b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/blueradiance/bg_transparent1.png differ diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/blueradiance/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/blueradiance/theme.css index 45a4b62c69..e7ab02d7b5 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/blueradiance/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/blueradiance/theme.css @@ -1 +1 @@ -html{color:#ddd;color:rgba(255,255,255,.8)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader-withBackground{background:#303030;background:-webkit-gradient(linear,left top,right top,from(#291A31),color-stop(#033664),color-stop(#011432),color-stop(#141A3A),to(#291A31));background:-webkit-linear-gradient(left,#291A31,#033664,#011432,#141A3A,#291A31);background:-o-linear-gradient(left,#291A31,#033664,#011432,#141A3A,#291A31);background:linear-gradient(to right,#291A31,#033664,#011432,#141A3A,#291A31)}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.dialog,html{background-color:#181818}.backgroundContainer{background:url(bg.jpg) center center no-repeat #181818;-webkit-background-size:cover;background-size:cover}.backgroundContainer.withBackdrop{background-color:rgba(0,0,0,.86)}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:rgba(0,0,0,.5);color:rgba(255,255,255,.87)}.fab:focus,.raised:focus{background:rgba(0,0,0,.7)}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:rgba(0,0,0,.5)}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(255,255,255,.1)!important}.listItem:focus{background:rgba(0,0,0,.3)}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#292929;border:.07em solid #292929;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:rgba(0,0,0,.5);border:.07em solid rgba(0,0,0,.3)}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#52B54B!important}.emby-select-tv-withcolor:focus{background-color:#52B54B!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1c}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.4)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(255,255,255,.05)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.4)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#181818));background:-webkit-linear-gradient(rgba(0,0,0,0),#181818);background:-o-linear-gradient(rgba(0,0,0,0),#181818);background:linear-gradient(rgba(0,0,0,0),#181818)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.timeslotHeaders-desktop::-webkit-scrollbar{height:.7em} \ No newline at end of file +html{color:#ddd;color:rgba(255,255,255,.8)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader-withBackground{background:#303030;background:-webkit-gradient(linear,left top,right top,from(#291A31),color-stop(#033664),color-stop(#011432),color-stop(#141A3A),to(#291A31));background:-webkit-linear-gradient(left,#291A31,#033664,#011432,#141A3A,#291A31);background:-o-linear-gradient(left,#291A31,#033664,#011432,#141A3A,#291A31);background:linear-gradient(to right,#291A31,#033664,#011432,#141A3A,#291A31)}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.dialog,html{background-color:#033361}.backgroundContainer{background:url(bg.jpg) center top no-repeat #033361;-webkit-background-size:cover;background-size:cover}.backgroundContainer.withBackdrop{background:url(bg_transparent1.png) left top no-repeat;-webkit-background-size:cover;background-size:cover}@media (orientation:portrait){.backgroundContainer.withBackdrop{background:url(bg_transparent1.png) 30% top no-repeat;-webkit-background-size:cover;background-size:cover}}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:rgba(0,0,0,.5);color:rgba(255,255,255,.87)}.fab:focus,.raised:focus{background:rgba(0,0,0,.7)}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:rgba(0,0,0,.5)}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:rgba(0,0,0,.5)}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(255,255,255,.1)!important}.listItem:focus{background:rgba(0,0,0,.3)}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:rgba(0,0,0,.5);border:.07em solid transparent;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:rgba(0,0,0,.5);border:.07em solid transparent}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#52B54B!important}.emby-select-tv-withcolor:focus{background-color:#52B54B!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1c}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.4)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(255,255,255,.05)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.4)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#181818));background:-webkit-linear-gradient(rgba(0,0,0,0),#181818);background:-o-linear-gradient(rgba(0,0,0,0),#181818);background:linear-gradient(rgba(0,0,0,0),#181818)}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.timeslotHeaders-desktop::-webkit-scrollbar{height:.7em} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark-green/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark-green/theme.css index b54d9aa07d..fdc2ce0e52 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark-green/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark-green/theme.css @@ -1 +1 @@ -html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#52B54B;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog,html{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(0,0,0,.86)}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#404040;color:#fff}.fab:focus,.raised:focus{background:#505050}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(30,30,30,.9)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#52B54B!important}.emby-select-tv-withcolor:focus{background-color:#52B54B!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#fff;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:#1e1e1e!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file +html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#52B54B;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog,html{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(0,0,0,.86)}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#404040;color:#fff}.fab:focus,.raised:focus{background:#505050}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(30,30,30,.9)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#52B54B!important}.emby-select-tv-withcolor:focus{background-color:#52B54B!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#fff;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:#1e1e1e!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark-red/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark-red/theme.css index 54b921ec9d..c2948fc398 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark-red/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark-red/theme.css @@ -1 +1 @@ -html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#c33;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog,html{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(0,0,0,.86)}.paper-icon-button-light:focus{color:#c33;background-color:rgba(204,51,51,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#404040;color:#fff}.fab:focus,.raised:focus{background:#505050}.button-submit{background:#c33}.button-submit:focus{background:#D83F3F}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#c33}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #c33}.selectionCommandsPanel{background:#c33;color:#fff}.upNextDialog-countdownText{color:#c33}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#c33;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(30,30,30,.9)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#c33}.button-flat-accent,.button-link{color:#c33}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#c33}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#c33!important}.emby-select-tv-withcolor:focus{background-color:#c33!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#c33}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#c33}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.playedIndicator{background:#c33}.fullSyncIndicator{background:#c33;color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#c33!important;color:#fff}.emby-button-focusscale:focus{background:#c33;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#fff;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:#1e1e1e!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#c33!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#c33}.guide-date-tab-button.emby-button-tv:focus{background-color:#c33;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#c33}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file +html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#c33;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog,html{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(0,0,0,.86)}.paper-icon-button-light:focus{color:#c33;background-color:rgba(204,51,51,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#404040;color:#fff}.fab:focus,.raised:focus{background:#505050}.button-submit{background:#c33}.button-submit:focus{background:#D83F3F}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#c33}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #c33}.selectionCommandsPanel{background:#c33;color:#fff}.upNextDialog-countdownText{color:#c33}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#c33;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(30,30,30,.9)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#c33}.button-flat-accent,.button-link{color:#c33}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#c33}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#c33!important}.emby-select-tv-withcolor:focus{background-color:#c33!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#c33}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#c33}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.playedIndicator{background:#c33}.fullSyncIndicator{background:#c33;color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#c33!important;color:#fff}.emby-button-focusscale:focus{background:#c33;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#fff;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:#1e1e1e!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#c33!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#c33}.guide-date-tab-button.emby-button-tv:focus{background-color:#c33;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#c33}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark/theme.css index b10bc6865b..de7d3b8c07 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/dark/theme.css @@ -1 +1 @@ -html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#1c1c1c;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog,html{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(0,0,0,.86)}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:#404040;color:#fff}.fab:focus,.raised:focus{background:#505050}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(30,30,30,.9)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#52B54B!important}.emby-select-tv-withcolor:focus{background-color:#52B54B!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.4)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:#1e1e1e!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file +html{color:#ddd;color:rgba(255,255,255,.8)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader-withBackground{background-color:#1f1f1f}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog,html{background-color:#1a1a1a}.backgroundContainer.withBackdrop{background-color:rgba(0,0,0,.86)}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:#303030;color:rgba(255,255,255,.87)}.fab:focus,.raised:focus{background:#383838}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#242424}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#242424}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(36,36,36,.9)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#292929;border:.07em solid #292929;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#292929;border:.07em solid #292929}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#52B54B!important}.emby-select-tv-withcolor:focus{background-color:#52B54B!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1c}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.4)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(255,255,255,.05)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:#1e1e1e!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#1a1a1a));background:-webkit-linear-gradient(rgba(0,0,0,0),#1a1a1a);background:-o-linear-gradient(rgba(0,0,0,0),#1a1a1a);background:linear-gradient(rgba(0,0,0,0),#1a1a1a)}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.timeslotHeaders-desktop::-webkit-scrollbar{height:.7em} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/halloween/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/halloween/theme.css index 48bfb4174e..a1cabd5f90 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/halloween/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/halloween/theme.css @@ -1 +1 @@ -@import url(https://fonts.googleapis.com/css?family=Eater);h1,h2{font-family:Eater;font-weight:400!important}h1{font-size:1.566em!important}h2{font-size:1.305em!important}.sectionTabs button,.userViewNames .btnUserViewHeader{font-family:Eater!important;font-size:87%!important}html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#202020}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog,html{background-color:#1a1a1a}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#FF9100;background-color:rgba(255,145,0,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#404040;color:#fff}.fab:focus,.raised:focus{background:#505050}.button-submit{background:#FF9100;color:#fff}.button-submit:focus{background:#FF9D0C;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#FF9100}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #FF9100}.selectionCommandsPanel{background:#FF9100;color:#fff}.upNextDialog-countdownText{color:#FF9100}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#FF9100;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(30,30,30,.9)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#FF9100}.button-flat-accent,.button-link{color:#FF9100}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#262626;border:.07em solid #262626;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#FF9100}.emby-select-withcolor{color:inherit;background:#262626;border:.07em solid #262626}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#FF9100!important}.emby-select-tv-withcolor:focus{background-color:#FF9100!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#FF9100}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#FF9100}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#FF9100}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#FF9100!important;color:#fff}.emby-button-focusscale:focus{background:#FF9100;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active{color:#FF9100}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#FF9100;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#282828}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:#1e1e1e!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#FF9100!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#FF9100}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#FF9100}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#FF9100}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.btnUserViewHeader:focus{color:#FF9100!important}.btnUserViewHeader:focus .userViewButtonText{border-bottom-color:#FF9100!important}.emby-button:focus:not(.btnUserViewHeader):not(.emby-tab-button){background:#FF9100} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Eater);h1,h2{font-family:Eater;font-weight:400!important}h1{font-size:1.566em!important}h2{font-size:1.305em!important}.sectionTabs button,.userViewNames .btnUserViewHeader{font-family:Eater!important;font-size:87%!important}html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#202020}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog,html{background-color:#1a1a1a}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#FF9100;background-color:rgba(255,145,0,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#404040;color:#fff}.fab:focus,.raised:focus{background:#505050}.button-submit{background:#FF9100;color:#fff}.button-submit:focus{background:#FF9D0C;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#FF9100}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #FF9100}.selectionCommandsPanel{background:#FF9100;color:#fff}.upNextDialog-countdownText{color:#FF9100}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#FF9100;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(30,30,30,.9)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#FF9100}.button-flat-accent,.button-link{color:#FF9100}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#262626;border:.07em solid #262626;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#FF9100}.emby-select-withcolor{color:inherit;background:#262626;border:.07em solid #262626}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#FF9100!important}.emby-select-tv-withcolor:focus{background-color:#FF9100!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#FF9100}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#FF9100}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#FF9100}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#FF9100!important;color:#fff}.emby-button-focusscale:focus{background:#FF9100;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active{color:#FF9100}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#FF9100;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#282828}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:#1e1e1e!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#FF9100!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#FF9100}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#FF9100}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#FF9100}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.btnUserViewHeader:focus{color:#FF9100!important}.btnUserViewHeader:focus .userViewButtonText{border-bottom-color:#FF9100!important}.emby-button:focus:not(.btnUserViewHeader):not(.emby-tab-button){background:#FF9100} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-blue/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-blue/theme.css index 781bbcac19..43eaa6f1fb 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-blue/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-blue/theme.css @@ -1 +1 @@ -.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#2196F3;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#2196F3;background-color:rgba(33,150,243,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#2196F3;color:#fff}.button-submit:focus{background:#2DA2FF;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#2196F3}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#2196F3;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #2196F3}.selectionCommandsPanel{background:#2196F3;color:#fff}.upNextDialog-countdownText{color:#2196F3}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#2196F3;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#2196F3}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#2196F3}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#2196F3}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#2196F3;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(33,150,243,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#2196F3}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#2196F3}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#2196F3!important;color:#fff}.emby-button-focusscale:focus{background:#2196F3;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#2196F3!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#2196F3}.guide-date-tab-button.emby-button-tv:focus{background-color:#2196F3;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}@media all and (min-width:62.5em){.detailButton-mobile{background:rgba(0,0,0,.14)!important;backdrop-filter:blur(10px)}}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#2196F3} \ No newline at end of file +.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#2196F3;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#2196F3;background-color:rgba(33,150,243,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#2196F3;color:#fff}.button-submit:focus{background:#2DA2FF;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#2196F3}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#2196F3;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #2196F3}.selectionCommandsPanel{background:#2196F3;color:#fff}.upNextDialog-countdownText{color:#2196F3}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#2196F3;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#2196F3}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#2196F3}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#2196F3}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#2196F3;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(33,150,243,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#2196F3}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#2196F3}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#2196F3!important;color:#fff}.emby-button-focusscale:focus{background:#2196F3;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#2196F3!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#2196F3}.guide-date-tab-button.emby-button-tv:focus{background-color:#2196F3;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#2196F3} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-green/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-green/theme.css index 39e6fdc123..a4f1c1c94c 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-green/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-green/theme.css @@ -1 +1 @@ -.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#52B54B;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.skinHeader-withBackground .button-link{color:#fff}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:green}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#52B54B;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#52B54B}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#52B54B;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}@media all and (min-width:62.5em){.detailButton-mobile{background:rgba(0,0,0,.14)!important;backdrop-filter:blur(10px)}}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B} \ No newline at end of file +.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#52B54B;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.skinHeader-withBackground .button-link{color:#fff}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:green}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#52B54B;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#52B54B}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#52B54B;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-pink/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-pink/theme.css index 88d72b1d87..a8db5e3bba 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-pink/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-pink/theme.css @@ -1 +1 @@ -.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#E91E63;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#E91E63;background-color:rgba(233,30,99,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#E91E63;color:#fff}.button-submit:focus{background:#F52A6F;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555;color:rgba(0,0,0,.7)}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#E91E63}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#F8BBD0}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#E91E63;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888;color:rgba(0,0,0,.54)}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #E91E63}.selectionCommandsPanel{background:#E91E63;color:#fff}.upNextDialog-countdownText{color:#E91E63}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#E91E63;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#E91E63}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#E91E63}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#E91E63}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#E91E63;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(233,30,99,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#E91E63}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#E91E63}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#E91E63!important;color:#fff}.emby-button-focusscale:focus{background:#E91E63;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#E91E63!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#E91E63}.guide-date-tab-button.emby-button-tv:focus{background-color:#E91E63;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}@media all and (min-width:62.5em){.detailButton-mobile{background:rgba(0,0,0,.14)!important;backdrop-filter:blur(10px)}}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#E91E63} \ No newline at end of file +.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#E91E63;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#E91E63;background-color:rgba(233,30,99,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#E91E63;color:#fff}.button-submit:focus{background:#F52A6F;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555;color:rgba(0,0,0,.7)}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#E91E63}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#F8BBD0}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#E91E63;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888;color:rgba(0,0,0,.54)}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #E91E63}.selectionCommandsPanel{background:#E91E63;color:#fff}.upNextDialog-countdownText{color:#E91E63}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#E91E63;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#E91E63}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#E91E63}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#E91E63}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#E91E63;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(233,30,99,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#E91E63}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#E91E63}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#E91E63!important;color:#fff}.emby-button-focusscale:focus{background:#E91E63;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#E91E63!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#E91E63}.guide-date-tab-button.emby-button-tv:focus{background-color:#E91E63;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#E91E63} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-purple/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-purple/theme.css index 46b6a58b22..ba36e58cd4 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-purple/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-purple/theme.css @@ -1 +1 @@ -.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#673AB7;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#EDE7F6}.backgroundContainer.withBackdrop{background-color:rgba(237,241,236,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#673AB7;background-color:rgba(103,58,183,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#673AB7;color:#fff}.button-submit:focus{background:#7346C3;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555;color:rgba(0,0,0,.7)}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#673AB7}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#D1C4E9}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#673AB7;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888;color:rgba(0,0,0,.54)}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.listItem:focus{background:#ddd}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #673AB7}.selectionCommandsPanel{background:#673AB7;color:#fff}.upNextDialog-countdownText{color:#673AB7}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#673AB7;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.progressring-spiner{border-color:#673AB7}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#673AB7}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#673AB7}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#673AB7;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(103,58,183,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#673AB7}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#673AB7}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#673AB7!important;color:#fff}.emby-button-focusscale:focus{background:#673AB7;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.54)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#673AB7!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#673AB7}.guide-date-tab-button.emby-button-tv:focus{background-color:#673AB7;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#EDE7F6));background:-webkit-linear-gradient(rgba(0,0,0,0),#EDE7F6);background:-o-linear-gradient(rgba(0,0,0,0),#EDE7F6);background:linear-gradient(rgba(0,0,0,0),#EDE7F6)}@media all and (min-width:62.5em){.detailButton-mobile{background:rgba(0,0,0,.14)!important;backdrop-filter:blur(10px)}}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#673AB7} \ No newline at end of file +.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#673AB7;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#EDE7F6}.backgroundContainer.withBackdrop{background-color:rgba(237,241,236,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#673AB7;background-color:rgba(103,58,183,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#673AB7;color:#fff}.button-submit:focus{background:#7346C3;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555;color:rgba(0,0,0,.7)}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#673AB7}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#D1C4E9}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#673AB7;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888;color:rgba(0,0,0,.54)}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.listItem:focus{background:#ddd}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #673AB7}.selectionCommandsPanel{background:#673AB7;color:#fff}.upNextDialog-countdownText{color:#673AB7}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#673AB7;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.progressring-spiner{border-color:#673AB7}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#673AB7}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#673AB7}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#673AB7;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(103,58,183,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#673AB7}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#673AB7}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#673AB7!important;color:#fff}.emby-button-focusscale:focus{background:#673AB7;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.54)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#673AB7!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#673AB7}.guide-date-tab-button.emby-button-tv:focus{background-color:#673AB7;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#EDE7F6));background:-webkit-linear-gradient(rgba(0,0,0,0),#EDE7F6);background:-o-linear-gradient(rgba(0,0,0,0),#EDE7F6);background:linear-gradient(rgba(0,0,0,0),#EDE7F6)}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#673AB7} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-red/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-red/theme.css index d2b8099196..b3824a9d11 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-red/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light-red/theme.css @@ -1 +1 @@ -.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#c33;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#c33;background-color:rgba(204,51,51,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#c33;color:#fff}.button-submit:focus{background:#D83F3F;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#c33}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#c33;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #c33}.selectionCommandsPanel{background:#c33;color:#fff}.upNextDialog-countdownText{color:#c33}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#c33;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#c33}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#c33}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#c33}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#c33;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#c33}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.playedIndicator{background:#c33}.fullSyncIndicator{background:#c33;color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#c33!important;color:#fff}.emby-button-focusscale:focus{background:#c33;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#c33!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}@media all and (min-width:62.5em){.detailButton-mobile{background:rgba(0,0,0,.14)!important;backdrop-filter:blur(10px)}}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#c33} \ No newline at end of file +.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#c33;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);color:#fff}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#c33;background-color:rgba(204,51,51,.2)}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff;background-color:rgba(255,255,255,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc;color:inherit}.button-submit{background:#c33;color:#fff}.button-submit:focus{background:#D83F3F;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#c33}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#c33;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #c33}.selectionCommandsPanel{background:#c33;color:#fff}.upNextDialog-countdownText{color:#c33}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#c33;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#c33}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#c33}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#c33}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#c33;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#c33}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.playedIndicator{background:#c33}.fullSyncIndicator{background:#c33;color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#c33!important;color:#fff}.emby-button-focusscale:focus{background:#c33;color:#fff}.emby-tab-button{color:#fff;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff;color:rgba(255,255,255,1)}.emby-tab-button.emby-button-tv:focus{color:#fff;color:rgba(255,255,255,1);background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#c33!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#c33} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light/theme.css index 412a5ce1d9..36bec4b922 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/light/theme.css @@ -1 +1 @@ -.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#303030;color:#ccc;color:rgba(255,255,255,.87);-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:green}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#52B54B;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#52B54B}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#52B54B;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}@media all and (min-width:62.5em){.detailButton-mobile{background:rgba(0,0,0,.14)!important;backdrop-filter:blur(10px)}}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B} \ No newline at end of file +.skinHeader,html{color:#222;color:rgba(0,0,0,.87)}.emby-collapsible-button{border-color:#ccc;border-color:rgba(0,0,0,.158)}.collapseContent{background-color:#eaeaea}.skinHeader-withBackground{background-color:#303030;color:#ccc;color:rgba(255,255,255,.87);-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,html{background-color:#f2f2f2}.backgroundContainer.withBackdrop{background-color:rgba(255,255,255,.94)}.dialog{background-color:#f0f0f0}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:#d8d8d8;color:inherit}.fab:focus,.raised:focus{background:#ccc}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#555}.button-link,.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:green}.checkboxOutline{border-color:currentColor}.paperList,.visualCardBox{background-color:#fff}.defaultCardBackground1{background-color:#009688}.defaultCardBackground2{background-color:#D32F2F}.defaultCardBackground3{background-color:#0288D1}.defaultCardBackground4{background-color:#388E3C}.defaultCardBackground5{background-color:#F57F17}.formDialogHeader:not(.formDialogHeader-clear){background-color:#52B54B;color:#fff}.formDialogFooter:not(.formDialogFooter-clear){background-color:#f0f0f0;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.08);color:inherit}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#888}.actionsheetDivider{background:#ddd;background:rgba(0,0,0,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.formDialogHeader a,.toast{color:#fff}.actionSheetMenuItem:hover{background-color:#ddd}.toast{background:#303030;color:rgba(255,255,255,.87)}.appfooter{background:#282828;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.nowPlayingBarSecondaryText{color:#999}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#555;color:rgba(0,0,0,.7);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#f8f8f8}.listItem-border{border-color:#f0f0f0!important}.listItem:focus{background:#ddd}.progressring-spiner{border-color:#52B54B}.mediaInfoText{color:#333;background:#fff}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#fff;border:.07em solid rgba(0,0,0,.158)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#52B54B;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background:#fff}.navMenuOption:hover{background:#f2f2f2}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(0,0,0,.12)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.1)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(0,0,0,.54)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#f2f2f2));background:-webkit-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:-o-linear-gradient(rgba(0,0,0,0),#f2f2f2);background:linear-gradient(rgba(0,0,0,0),#f2f2f2)}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/verydark/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/verydark/theme.css deleted file mode 100644 index 7c681b0ed4..0000000000 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/verydark/theme.css +++ /dev/null @@ -1 +0,0 @@ -html{color:#ddd;color:rgba(255,255,255,.8)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader-withBackground{background-color:#1c1c1c}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog,html{background-color:#181818}.backgroundContainer.withBackdrop{background-color:rgba(0,0,0,.86)}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:#2d2d2d;color:rgba(255,255,255,.87)}.fab:focus,.raised:focus{background:#383838}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem-border{border-color:rgba(36,36,36,.9)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#292929;border:.07em solid #292929;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#292929;border:.07em solid #292929}.emby-select-withcolor>option{color:inherit;background:#222}.emby-select-withcolor:focus{border-color:#52B54B!important}.emby-select-tv-withcolor:focus{background-color:#52B54B!important;color:#fff!important}.emby-checkbox:checked+span+span+.checkboxOutline{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1c}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.4)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:rgba(255,255,255,.05)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:#1e1e1e!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#181818));background:-webkit-linear-gradient(rgba(0,0,0,0),#181818);background:-o-linear-gradient(rgba(0,0,0,0),#181818);background:linear-gradient(rgba(0,0,0,0),#181818)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.timeslotHeaders-desktop::-webkit-scrollbar{height:.7em} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/wmc/theme.css b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/wmc/theme.css index 9b867ee641..7f559579e6 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/wmc/theme.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/themes/wmc/theme.css @@ -1 +1 @@ -html{color:#eee;color:rgba(255,255,255,.9);background-color:#0F3562}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.formDialogHeader:not(.formDialogHeader-clear),.skinHeader-withBackground{background-color:#0C2450;background:-webkit-gradient(linear,left top,left bottom,from(#0C2450),to(#081B3B));background:-webkit-linear-gradient(top,#0C2450,#081B3B);background:-o-linear-gradient(top,#0C2450,#081B3B);background:linear-gradient(to bottom,#0C2450,#081B3B)}@supports (backdrop-filter:blur(1.5em)) or (-webkit-backdrop-filter:blur(1.5em)){.skinHeader-blurred{background:rgba(20,20,20,.7);-webkit-backdrop-filter:blur(1.5em);backdrop-filter:blur(1.5em)}}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog{background-color:#0F3562;background:-webkit-gradient(linear,left top,left bottom,from(#0F3562),color-stop(#1162A4),to(#03215F));background:-webkit-linear-gradient(top,#0F3562,#1162A4,#03215F);background:-o-linear-gradient(top,#0F3562,#1162A4,#03215F);background:linear-gradient(to bottom,#0F3562,#1162A4,#03215F)}.backgroundContainer.withBackdrop{background:rgba(17,98,164,.9)}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:#082845;color:#fff}.fab:focus,.raised:focus{background:#143451}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.paperList,.visualCardBox{background-color:#0F3562}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#ddd;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.toast{background:#081B3B;color:#fff;color:rgba(255,255,255,.87)}.appfooter,.formDialogFooter:not(.formDialogFooter-clear){background:#0C2450;background:-webkit-gradient(linear,left bottom,left top,from(#0C2450),to(#081B3B));background:-webkit-linear-gradient(bottom,#0C2450,#081B3B);background:-o-linear-gradient(bottom,#0C2450,#081B3B);background:linear-gradient(to top,#0C2450,#081B3B);color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(0,0,0,.3)}.listItem-border{border-color:rgba(0,0,0,.3)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:rgba(255,255,255,.2);border:.07em solid rgba(255,255,255,.135);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:rgba(255,255,255,.2);border:.07em solid rgba(255,255,255,.135)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#52B54B;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#0F3562;color:#ccc;color:rgba(255,255,255,.7)}.actionSheetMenuItem:hover,.navMenuOption:hover{background:#252528;background:rgba(0,0,0,.2)}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#fff;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#999;border-color:rgba(255,255,255,.1)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.3)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#115E9E));background:-webkit-linear-gradient(rgba(0,0,0,0),#115E9E);background:-o-linear-gradient(rgba(0,0,0,0),#115E9E);background:linear-gradient(rgba(0,0,0,0),#115E9E)}@media all and (min-width:62.5em){.detailButton-mobile{background:rgba(0,0,0,.54)!important;backdrop-filter:blur(10px)}}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#fff}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#081B3B}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat rgba(255,255,255,.7)} \ No newline at end of file +html{color:#eee;color:rgba(255,255,255,.9);background-color:#0F3562}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.formDialogHeader:not(.formDialogHeader-clear),.skinHeader-withBackground{background-color:#0C2450;background:-webkit-gradient(linear,left top,left bottom,from(#0C2450),to(#081B3B));background:-webkit-linear-gradient(top,#0C2450,#081B3B);background:-o-linear-gradient(top,#0C2450,#081B3B);background:linear-gradient(to bottom,#0C2450,#081B3B)}@supports (backdrop-filter:blur(1.5em)) or (-webkit-backdrop-filter:blur(1.5em)){.skinHeader-blurred{background:rgba(20,20,20,.7);-webkit-backdrop-filter:blur(1.5em);backdrop-filter:blur(1.5em)}}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(../logowhite.png)}.backgroundContainer,.dialog{background-color:#0F3562;background:-webkit-gradient(linear,left top,left bottom,from(#0F3562),color-stop(#1162A4),to(#03215F));background:-webkit-linear-gradient(top,#0F3562,#1162A4,#03215F);background:-o-linear-gradient(top,#0F3562,#1162A4,#03215F);background:linear-gradient(to bottom,#0F3562,#1162A4,#03215F)}.backgroundContainer.withBackdrop{background:rgba(17,98,164,.9)}.paper-icon-button-light:focus{color:#52B54B;background-color:rgba(82,181,75,.2)}.fab,.raised{background:#082845;color:#fff}.fab:focus,.raised:focus{background:#143451}.button-submit{background:#52B54B;color:#fff}.button-submit:focus{background:#5EC157;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.paperList,.visualCardBox{background-color:#0F3562}.defaultCardBackground1{background-color:#d2b019}.defaultCardBackground2{background-color:#338abb}.defaultCardBackground3{background-color:#6b689d}.defaultCardBackground4{background-color:#dd452b}.defaultCardBackground5{background-color:#5ccea9}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#ddd;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.toast{background:#081B3B;color:#fff;color:rgba(255,255,255,.87)}.appfooter,.formDialogFooter:not(.formDialogFooter-clear){background:#0C2450;background:-webkit-gradient(linear,left bottom,left top,from(#0C2450),to(#081B3B));background:-webkit-linear-gradient(bottom,#0C2450,#081B3B);background:-o-linear-gradient(bottom,#0C2450,#081B3B);background:linear-gradient(to top,#0C2450,#081B3B);color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even){background:#1c1c1c;background:rgba(0,0,0,.3)}.listItem-border{border-color:rgba(0,0,0,.3)!important}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:rgba(255,255,255,.2);border:.07em solid rgba(255,255,255,.135);-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:rgba(255,255,255,.2);border:.07em solid rgba(255,255,255,.135)}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-select-withcolor>option{color:#000;background:#fff}.emby-select-tv-withcolor:focus{background-color:#52B54B;color:#fff}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#0F3562;color:#ccc;color:rgba(255,255,255,.7)}.actionSheetMenuItem:hover,.navMenuOption:hover{background:#252528;background:rgba(0,0,0,.2)}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-button-focusscale:focus{background:#52B54B;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#fff;background:0 0}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#999;border-color:rgba(255,255,255,.1)}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.programCell-active{background:rgba(0,0,0,.3)!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#52B54B!important;color:#fff!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#115E9E));background:-webkit-linear-gradient(rgba(0,0,0,0),#115E9E);background:-o-linear-gradient(rgba(0,0,0,0),#115E9E);background:linear-gradient(rgba(0,0,0,0),#115E9E)}.infoBanner{color:#000;background:#fff3a5;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#fff}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#081B3B}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat rgba(255,255,255,.7)} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/hlsjs/dist/hls.min.js b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/hlsjs/dist/hls.min.js index c304063e2e..bd74c923ba 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/bower_components/hlsjs/dist/hls.min.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/bower_components/hlsjs/dist/hls.min.js @@ -1,3 +1,3 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Hls=e():t.Hls=e()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var a=r[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=28)}([function(t,e,r){"use strict";function i(){}function a(t,e){return e="["+t+"] > "+e}function n(t){var e=c.console[t];return e?function(){for(var r=arguments.length,i=Array(r),n=0;n1?e-1:0),i=1;i1?r-1:0),n=1;n0)r=a+1;else{if(!(o<0))return n;i=a-1}}return null}};e.a=i},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"b",function(){return n});var a=function(){function t(){i(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,r){for(var i=r,a=0;t.isHeader(e,r);){a+=10;a+=t._readSize(e,r+6),t.isFooter(e,r+10)&&(a+=10),r+=a}if(a>0)return e.subarray(i,i+a)},t._readSize=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},t.getTimeStamp=function(e){for(var r=t.getID3Frames(e),i=0;i1&&void 0!==arguments[1]&&arguments[1],r=t.length,i=void 0,a=void 0,n=void 0,o="",s=0;s>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(i);break;case 12:case 13:a=t[s++],o+=String.fromCharCode((31&i)<<6|63&a);break;case 14:a=t[s++],n=t[s++],o+=String.fromCharCode((15&i)<<12|(63&a)<<6|(63&n)<<0)}}return o},t}(),n=a._utf8ArrayToStr;e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(3),s=function(t){function e(r){i(this,e);for(var n=arguments.length,o=Array(n>1?n-1:0),s=1;s1&&(this.clearNextTick(),this._tickTimer=setTimeout(this._boundTick,0)),this._tickCallCount=0)},e.prototype.doTick=function(){},e}(o.a);e.a=s},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(5),n=r.n(a),o=r(18),s=function(){function t(t,e){for(var r=0;r>8*(15-r)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var r=t;return t&&t.method&&t.uri&&!t.iv&&(r=new o.a,r.method=t.method,r.baseuri=t.baseuri,r.reluri=t.reluri,r.iv=this.createInitializationVector(e)),r},s(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=n.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange&&!this.rawByteRange)return[];if(this._byteRange)return this._byteRange;var t=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var r=this.lastByteRangeEndOffset;t[0]=r||0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0],this._byteRange=t}return t}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}],[{key:"ElementaryStreamTypes",get:function(){return{AUDIO:"audio",VIDEO:"video"}}}]),t}();e.a=l},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.d(e,"a",function(){return l}),r.d(e,"b",function(){return u});var o=r(3),s=r(1),l={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},u=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,s.a.BUFFER_APPENDED,s.a.FRAG_BUFFERED,s.a.FRAG_LOADED));return n.bufferPadding=.2,n.fragments=Object.create(null),n.timeRanges=Object.create(null),n.config=r.config,n}return n(e,t),e.prototype.destroy=function(){this.fragments=null,this.timeRanges=null,this.config=null,o.a.prototype.destroy.call(this),t.prototype.destroy.call(this)},e.prototype.getBufferedFrag=function(t,e){var r=this.fragments,i=Object.keys(r).filter(function(i){var a=r[i];if(a.body.type!==e)return!1;if(!a.buffered)return!1;var n=a.body;return n.startPTS<=t&&t<=n.endPTS});if(0===i.length)return null;var a=i.pop();return r[a].body},e.prototype.detectEvictedFragments=function(t,e){var r=this,i=void 0,a=void 0;Object.keys(this.fragments).forEach(function(n){var o=r.fragments[n];if(!0===o.buffered){var s=o.range[t];if(s){i=s.time;for(var l=0;l=a&&e<=n){i.push({startPTS:Math.max(t,r.start(s)),endPTS:Math.min(e,r.end(s))});break}if(ta)i.push({startPTS:Math.max(t,r.start(s)),endPTS:Math.min(e,r.end(s))}),o=!0;else if(e<=a)break}return{time:i,partial:o}},e.prototype.getFragmentKey=function(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn},e.prototype.getPartialFragment=function(t){var e=this,r=void 0,i=void 0,a=void 0,n=null,o=0;return Object.keys(this.fragments).forEach(function(s){var l=e.fragments[s];e.isPartial(l)&&(i=l.body.startPTS-e.bufferPadding,a=l.body.endPTS+e.bufferPadding,t>=i&&t<=a&&(r=Math.min(t-i,a-t),o<=r&&(n=l.body,o=r)))}),n},e.prototype.getState=function(t){var e=this.getFragmentKey(t),r=this.fragments[e],i=l.NOT_LOADED;return void 0!==r&&(i=r.buffered?!0===this.isPartial(r)?l.PARTIAL:l.OK:l.APPENDING),i},e.prototype.isPartial=function(t){return!0===t.buffered&&(void 0!==t.range.video&&!0===t.range.video.partial||void 0!==t.range.audio&&!0===t.range.audio.partial)},e.prototype.isTimeBuffered=function(t,e,r){for(var i=void 0,a=void 0,n=0;n=i&&e<=a)return!0;if(e<=i)return!1}return!1},e.prototype.onFragLoaded=function(t){var e=t.frag;if(!isNaN(e.sn)&&!e.bitrateTest){var r=this.getFragmentKey(e),i={body:e,range:Object.create(null),buffered:!1};this.fragments[r]=i}},e.prototype.onBufferAppended=function(t){var e=this;this.timeRanges=t.timeRanges,Object.keys(this.timeRanges).forEach(function(t){var r=e.timeRanges[t];e.detectEvictedFragments(t,r)})},e.prototype.onFragBuffered=function(t){this.detectPartialFragments(t.frag)},e.prototype.hasFragment=function(t){var e=this.getFragmentKey(t);return void 0!==this.fragments[e]},e.prototype.removeFragment=function(t){var e=this.getFragmentKey(t);delete this.fragments[e]},e.prototype.removeAllFragments=function(){this.fragments=Object.create(null)},e}(o.a)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",function(){return a});var a=function(){function t(){i(this,t)}return t.isBuffered=function(t,e){try{if(t)for(var r=t.buffered,i=0;i=r.start(i)&&e<=r.end(i))return!0}catch(t){}return!1},t.bufferInfo=function(t,e,r){try{if(t){var i=t.buffered,a=[],n=void 0;for(n=0;nd&&(i[u-1].end=t[l].end):i.push(t[l])}else i.push(t[l])}for(l=0,a=0,n=o=e;l=c&&e0&&this._events[t].length>a&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),a||(a=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var a=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,a,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,a=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(n(r)){for(s=o;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(35),n=r(36),o=r(37),s=r(2),l=r(0),u=r(1),d=r(4),c=Object(d.a)(),h=(c.performance,c.crypto),f=function(){function t(e,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=a.removePKCS7Padding,o=void 0===n||n;if(i(this,t),this.logEnabled=!0,this.observer=e,this.config=r,this.removePKCS7Padding=o,o)try{var s=h||c.crypto;this.subtle=s.subtle||s.webkitSubtle}catch(t){}this.disableWebCrypto=!this.subtle}return t.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.prototype.decrypt=function(t,e,r,i){var s=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(l.b.log("JS AES decrypt"),this.logEnabled=!1);var u=this.decryptor;u||(this.decryptor=u=new o.a),u.expandKey(e),i(u.decrypt(t,0,r,this.removePKCS7Padding))}else{this.logEnabled&&(l.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var d=this.subtle;this.key!==e&&(this.key=e,this.fastAesKey=new n.a(d,e)),this.fastAesKey.expandKey().then(function(n){new a.a(d,r).decrypt(t,n).catch(function(a){s.onWebCryptoError(a,t,e,r,i)}).then(function(t){i(t)})}).catch(function(a){s.onWebCryptoError(a,t,e,r,i)})}},t.prototype.onWebCryptoError=function(t,e,r,i,a){this.config.enableSoftwareAES?(l.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(e,r,i,a)):(l.b.error("decrypting error : "+t.message),this.observer.trigger(u.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},t.prototype.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}();e.a=f},function(t,e,r){"use strict";function i(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}e.a=i},function(t,e,r){"use strict";function i(t,e,r){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(r);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(r)}}function a(t,e,r){var i=t[e],a=t[r],n=a.startPTS;isNaN(n)?a.start=r>e?i.start+i.duration:Math.max(i.start-a.duration,0):r>e?(i.duration=n-i.start,i.duration<0&&s.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-n,a.duration<0&&s.b.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}function n(t,e,r,i,n,o){var s=r;if(!isNaN(e.startPTS)){var l=Math.abs(e.startPTS-r);isNaN(e.deltaPTS)?e.deltaPTS=l:e.deltaPTS=Math.max(l,e.deltaPTS),s=Math.max(r,e.startPTS),r=Math.min(r,e.startPTS),i=Math.max(i,e.endPTS),n=Math.min(n,e.startDTS),o=Math.max(o,e.endDTS)}var u=r-e.start;e.start=e.startPTS=r,e.maxStartPTS=s,e.endPTS=i,e.startDTS=n,e.endDTS=o,e.duration=i-r;var d=e.sn;if(!t||dt.endSN)return 0;var c=void 0,h=void 0,f=void 0;for(c=d-t.startSN,h=t.fragments,h[c]=e,f=c;f>0;f--)a(h,f,f-1);for(f=c;f=0&&a3&&void 0!==arguments[3]?arguments[3]:null;if(r.isSidxRequest)return this._handleSidxRequest(t,r),void this._handlePlaylistLoaded(t,e,r,i);this.resetInternalLoader(r.type);var a=t.data;if(e.tload=p.now(),0!==a.indexOf("#EXTM3U"))return void this._handleManifestParsingError(t,r,"no EXTM3U delimiter",i);a.indexOf("#EXTINF:")>0||a.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(t,e,r,i):this._handleMasterPlaylist(t,e,r,i)},e.prototype.loaderror=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,r)},e.prototype.loadtimeout=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,r,!0)},e.prototype._handleMasterPlaylist=function(t,r,i,a){var n=this.hls,s=t.data,l=e.getResponseUrl(t,i),d=c.a.parseMasterPlaylist(s,l);if(!d.length)return void this._handleManifestParsingError(t,i,"no level found in manifest",a);var h=d.map(function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}}),f=c.a.parseMasterPlaylistMedia(s,l,"AUDIO",h),p=c.a.parseMasterPlaylistMedia(s,l,"SUBTITLES");if(f.length){var v=!1;f.forEach(function(t){t.url||(v=!0)}),!1===v&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(u.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main"}))}n.trigger(o.a.MANIFEST_LOADED,{levels:d,audioTracks:f,subtitles:p,url:l,stats:r,networkDetails:a})},e.prototype._handleTrackOrLevelPlaylist=function(t,r,i,a){var n=this.hls,s=i.id,l=i.level,u=i.type,d=e.getResponseUrl(t,i),h=isNaN(s)?0:s,f=isNaN(l)?h:l,g=e.mapContextToLevelType(i),y=c.a.parseLevelPlaylist(t.data,d,f,g,h);if(y.tload=r.tload,u===v.MANIFEST){var m={url:d,details:y};n.trigger(o.a.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:d,stats:r,networkDetails:a})}if(r.tparsed=p.now(),y.needSidxRanges){var b=y.initSegment.url;return void this.load(b,{isSidxRequest:!0,type:u,level:l,levelDetails:y,id:s,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}i.levelDetails=y,this._handlePlaylistLoaded(t,r,i,a)},e.prototype._handleSidxRequest=function(t,e){var r=d.a.parseSegmentIndex(new Uint8Array(t.data));r.references.forEach(function(t,r){var i=t.info,a=e.levelDetails.fragments[r];0===a.byteRange.length&&(a.rawByteRange=String(1+i.end-i.start)+"@"+String(i.start))}),e.levelDetails.initSegment.rawByteRange=String(r.moovEndOffset)+"@0"},e.prototype._handleManifestParsingError=function(t,e,r,i){this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.MANIFEST_PARSING_ERROR,fatal:!0,url:t.url,reason:r,networkDetails:i})},e.prototype._handleNetworkError=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];u.b.info("A network error occured while loading a "+t.type+"-type playlist");var i=void 0,a=void 0,n=this.getInternalLoader(t);switch(t.type){case v.MANIFEST:i=r?l.a.MANIFEST_LOAD_TIMEOUT:l.a.MANIFEST_LOAD_ERROR,a=!0;break;case v.LEVEL:i=r?l.a.LEVEL_LOAD_TIMEOUT:l.a.LEVEL_LOAD_ERROR,a=!1;break;case v.AUDIO_TRACK:i=r?l.a.AUDIO_TRACK_LOAD_TIMEOUT:l.a.AUDIO_TRACK_LOAD_ERROR,a=!1;break;default:a=!1}n&&(n.abort(),this.resetInternalLoader(t.type)),this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:i,fatal:a,url:n.url,loader:n,context:t,networkDetails:e})},e.prototype._handlePlaylistLoaded=function(t,r,i,a){var n=i.type,s=i.level,l=i.id,u=i.levelDetails;if(!u.targetduration)return void this._handleManifestParsingError(t,i,"invalid target duration",a);if(e.canHaveQualityLevels(i.type))this.hls.trigger(o.a.LEVEL_LOADED,{details:u,level:s||0,id:l||0,stats:r,networkDetails:a});else switch(n){case v.AUDIO_TRACK:this.hls.trigger(o.a.AUDIO_TRACK_LOADED,{details:u,id:l,stats:r,networkDetails:a});break;case v.SUBTITLE_TRACK:this.hls.trigger(o.a.SUBTITLE_TRACK_LOADED,{details:u,id:l,stats:r,networkDetails:a})}},h(e,null,[{key:"ContextType",get:function(){return v}},{key:"LevelType",get:function(){return g}}]),e}(s.a);e.a=y},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(0),n=r(1),o=Math.pow(2,32)-1,s=function(){function t(e,r){i(this,t),this.observer=e,this.remuxer=r}return t.prototype.resetTimeStamp=function(t){this.initPTS=t},t.prototype.resetInitSegment=function(e,r,i,a){if(e&&e.byteLength){var o=this.initData=t.parseInitSegment(e);null==r&&(r="mp4a.40.5"),null==i&&(i="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:r+","+i,initSegment:a?e:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:r,initSegment:a?e:null}),o.video&&(s.video={container:"video/mp4",codec:i,initSegment:a?e:null})),this.observer.trigger(n.a.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else r&&(this.audioCodec=r),i&&(this.videoCodec=i)},t.probe=function(e){return t.findBox({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint16=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<8|t[e+1];return r<0?65536+r:r},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r},t.writeUint32=function(t,e,r){t.data&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},t.findBox=function(e,r){var i=[],a=void 0,n=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0;if(e.data?(u=e.start,s=e.end,e=e.data):(u=0,s=e.byteLength),!r.length)return null;for(a=u;a1?a+n:s,o===r[0]&&(1===r.length?i.push({data:e,start:a+8,end:d}):(l=t.findBox({data:e,start:a+8,end:d},r.slice(1)),l.length&&(i=i.concat(l)))),a=d;return i},t.parseSegmentIndex=function(e){var r=t.findBox(e,["moov"])[0],i=r?r.end:null,a=0,n=t.findBox(e,["sidx"]),o=void 0;if(!n||!n[0])return null;o=[],n=n[0];var s=n.data[0];a=0===s?8:16;var l=t.readUint32(n,a);a+=4;a+=0===s?8:16,a+=2;var u=n.end+0,d=t.readUint16(n,a);a+=2;for(var c=0;c>>31)return void console.warn("SIDX has hierarchical references (not supported)");var v=t.readUint32(n,h);h+=4,o.push({referenceSize:p,subsegmentDuration:v,info:{duration:v/l,start:u,end:u+p-1}}),u+=p,h+=4,a=h}return{earliestPresentationTime:0,timescale:l,version:s,referencesCount:d,references:o,moovEndOffset:i}},t.parseInitSegment=function(e){var r=[];return t.findBox(e,["moov","trak"]).forEach(function(e){var i=t.findBox(e,["tkhd"])[0];if(i){var n=i.data[i.start],o=0===n?12:20,s=t.readUint32(i,o),l=t.findBox(e,["mdia","mdhd"])[0];if(l){n=l.data[l.start],o=0===n?12:20;var u=t.readUint32(l,o),d=t.findBox(e,["mdia","hdlr"])[0];if(d){var c=t.bin2str(d.data.subarray(d.start+8,d.start+12)),h={soun:"audio",vide:"video"}[c];if(h){var f=t.findBox(e,["mdia","minf","stbl","stsd"]);if(f.length){f=f[0];var p=t.bin2str(f.data.subarray(f.start+12,f.start+16));a.b.log("MP4Demuxer:"+h+":"+p+" found")}r[s]={timescale:u,type:h},r[h]={timescale:u,id:s}}}}}}),r},t.getStartDTS=function(e,r){var i=void 0,a=void 0,n=void 0;return i=t.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map(function(r){return t.findBox(r,["tfhd"]).map(function(i){var a=void 0,n=void 0;return a=t.readUint32(i,4),n=e[a].timescale||9e4,t.findBox(r,["tfdt"]).map(function(e){var r=void 0,i=void 0;return r=e.data[e.start],i=t.readUint32(e,4),1===r&&(i*=Math.pow(2,32),i+=t.readUint32(e,8)),i})[0]/n})})),n=Math.min.apply(null,a),isFinite(n)?n:0},t.offsetStartDTS=function(e,r,i){t.findBox(r,["moof","traf"]).map(function(r){return t.findBox(r,["tfhd"]).map(function(a){var n=t.readUint32(a,4),s=e[n].timescale||9e4;t.findBox(r,["tfdt"]).map(function(e){var r=e.data[e.start],a=t.readUint32(e,4);if(0===r)t.writeUint32(e,4,a-i*s);else{a*=Math.pow(2,32),a+=t.readUint32(e,8),a-=i*s,a=Math.max(a,0);var n=Math.floor(a/(o+1)),l=Math.floor(a%(o+1));t.writeUint32(e,4,n),t.writeUint32(e,8,l)}})})})},t.prototype.append=function(e,r,i,a){var o=this.initData;o||(this.resetInitSegment(e,this.audioCodec,this.videoCodec,!1),o=this.initData);var s=void 0,l=this.initPTS;if(void 0===l){var u=t.getStartDTS(o,e);this.initPTS=l=u-r,this.observer.trigger(n.a.INIT_PTS_FOUND,{initPTS:l})}t.offsetStartDTS(o,e,l),s=t.getStartDTS(o,e),this.remuxer.remux(o.audio,o.video,null,null,s,i,a,e)},t.prototype.destroy=function(){},t}();e.a=s},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(5),n=r.n(a),o=function(){function t(t,e){for(var r=0;r1?e-1:0),i=1;i1?e-1:0),i=1;i0&&null!=e&&null!=e.key&&"AES-128"===e.method){var p=this.decrypter;null==p&&(p=this.decrypter=new o.a(this.observer,this.config));var g=this,y=void 0;try{y=v.now()}catch(t){y=Date.now()}p.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var o=void 0;try{o=v.now()}catch(t){o=Date.now()}g.observer.trigger(a.a.FRAG_DECRYPTED,{stats:{tstart:y,tdecrypt:o}}),g.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,n,s,l,u,d,c,h,f)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,n,s,l,u,d,c,h,f)},t.prototype.pushDecrypted=function(t,e,r,i,o,f,p,v,g,y,m,b){var E=this.demuxer;if(!E||(p||v)&&!this.probe(t)){for(var T=this.observer,S=this.typeSupported,R=this.config,A=[{demux:u.a,remux:c.a},{demux:l.a,remux:h.a},{demux:s.a,remux:c.a},{demux:d.a,remux:c.a}],_=0,w=A.length;_>>6),(n=(60&e[r+2])>>>2)>c.length-1?void t.trigger(v.a.ERROR,{type:p.b.MEDIA_ERROR,details:p.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+n}):(s=(1&e[r+2])<<2,s|=(192&e[r+3])>>>6,f.b.log("manifest codec:"+i+",ADTS data:type:"+a+",sampleingIndex:"+n+"["+c[n]+"Hz],channelConfig:"+s),/firefox/i.test(u)?n>=6?(a=5,l=new Array(4),o=n-3):(a=2,l=new Array(2),o=n):-1!==u.indexOf("android")?(a=2,l=new Array(2),o=n):(a=5,l=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&n>=6?o=n-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(n>=6&&1===s||/vivaldi/i.test(u))||!i&&1===s)&&(a=2,l=new Array(2)),o=n)),l[0]=a<<3,l[0]|=(14&n)>>1,l[1]|=(1&n)<<7,l[1]|=s<<3,5===a&&(l[1]|=(14&o)>>1,l[2]=(1&o)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:c[n],channelCount:s,codec:"mp4a.40."+a,manifestCodec:d})}function a(t,e){return 255===t[e]&&240==(246&t[e+1])}function n(t,e){return 1&t[e+1]?7:9}function o(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function s(t,e){return!!(e+10&&e+s+l<=d)return u=r+i*a,{headerLength:s,frameLength:l,stamp:u}}function h(t,e,r,i,a){var n=d(t.samplerate),o=c(e,r,i,a,n);if(o){var s=o.stamp,l=o.headerLength,u=o.frameLength,h={unit:e.subarray(r+l,r+l+u),pts:s,dts:s};return t.samples.push(h),t.len+=u,{sample:h,length:u+l}}}e.d=s,e.e=l,e.c=u,e.b=d,e.a=h;var f=r(0),p=r(2),v=r(1);r(4)},function(t,e,r){"use strict";var i={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],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,e,r,i,a){if(!(r+24>e.length)){var n=this.parseHeader(e,r);if(n&&r+n.frameLength<=e.length){var o=9e4*n.samplesPerFrame/n.sampleRate,s=i+a*o,l={unit:e.subarray(r,r+n.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=n.channelCount,t.samplerate=n.sampleRate,t.samples.push(l),t.len+=n.frameLength,{sample:l,length:n.frameLength}}}},parseHeader:function(t,e){var r=t[e+1]>>3&3,a=t[e+1]>>1&3,n=t[e+2]>>4&15,o=t[e+2]>>2&3,s=t[e+2]>>1&1;if(1!==r&&0!==n&&15!==n&&3!==o){var l=3===r?3-a:3===a?3:4,u=1e3*i.BitratesMap[14*l+n-1],d=3===r?0:2===r?1:2,c=i.SamplingRateMap[3*d+o],h=t[e+3]>>6==3?1:2,f=i.SamplesCoefficients[r][a],p=i.BytesInSlot[a],v=8*f*p;return{sampleRate:c,channelCount:h,frameLength:parseInt(f*u/c+s,10)*p,samplesPerFrame:v}}},isHeaderPattern:function(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])},isHeader:function(t,e){return!!(e+1e?-1:0})}function n(t,e,r){var i=!1;return e&&e.details&&r&&(r.endCC>r.startCC||t&&t.cc0;)t.removeCue(t.cues[0])}e.b=i,e.a=a},function(t,e,r){"use strict";function i(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new d,this.regionList=[]}function a(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+(0|i)/1e3}var r=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?e(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?e(r[1],r[2],0,r[4]):e(0,r[1],r[2],r[4]):null}function n(){this.values=Object.create(null)}function o(t,e,r,i){var a=i?t.split(i):[t];for(var n in a)if("string"==typeof a[n]){var o=a[n].split(r);if(2===o.length){var s=o[0],l=o[1];e(s,l)}}}function s(t,e,r){function i(){var e=a(t);if(null===e)throw new Error("Malformed timestamp: "+l);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function s(){t=t.replace(/^\s+/,"")}var l=t;if(s(),e.startTime=i(),s(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+l);t=t.substr(3),s(),e.endTime=i(),s(),function(t,e){var i=new n;o(t,function(t,e){switch(t){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===e){i.set(t,r[a].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":var n=e.split(","),o=n[0];i.integer(t,o),i.percent(t,o)&&i.set("snapToLines",!1),i.alt(t,o,["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",h,"end"]);break;case"position":n=e.split(","),i.percent(t,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",h,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",h,"end","left","right"])}},/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&-1===c.line&&(a=-1),e.line=a,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",h);var s=i.get("position","auto");"auto"===s&&50===c.position&&(s="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=s}(t,e)}function l(t){return t.replace(//gi,"\n")}r.d(e,"b",function(){return l});var u=r(64),d=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};n.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,r){for(var i=0;i=0&&e<=100)&&(this.set(t,e),!0)}};var c=new u.a(0,0,0),h="middle"===c.align?"middle":"center";i.prototype={parse:function(t){function e(){var t=r.buffer,e=0;for(t=l(t);e0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var a=t.DefaultConfig;if((r.liveSyncDurationCount||r.liveMaxLatencyDurationCount)&&(r.liveSyncDuration||r.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var n in a)n in r||(r[n]=a[n]);if(void 0!==r.liveMaxLatencyDurationCount&&r.liveMaxLatencyDurationCount<=r.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==r.liveMaxLatencyDuration&&(r.liveMaxLatencyDuration<=r.liveSyncDuration||void 0===r.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(v.a)(r.debug),this.config=r,this._autoLevelCapping=-1;var o=this.observer=new b.a;o.trigger=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:-1;v.b.log("startLoad("+t+")"),this.networkControllers.forEach(function(e){e.startLoad(t)})},t.prototype.stopLoad=function(){v.b.log("stopLoad"),this.networkControllers.forEach(function(t){t.stopLoad()})},t.prototype.swapAudioCodec=function(){v.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){v.b.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)},E(t,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){v.b.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){v.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){v.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){v.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){v.b.log("set startLevel:"+t);var e=this;-1!==t&&(t=Math.max(t,e.minAutoLevel)),e.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){v.b.log("set autoLevelCapping:"+t),this._autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this,e=t.levels,r=t.config.minAutoBitrate,i=e?e.length:0,a=0;ar)return a}return 0}},{key:"maxAutoLevel",get:function(){var t=this,e=t.levels,r=t.autoLevelCapping;return-1===r&&e&&e.length?e.length-1:r}},{key:"nextAutoLevel",get:function(){var t=this;return Math.min(Math.max(t.abrController.nextAutoLevel,t.minAutoLevel),t.maxAutoLevel)},set:function(t){var e=this;e.abrController.nextAutoLevel=Math.max(e.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),t}();e.default=T},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(5),n=r.n(a),o=r(9),s=r(18),l=r(30),u=r(0),d=r(19),c=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,h=/#EXT-X-MEDIA:(.*)/g,f=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),p=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,v=/\.(mp4|m4s|m4v|m4a)$/i,g=function(){function t(){i(this,t)}return t.findGroup=function(t,e){if(!t)return null;for(var r=null,i=0;i2?(e=r.shift()+".",e+=parseInt(r.shift()).toString(16),e+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):e=t,e},t.resolve=function(t,e){return n.a.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var i=[],a=void 0;for(c.lastIndex=0;null!=(a=c.exec(e));){var n={},o=n.attrs=new l.a(a[1]);n.url=t.resolve(a[2],r);var s=o.decimalResolution("RESOLUTION");s&&(n.width=s.width,n.height=s.height),n.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),n.name=o.NAME,function(t,e){["video","audio"].forEach(function(r){var i=t.filter(function(t){return Object(d.b)(t,r)});if(i.length){var a=i.filter(function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)});e[r+"Codec"]=a.length>0?a[0]:i[0],t=t.filter(function(t){return-1===i.indexOf(t)})}}),e.unknownCodecs=t}([].concat((o.CODECS||"").split(/[ ,]+/)),n),n.videoCodec&&-1!==n.videoCodec.indexOf("avc1")&&(n.videoCodec=t.convertAVC1ToAVCOTI(n.videoCodec)),i.push(n)}return i},t.parseMasterPlaylistMedia=function(e,r,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],n=void 0,o=[],s=0;for(h.lastIndex=0;null!==(n=h.exec(e));){var u={},d=new l.a(n[1]);if(d.TYPE===i){if(u.groupId=d["GROUP-ID"],u.name=d.NAME,u.type=i,u.default="YES"===d.DEFAULT,u.autoselect="YES"===d.AUTOSELECT,u.forced="YES"===d.FORCED,d.URI&&(u.url=t.resolve(d.URI,r)),u.lang=d.LANGUAGE,u.name||(u.name=u.lang),a.length){var c=t.findGroup(a,u.groupId);u.audioCodec=c?c.codec:a[0].codec}u.id=s++,o.push(u)}}return o},t.parseLevelPlaylist=function(t,e,r,i,a){var n=0,d=0,c={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},h=new s.a,g=0,y=null,m=new o.a,b=void 0,E=void 0;for(f.lastIndex=0;null!==(b=f.exec(t));){var T=b[1];if(T){m.duration=parseFloat(T);var S=(" "+b[2]).slice(1);m.title=S||null,m.tagList.push(S?["INF",T,S]:["INF",T])}else if(b[3]){if(!isNaN(m.duration)){var R=n++;m.type=i,m.start=d,m.levelkey=h,m.sn=R,m.level=r,m.cc=g,m.urlId=a,m.baseurl=e,m.relurl=(" "+b[3]).slice(1),c.programDateTime&&(y?m.rawProgramDateTime?m.pdt=Date.parse(m.rawProgramDateTime):m.pdt=y.pdt+1e3*y.duration:m.pdt=Date.parse(c.programDateTime),m.endPdt=m.pdt+1e3*m.duration),c.fragments.push(m),y=m,d+=m.duration,m=new o.a}}else if(b[4]){if(m.rawByteRange=(" "+b[4]).slice(1),y){var A=y.byteRangeEndOffset;A&&(m.lastByteRangeEndOffset=A)}}else if(b[5])m.rawProgramDateTime=(" "+b[5]).slice(1),m.tagList.push(["PROGRAM-DATE-TIME",m.rawProgramDateTime]),void 0===c.programDateTime&&(c.programDateTime=new Date(new Date(Date.parse(b[5]))-1e3*d));else{for(b=b[0].match(p),E=1;E=0&&(h.method=I,h.baseuri=e,h.reluri=k,h.key=null,h.iv=O));break;case"START":var C=_,P=new l.a(C),x=P.decimalFloatingPoint("TIME-OFFSET");isNaN(x)||(c.startTimeOffset=x);break;case"MAP":var F=new l.a(_);m.relurl=F.URI,m.rawByteRange=F.BYTERANGE,m.baseurl=e,m.level=r,m.type=i,m.sn="initSegment",c.initSegment=m,m=new o.a;break;default:u.b.warn("line parsed but not handled: "+b)}}}return m=y,m&&!m.relurl&&(c.fragments.pop(),d-=m.duration),c.totalduration=d,c.averagetargetduration=d/c.fragments.length,c.endSN=n-1,c.startCC=c.fragments[0]?c.fragments[0].cc:0,c.endCC=g,!c.initSegment&&c.fragments.length&&c.fragments.every(function(t){return v.test(t.relurl)})&&(u.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),m=new o.a,m.relurl=c.fragments[0].relurl,m.baseurl=e,m.level=r,m.type=i,m.sn="initSegment",c.initSegment=m,c.needSidxRanges=!0),c},t}();e.a=g},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=/^(\d+)x(\d+)$/,n=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function t(e){i(this,t),"string"==typeof e&&(e=t.parseAttrList(e));for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r])}return t.prototype.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;iNumber.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=a.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e=void 0,r={};for(n.lastIndex=0;null!==(e=n.exec(t));){var i=e[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}();e.a=o},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(2),u=r(0),d=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.FRAG_LOADING));return n.loaders={},n}return n(e,t),e.prototype.destroy=function(){var e=this.loaders;for(var r in e){var i=e[r];i&&i.destroy()}this.loaders={},t.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag,r=e.type,i=this.loaders,a=this.hls.config,n=a.fLoader,o=a.loader;e.loaded=0;var s=i[r];s&&(u.b.warn("abort previous fragment loader for type: "+r),s.abort()),s=i[r]=e.loader=a.fLoader?new n(a):new o(a);var l=void 0,d=void 0,c=void 0;l={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var h=e.byteRangeStartOffset,f=e.byteRangeEndOffset;isNaN(h)||isNaN(f)||(l.rangeStart=h,l.rangeEnd=f),d={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},s.load(l,d,c)},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.data,n=r.frag;n.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(o.a.FRAG_LOADED,{payload:a,frag:n,stats:e,networkDetails:i})},e.prototype.loaderror=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:r})},e.prototype.loadtimeout=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:r})},e.prototype.loadprogress=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=e.frag;a.loaded=t.loaded,this.hls.trigger(o.a.FRAG_LOAD_PROGRESS,{frag:a,stats:t,networkDetails:i})},e}(s.a);e.a=d},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(2),u=r(0),d=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.KEY_LOADING));return n.loaders={},n.decryptkey=null,n.decrypturl=null,n}return n(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},s.a.prototype.destroy.call(this)},e.prototype.onKeyLoading=function(t){var e=t.frag,r=e.type,i=this.loaders[r],a=e.decryptdata,n=a.uri;if(n!==this.decrypturl||null===this.decryptkey){var s=this.hls.config;i&&(u.b.warn("abort previous key loader for type:"+r),i.abort()),e.loader=this.loaders[r]=new s.loader(s),this.decrypturl=n,this.decryptkey=null;var l=void 0,d=void 0,c=void 0;l={url:n,frag:e,responseType:"arraybuffer"},d={timeout:s.fragLoadingTimeOut,maxRetry:s.fragLoadingMaxRetry,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(l,d,c)}else this.decryptkey&&(a.key=this.decryptkey,this.hls.trigger(o.a.KEY_LOADED,{frag:e}))},e.prototype.loadsuccess=function(t,e,r){var i=r.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(o.a.KEY_LOADED,{frag:i})},e.prototype.loaderror=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.prototype.loadtimeout=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},e}(s.a);e.a=d},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(6),s=r(11),l=r(20),u=r(1),d=r(10),c=r(9),h=r(16),f=r(15),p=r(24),v=r(2),g=r(0),y=r(25),m=r(8),b=r(49),E=function(){function t(t,e){for(var r=0;r0&&-1===t&&(g.b.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=T.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=T.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.clearInterval(),this.state=T.STOPPED,this.forceStartLoad=!1},e.prototype.doTick=function(){switch(this.state){case T.BUFFER_FLUSHING:this.fragLoadError=0;break;case T.IDLE:this._doTickIdle();break;case T.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=T.IDLE);break;case T.FRAG_LOADING_WAITING_RETRY:var e=window.performance.now(),r=this.retryDate;(!r||e>=r||this.media&&this.media.seeking)&&(g.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=T.IDLE);break;case T.ERROR:case T.STOPPED:case T.FRAG_LOADING:case T.PARSING:case T.PARSED:case T.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},e.prototype._doTickIdle=function(){var t=this.hls,e=t.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&e.startFragPrefetch)){var i=void 0;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var a=t.nextLoadLevel,n=this.levels[a];if(n){var o=n.bitrate,l=void 0;l=o?Math.max(8*e.maxBufferSize/o,e.maxBufferLength):e.maxBufferLength,l=Math.min(l,e.maxMaxBufferLength);var d=s.a.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,e.maxBufferHole),c=d.len;if(!(c>=l)){g.b.trace("buffer length of "+c.toFixed(3)+" is below max of "+l.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=a;var h=n.details;if(!h||h.live&&this.levelLastLoaded!==a)return void(this.state=T.WAITING_LEVEL);var f=this.fragPrevious;if(!h.live&&f&&!f.backtracked&&f.sn===h.endSN&&!d.nextStart){if(Math.min(r.duration,f.start+f.duration)-Math.max(d.end,f.start)<=Math.max(.2,f.duration)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(u.a.BUFFER_EOS,p),void(this.state=T.ENDED)}}this._fetchPayloadOrEos(i,d,h)}}}},e.prototype._fetchPayloadOrEos=function(t,e,r){var i=this.fragPrevious,a=this.level,n=r.fragments,o=n.length;if(0!==o){var s=n[0].start,l=n[o-1].start+n[o-1].duration,u=e.end,d=void 0;if(r.initSegment&&!r.initSegment.data)d=r.initSegment;else if(r.live){var c=this.config.initialLiveManifestSize;if(oh&&(u.currentTime=h),this.nextLoadPosition=h}if(t.PTSKnown&&e>i&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(a)if(t.programDateTime)d=Object(b.b)(n,a.endPdt+1);else{var f=a.sn+1;if(f>=t.startSN&&f<=t.endSN){var p=n[f-t.startSN];a.cc===p.cc&&(d=p,g.b.log("live playlist, switching playlist, load frag with next SN: "+d.sn))}d||(d=o.a.search(n,function(t){return a.cc-t.cc}))&&g.b.log("live playlist, switching playlist, load frag with same CC: "+d.sn)}d||(d=n[Math.min(s-1,Math.round(s/2))],g.b.log("live playlist, switching playlist, unknown, load middle frag : "+d.sn))}return d},e.prototype._findFragment=function(t,e,r,i,a,n,o){var s=this.hls.config,l=void 0,u=void 0;if(as.maxBufferHole&&e.dropped&&d?(l=h,g.b.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")):(l=f,g.b.log("SN just loaded, load next one: "+l.sn))}else l=null;else l.backtracked&&(f&&f.backtracked?(g.b.warn("Already backtracked from fragment "+f.sn+", will not backtrack to fragment "+l.sn+". Loading fragment "+f.sn),l=f):(g.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),l.dropped=0,h?(l=h,l.backtracked=!0):d&&(l=null)))}return l},e.prototype._loadKey=function(t){this.state=T.KEY_LOADING,this.hls.trigger(u.a.KEY_LOADING,{frag:t})},e.prototype._loadFragment=function(t){var e=this.fragmentTracker.getState(t);this.fragCurrent=t,this.startFragRequested=!0,isNaN(t.sn)||t.bitrateTest||(this.nextLoadPosition=t.start+t.duration),t.backtracked||e===d.a.NOT_LOADED||e===d.a.PARTIAL?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(u.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new l.a(this.hls,"main")),this.state=T.FRAG_LOADING):e===d.a.APPENDING&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)},e.prototype.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,h.a.LevelType.MAIN)},e.prototype.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},e.prototype._checkFragmentChanged=function(){var t=void 0,e=void 0,r=this.media;if(r&&r.readyState&&!1===r.seeking&&(e=r.currentTime,e>this.lastCurrentTime&&(this.lastCurrentTime=e),s.a.isBuffered(r,e)?t=this.getBufferedFrag(e):s.a.isBuffered(r,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var i=t;if(i!==this.fragPlaying){this.hls.trigger(u.a.FRAG_CHANGED,{frag:i});var a=i.level;this.fragPlaying&&this.fragPlaying.level===a||this.hls.trigger(u.a.LEVEL_SWITCHED,{level:a}),this.fragPlaying=i}}},e.prototype.immediateLevelSwitch=function(){if(g.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,e=void 0;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},e.prototype.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,s.a.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},e.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e=void 0,r=void 0,i=void 0;if(r=this.getBufferedFrag(t.currentTime),r&&r.startPTS>1&&this.flushMainBuffer(0,r.startPTS-1),t.paused)e=0;else{var a=this.hls.nextLoadLevel,n=this.levels[a],o=this.fragLastKbps;e=o&&this.fragCurrent?this.fragCurrent.duration*n.bitrate/(1e3*o)+1:0}if((i=this.getBufferedFrag(t.currentTime+e))&&(i=this.followingBufferedFrag(i))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.maxStartPTS,Number.POSITIVE_INFINITY)}}},e.prototype.flushMainBuffer=function(t,e){this.state=T.BUFFER_FLUSHING;var r={startOffset:t,endOffset:e};this.altAudio&&(r.type="video"),this.hls.trigger(u.a.BUFFER_FLUSHING,r)},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(g.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.backtracked=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){var t=this.media,e=t?t.currentTime:void 0,r=this.config;isNaN(e)||g.b.log("media seeking to "+e.toFixed(3));var i=this.mediaBuffer?this.mediaBuffer:t,a=s.a.bufferInfo(i,e,this.config.maxBufferHole);if(this.state===T.FRAG_LOADING){var n=this.fragCurrent;if(0===a.len&&n){var o=r.maxFragLookUpTolerance,l=n.start-o,u=n.start+n.duration+o;eu?(n.loader&&(g.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=T.IDLE):g.b.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===T.ENDED&&(0===a.len&&(this.fragPrevious=0),this.state=T.IDLE);t&&(this.lastCurrentTime=e),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=e),this.tick()},e.prototype.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;isNaN(e)||g.b.log("media seeked to "+e.toFixed(3)),this.tick()},e.prototype.onMediaEnded=function(){g.b.log("media ended"),this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestLoading=function(){g.b.log("trigger BUFFER_RESET"),this.hls.trigger(u.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestParsed=function(t){var e=!1,r=!1,i=void 0;t.levels.forEach(function(t){(i=t.audioCodec)&&(-1!==i.indexOf("mp4a.40.2")&&(e=!0),-1!==i.indexOf("mp4a.40.5")&&(r=!0))}),this.audioCodecSwitch=e&&r,this.audioCodecSwitch&&g.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1;var a=this.config;(a.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(a.startPosition)},e.prototype.onLevelLoaded=function(t){var e=t.details,r=t.level,i=this.levels[this.levelLastLoaded],a=this.levels[r],n=e.totalduration,o=0;if(g.b.log("level "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+n),e.live){var s=a.details;s&&e.fragments.length>0?(f.b(s,e),o=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,s),e.PTSKnown&&!isNaN(o)?g.b.log("live playlist sliding:"+o.toFixed(3)):(g.b.log("live playlist - outdated PTS, unknown sliding"),Object(y.a)(this.fragPrevious,i,e))):(g.b.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,Object(y.a)(this.fragPrevious,i,e))}else e.PTSKnown=!1;if(a.details=e,this.levelLastLoaded=r,this.hls.trigger(u.a.LEVEL_UPDATED,{details:e,level:r}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var l=e.startTimeOffset;isNaN(l)?e.live?(this.startPosition=this.computeLivePosition(o,e),g.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(l<0&&(g.b.log("negative start time offset "+l+", count from end of last fragment"),l=o+n+l),g.b.log("start time offset found in playlist, adjust startPosition to "+l),this.startPosition=l),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===T.WAITING_LEVEL&&(this.state=T.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===T.KEY_LOADING&&(this.state=T.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===T.FRAG_LOADING&&e&&"main"===r.type&&r.level===e.level&&r.sn===e.sn){var i=t.stats,a=this.levels[e.level],n=a.details;if(g.b.log("Loaded "+e.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+e.level),this.bitrateTest=!1,this.stats=i,!0===r.bitrateTest&&this.hls.nextLoadLevel)this.state=T.IDLE,this.startFragRequested=!1,i.tparsed=i.tbuffered=window.performance.now(),this.hls.trigger(u.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else if("initSegment"===r.sn)this.state=T.IDLE,i.tparsed=i.tbuffered=window.performance.now(),n.initSegment.data=t.payload,this.hls.trigger(u.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else{this.state=T.PARSING;var o=n.totalduration,s=e.level,d=e.sn,c=this.config.defaultAudioCodec||a.audioCodec;this.audioCodecSwap&&(g.b.log("swapping playlist audio codec"),void 0===c&&(c=this.lastAudioCodec),c&&(c=-1!==c.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,g.b.log("Parsing "+d+" of ["+n.startSN+" ,"+n.endSN+"],level "+s+", cc "+e.cc);var h=this.demuxer;h||(h=this.demuxer=new l.a(this.hls,"main"));var f=this.media,p=f&&f.seeking,v=!p&&(n.PTSKnown||!n.live),y=n.initSegment?n.initSegment.data:[];h.push(t.payload,y,c,a.videoCodec,e,o,v,void 0)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===T.PARSING){var i=t.tracks,a=void 0,n=void 0;if(i.audio&&this.altAudio&&delete i.audio,n=i.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(g.b.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==n.metadata.channelCount&&-1===s.indexOf("firefox")&&(o="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==n.container&&(o="mp4a.40.2",g.b.log("Android: force audio codec to "+o)),n.levelCodec=o,n.id=t.id}n=i.video,n&&(n.levelCodec=this.levels[this.level].videoCodec,n.id=t.id),this.hls.trigger(u.a.BUFFER_CODECS,i);for(a in i){n=i[a],g.b.log("main track:"+a+",container:"+n.container+",codecs[level/parsed]=["+n.levelCodec+"/"+n.codec+"]");var l=n.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.a.BUFFER_APPENDING,{type:a,data:l,parent:"main",content:"initSegment"}))}this.tick()}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"main"===t.id&&i.sn===r.sn&&i.level===r.level&&("audio"!==t.type||!this.altAudio)&&this.state===T.PARSING){var a=this.levels[this.level],n=r;if(isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),!0===t.hasAudio&&n.addElementaryStream(c.a.ElementaryStreamTypes.AUDIO),!0===t.hasVideo&&n.addElementaryStream(c.a.ElementaryStreamTypes.VIDEO),g.b.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(n.dropped=t.dropped,n.dropped)if(n.backtracked)g.b.warn("Already backtracked on this fragment, appending with the gap",n.sn);else{var o=a.details;if(!o||n.sn!==o.startSN)return g.b.warn("missing video frame(s), backtracking fragment",n.sn),this.fragmentTracker.removeFragment(n),n.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=T.IDLE,this.fragPrevious=n,void this.tick();g.b.warn("missing video frame(s) on first frag, appending with gap",n.sn)}else n.backtracked=!1;var s=f.c(a.details,n,t.startPTS,t.endPTS,t.startDTS,t.endDTS),l=this.hls;l.trigger(u.a.LEVEL_PTS_UPDATED,{details:a.details,level:this.level,drift:s,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(r){r&&r.length&&e.state===T.PARSING&&(e.appended=!0,e.pendingBuffering=!0,l.trigger(u.a.BUFFER_APPENDING,{type:t.type,data:r,parent:"main",content:"data"}))}),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===T.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=T.PARSED,this._checkAppendedParsed())},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url,r=t.id;if(!e){if(this.mediaBuffer!==this.media){g.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(g.b.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=T.IDLE}var a=this.hls;a.trigger(u.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:r}),this.altAudio=!1}},e.prototype.onAudioTrackSwitched=function(t){var e=t.id,r=!!this.hls.audioTracks[e].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(g.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},e.prototype.onBufferCreated=function(t){var e=t.tracks,r=void 0,i=void 0,a=!1;for(var n in e){var o=e[n];"main"===o.id?(i=n,r=o,"video"===n&&(this.videoBuffer=e[n].buffer)):a=!0}a&&r?(g.b.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},e.prototype.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;e!==T.PARSING&&e!==T.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==T.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var e=this.mediaBuffer?this.mediaBuffer:this.media;g.b.log("main buffered : "+p.a.toString(e.buffered)),this.fragPrevious=t;var r=this.stats;r.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),this.hls.trigger(u.a.FRAG_BUFFERED,{stats:r,frag:t,id:"main"}),this.state=T.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var r=!!this.media&&s.a.isBuffered(this.media,this.media.currentTime)&&s.a.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case v.a.FRAG_LOAD_ERROR:case v.a.FRAG_LOAD_TIMEOUT:case v.a.KEY_LOAD_ERROR:case v.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);g.b.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=window.performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=T.FRAG_LOADING_WAITING_RETRY}else g.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=T.ERROR;break;case v.a.LEVEL_LOAD_ERROR:case v.a.LEVEL_LOAD_TIMEOUT:this.state!==T.ERROR&&(t.fatal?(this.state=T.ERROR,g.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==T.WAITING_LEVEL||(this.state=T.IDLE));break;case v.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==T.PARSING&&this.state!==T.PARSED||(r?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=T.IDLE):(g.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},e.prototype._reduceMaxBufferLength=function(t){var e=this.config;return e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,g.b.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},e.prototype._checkBuffer=function(){var t=this.config,e=this.media;if(e&&0!==e.readyState){var r=e.currentTime,i=this.mediaBuffer?this.mediaBuffer:e,a=i.buffered;if(!this.loadedmetadata&&a.length)this.loadedmetadata=!0,this._seekToStartPos();else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var n=!(e.paused&&e.readyState>1||e.ended||0===e.buffered.length),o=window.performance.now();if(r!==this.lastCurrentTime)this.stallReported&&(g.b.warn("playback not stuck anymore @"+r+", after "+Math.round(o-this.stalled)+"ms"),this.stallReported=!1),this.stalled=null,this.nudgeRetry=0;else if(n){var l=o-this.stalled,u=s.a.bufferInfo(e,r,t.maxBufferHole);if(!this.stalled)return void(this.stalled=o);l>=1e3&&this._reportStall(u.len),this._tryFixBufferStall(u,l)}}}},e.prototype.onFragLoadEmergencyAborted=function(){this.state=T.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},e.prototype.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;t&&this.fragmentTracker.detectEvictedFragments(c.a.ElementaryStreamTypes.VIDEO,t.buffered),this.state=T.IDLE,this.fragPrevious=null},e.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},e.prototype.computeLivePosition=function(t,e){var r=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*e.targetduration;return t+Math.max(0,e.totalduration-r)},e.prototype._tryFixBufferStall=function(t,e){var r=this.config,i=this.media,a=i.currentTime,n=this.fragmentTracker.getPartialFragment(a);n&&this._trySkipBufferHole(n),t.len>.5&&e>1e3*r.highBufferWatchdogPeriod&&(this.stalled=null,this._tryNudgeBuffer())},e.prototype._reportStall=function(t){var e=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,g.b.warn("Playback stalling at @"+r.currentTime+" due to low buffer"),e.trigger(u.a.ERROR,{type:v.b.MEDIA_ERROR,details:v.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e.prototype._trySkipBufferHole=function(t){for(var e=this.hls,r=this.media,i=r.currentTime,a=0,n=0;n=a&&i"+t),this.hls.trigger(u.a.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(m.a);e.a=S},function(t,e,r){function i(t){function e(i){if(r[i])return r[i].exports;var a=r[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var r={};e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e.oe=function(t){throw console.error(t),t};var i=e(e.s=ENTRY_MODULE);return i.default||i}function a(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function n(t,e,i){var n={};n[i]=[];var o=e.toString(),s=o.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return n;for(var d,c=s[1],h=new RegExp("(\\\\n|\\W)"+a(c)+u,"g");d=h.exec(o);)"dll-reference"!==d[3]&&n[i].push(d[3]);for(h=new RegExp("\\("+a(c)+'\\("(dll-reference\\s('+l+'))"\\)\\)'+u,"g");d=h.exec(o);)t[d[2]]||(n[i].push(d[1]),t[d[2]]=r(d[1]).m),n[d[2]]=n[d[2]]||[],n[d[2]].push(d[4]);return n}function o(t){return Object.keys(t).reduce(function(e,r){return e||t[r].length>0},!1)}function s(t,e){for(var r={main:[e]},i={main:[]},a={main:{}};o(r);)for(var s=Object.keys(r),l=0;l>>8^255&g^99,t[f]=g,e[g]=f;var y=h[f],m=h[y],b=h[m],E=257*h[g]^16843008*g;i[f]=E<<24|E>>>8,a[f]=E<<16|E>>>16,n[f]=E<<8|E>>>24,o[f]=E,E=16843009*b^65537*m^257*y^16843008*f,l[g]=E<<24|E>>>8,u[g]=E<<16|E>>>16,d[g]=E<<8|E>>>24,c[g]=E,f?(f=y^h[h[h[b^y]]],p^=h[h[p]]):f=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i>4>1){if((h=n+5+e[n+4])===n+188)continue}else h=n+4;switch(c){case b:l&&(R&&(f=D(R))&&void 0!==f.pts&&I(f,!1),R={data:[],size:0}),R&&(R.data.push(e.subarray(h,n+188)),R.size+=n+188-h);break;case E:l&&(A&&(f=D(A))&&void 0!==f.pts&&(y.isAAC?k(f):O(f)),A={data:[],size:0}),A&&(A.data.push(e.subarray(h,n+188)),A.size+=n+188-h);break;case T:l&&(_&&(f=D(_))&&void 0!==f.pts&&C(f),_={data:[],size:0}),_&&(_.data.push(e.subarray(h,n+188)),_.size+=n+188-h);break;case 0:l&&(h+=e[h]+1),S=this._pmtId=w(e,h);break;case S:l&&(h+=e[h]+1);var x=L(e,h,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);b=x.avc,b>0&&(g.pid=b),E=x.audio,E>0&&(y.pid=E,y.isAAC=x.isAAC),T=x.id3,T>0&&(m.pid=T),p&&!v&&(u.b.log("reparse from beginning"),p=!1,n=P-188),v=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(o.a.ERROR,{type:d.b.MEDIA_ERROR,details:d.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});R&&(f=D(R))&&void 0!==f.pts?(I(f,!0),g.pesData=null):g.pesData=R,A&&(f=D(A))&&void 0!==f.pts?(y.isAAC?k(f):O(f),y.pesData=null):(A&&A.size&&u.b.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=A),_&&(f=D(_))&&void 0!==f.pts?(C(f),m.pesData=null):m.pesData=_,null==this.sampleAes?this.remuxer.remux(y,g,m,this._txtTrack,r,i,a):this.decryptAndRemux(y,g,m,this._txtTrack,r,i,a)},t.prototype.decryptAndRemux=function(t,e,r,i,a,n,o){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){s.decryptAndRemuxAvc(t,e,r,i,a,n,o)})}else this.decryptAndRemuxAvc(t,e,r,i,a,n,o)},t.prototype.decryptAndRemuxAvc=function(t,e,r,i,a,n,o){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){s.remuxer.remux(t,e,r,i,a,n,o)})}else this.remuxer.remux(t,e,r,i,a,n,o)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,r,i){var a=void 0,n=void 0,o=void 0,s=void 0,l={audio:-1,avc:-1,id3:-1,isAAC:!0};for(a=(15&t[e+1])<<8|t[e+2],n=e+3+a-4,o=(15&t[e+10])<<8|t[e+11],e+=12+o;e1;){var h=new Uint8Array(c[0].length+c[1].length);h.set(c[0]),h.set(c[1],c[0].length),c[0]=h,c.splice(1,1)}if(r=c[0],1===(r[0]<<16)+(r[1]<<8)+r[2]){if((a=(r[4]<<8)+r[5])&&a>t.size-6)return null;i=r[7],192&i&&(s=536870912*(14&r[9])+4194304*(255&r[10])+16384*(254&r[11])+128*(255&r[12])+(254&r[13])/2,s>4294967295&&(s-=8589934592),64&i?(l=536870912*(14&r[14])+4194304*(255&r[15])+16384*(254&r[16])+128*(255&r[17])+(254&r[18])/2,l>4294967295&&(l-=8589934592),s-l>54e5&&(u.b.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),n=r[8],d=n+9,t.size-=d,o=new Uint8Array(t.size);for(var f=0,p=c.length;fv){d-=v;continue}r=r.subarray(d),v-=d,d=0}o.set(r,e),e+=v}return a&&(a-=n+3),{data:o,pts:s,dts:l,len:a}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var r=e.samples,i=r.length;!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(i||this.contiguous)?(t.id=i,r.push(t)):e.dropped++}t.debug.length&&u.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var r=this,i=this._avcTrack,a=this._parseAVCNALu(t.data),n=void 0,o=this.avcSample,l=void 0,u=!1,d=void 0,c=this.pushAccesUnit.bind(this),h=function(t,e,r,i){return{key:t,pts:e,dts:r,units:[],debug:i}};t.data=null,o&&a.length&&!i.audFound&&(c(o,i),o=this.avcSample=h(!1,t.pts,t.dts,"")),a.forEach(function(e){switch(e.type){case 1:l=!0,o||(o=r.avcSample=h(!0,t.pts,t.dts,"")),o.frame=!0;var a=e.data;if(u&&a.length>4){var f=new s.a(a).readSliceType();2!==f&&4!==f&&7!==f&&9!==f||(o.key=!0)}break;case 5:l=!0,o||(o=r.avcSample=h(!0,t.pts,t.dts,"")),o.key=!0,o.frame=!0;break;case 6:l=!0,n=new s.a(r.discardEPB(e.data)),n.readUByte();for(var p=0,v=0,g=!1,y=0;!g&&n.bytesAvailable>1;){p=0;do{y=n.readUByte(),p+=y}while(255===y);v=0;do{y=n.readUByte(),v+=y}while(255===y);if(4===p&&0!==n.bytesAvailable){g=!0;if(181===n.readUByte()){if(49===n.readUShort()){if(1195456820===n.readUInt()){if(3===n.readUByte()){var m=n.readUByte(),b=n.readUByte(),E=31&m,T=[m,b];for(d=0;d0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts=0)u={data:t.subarray(c,e-o-1),type:h},l.push(u);else{var f=this._getLastNalUnit();if(f&&(s&&e<=4-s&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-s)),(a=e-o-1)>0)){var p=new Uint8Array(f.data.byteLength+a);p.set(f.data,0),p.set(t.subarray(0,a),f.data.byteLength),f.data=p}}e=0&&o>=0&&(u={data:t.subarray(c,r),type:h,state:o},l.push(u)),0===l.length){var v=this._getLastNalUnit();if(v){var g=new Uint8Array(v.data.byteLength+t.byteLength);g.set(v.data,0),g.set(t,v.data.byteLength),v.data=g}}return n.naluState=o,l},t.prototype.discardEPB=function(t){for(var e=t.byteLength,r=[],i=1,a=void 0,n=void 0;i1&&(u.b.log("AAC: align PTS for overlapping frames by "+Math.round((m-i)/90)),i=m)}for(;ht?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&a.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0&&this.bitsAvailable?r<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e=8,r=8,i=void 0,a=void 0;for(i=0;i=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,a=32;a<=t.length-16;a+=160,i+=16)r.set(t.subarray(a,a+16),i);return r},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var r=0,i=32;i<=t.length-16;i+=160,r+=16)t.set(e.subarray(r,r+16),i);return t},t.prototype.decryptAvcSample=function(t,e,r,i,a,n){var o=this.discardEPB(a.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){a.data=l.getAvcDecryptedUnit(o,s),n||l.decryptAvcSamples(t,e,r+1,i)})},t.prototype.decryptAvcSamples=function(t,e,r,i){for(;;e++,r=0){if(e>=t.length)return void i();for(var a=t[e].units;!(r>=a.length);r++){var n=a[r];if(!(n.length<=48||1!==n.type&&5!==n.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,n,o),!o)return}}}},t}();e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(7),n=r(0),o=r(23),s=function(){function t(e,r,a){i(this,t),this.observer=e,this.config=a,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){var e=void 0,r=void 0,i=a.a.getID3Data(t,0);if(i&&void 0!==a.a.getTimeStamp(i))for(e=i.length,r=Math.min(t.length-1,e+100);e-1&&o&&!o.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,r,i,a,n,s){if(this.ISGenerated||this.generateIS(t,e,a),this.ISGenerated){var u=t.samples.length,d=e.samples.length,c=a,h=a;if(u&&d){var f=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;c+=Math.max(0,f),h+=Math.max(0,-f)}if(u){t.timescale||(l.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,a));var p=this.remuxAudio(t,c,n,s);if(d){var v=void 0;p&&(v=p.endPTS-p.startPTS),e.timescale||(l.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,a)),this.remuxVideo(e,h,n,v,s)}}else if(d){var g=this.remuxVideo(e,h,n,0,s);g&&t.codec&&this.remuxEmptyAudio(t,c,n,g)}}r.samples.length&&this.remuxID3(r,a),i.samples.length&&this.remuxText(i,a),this.observer.trigger(o.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,r){var i=this.observer,a=t.samples,u=e.samples,d=this.typeSupported,c="audio/mp4",h={},f={tracks:h},p=void 0===this._initPTS,v=void 0,g=void 0;if(p&&(v=g=1/0),t.config&&a.length&&(t.timescale=t.samplerate,l.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(d.mpeg?(c="audio/mpeg",t.codec=""):d.mp3&&(t.codec="mp3")),h.audio={container:c,codec:t.codec,initSegment:!t.isAAC&&d.mpeg?new Uint8Array:n.a.initSegment([t]),metadata:{channelCount:t.channelCount}},p&&(v=g=a[0].pts-t.inputTimeScale*r)),e.sps&&e.pps&&u.length){var y=e.inputTimeScale;e.timescale=y,h.video={container:"video/mp4",codec:e.codec,initSegment:n.a.initSegment([e]),metadata:{width:e.width,height:e.height}},p&&(v=Math.min(v,u[0].pts-y*r),g=Math.min(g,u[0].dts-y*r),this.observer.trigger(o.a.INIT_PTS_FOUND,{initPTS:v}))}Object.keys(h).length?(i.trigger(o.a.FRAG_PARSING_INIT_SEGMENT,f),this.ISGenerated=!0,p&&(this._initPTS=v,this._initDTS=g)):i.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,r,i,a){var u=8,d=t.timescale,c=void 0,h=void 0,f=void 0,p=void 0,v=void 0,g=void 0,y=void 0,m=t.samples,b=[],E=m.length,T=this._PTSNormalize,S=this._initDTS,R=this.nextAvcDts,A=this.isSafari;if(0!==E){A&&(r|=m.length&&R&&(a&&Math.abs(e-R/d)<.1||Math.abs(m[0].pts-R-S)1?l.b.log("AVC:"+D+" ms hole between fragments detected,filling it"):D<-1&&l.b.log("AVC:"+-D+" ms overlapping between fragments detected"),v=R,m[0].dts=v,p=Math.max(p-D,R),m[0].pts=p,l.b.log("Video/PTS/DTS adjusted: "+Math.round(p/90)+"/"+Math.round(v/90)+",delta:"+D+" ms")),v,L=m[m.length-1],y=Math.max(L.dts,0),g=Math.max(L.pts,0,y),A&&(c=Math.round((y-v)/(m.length-1)));for(var I=0,k=0,O=0;O0?B-1:B].dts;if(z.stretchShortVideoTrack){var $=z.maxBufferHole,J=Math.floor($*d),Z=(i?p+i*d:this.nextAudioPts)-G.pts;Z>J?(c=Z-Q,c<0&&(c=Q),l.b.log("It is approximately "+Z/90+" ms to the next segment; using duration "+c/90+" ms for the last video frame.")):c=Q}else c=Q}H=Math.round(G.pts-G.dts)}b.push({size:j,duration:c,cts:H,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:G.key?2:1,isNonSync:G.key?0:1}})}this.nextAvcDts=y+c;var tt=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var et=b[0].flags;et.dependsOn=2,et.isNonSync=0}t.samples=b,f=n.a.moof(t.sequenceNumber++,v,t),t.samples=[];var rt={data1:f,data2:h,startPTS:p/d,endPTS:(g+c)/d,startDTS:v/d,endDTS:this.nextAvcDts/d,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:tt};return this.observer.trigger(o.a.FRAG_PARSING_DATA,rt),rt}},t.prototype.remuxAudio=function(t,e,r,i){var u=t.inputTimeScale,d=t.timescale,c=u/d,h=t.isAAC?1024:1152,f=h*c,p=this._PTSNormalize,v=this._initDTS,g=!t.isAAC&&this.typeSupported.mpeg,y=void 0,m=void 0,b=void 0,E=void 0,T=void 0,S=void 0,R=void 0,A=t.samples,_=[],w=this.nextAudioPts;if(r|=A.length&&w&&(i&&Math.abs(e-w/u)<.1||Math.abs(A[0].pts-w-v)<20*f),A.forEach(function(t){t.pts=t.dts=p(t.pts-v,e*u)}),A=A.filter(function(t){return t.pts>=0}),0!==A.length){if(r||(w=i?e*u:A[0].pts),t.isAAC)for(var L=this.config.maxAudioFramesDrift,D=0,I=w;D=L*f&&P<1e4&&I){var x=Math.round(k/f);l.b.warn("Injecting "+x+" audio frame @ "+(I/u).toFixed(3)+"s due to "+Math.round(1e3*k/u)+" ms gap.");for(var F=0;F0&&j<1e4)H=Math.round((K-w)/f),l.b.log(j+" ms hole between AAC samples detected,filling it"),H>0&&(b=a.a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),b||(b=G.subarray()),t.len+=H*b.length);else if(j<-12){l.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(w/u).toFixed(3)+"s/"+(K/u).toFixed(3)+"s/"+-j+"ms"),t.len-=G.byteLength;continue}K=w}if(S=K,!(t.len>0))return;var V=g?t.len:t.len+8;y=g?0:8;try{E=new Uint8Array(V)}catch(t){return void this.observer.trigger(o.a.ERROR,{type:s.b.MUX_ERROR,details:s.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:V,reason:"fail allocating audio mdat "+V})}if(!g){new DataView(E.buffer).setUint32(0,V),E.set(n.a.types.mdat,4)}for(var Y=0;Y=2&&(q=_[X-2].duration,m.duration=q),X){this.nextAudioPts=w=R+c*q,t.len=0,t.samples=_,T=g?new Uint8Array:n.a.moof(t.sequenceNumber++,S/c,t),t.samples=[];var z=S/u,Q=w/u,$={data1:T,data2:E,startPTS:z,endPTS:Q,startDTS:z,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:X};return this.observer.trigger(o.a.FRAG_PARSING_DATA,$),$}return null}},t.prototype.remuxEmptyAudio=function(t,e,r,i){var n=t.inputTimeScale,o=t.samplerate?t.samplerate:n,s=n/o,u=this.nextAudioPts,d=(void 0!==u?u:i.startDTS*n)+this._initDTS,c=i.endDTS*n+this._initDTS,h=1024*s,f=Math.ceil((c-d)/h),p=a.a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(l.b.warn("remux empty Audio"),!p)return void l.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var v=[],g=0;g4294967296;)t+=r;return t},t}();e.a=u},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(){i(this,t)}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(46),n=Math.pow(2,32)-1,o=function(){function t(){i(this,t)}return t.init=function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e=void 0;for(e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:r,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=n,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,a))},t.box=function(t){for(var e=Array.prototype.slice.call(arguments,1),r=8,i=e.length,a=i,n=void 0;i--;)r+=e[i].byteLength;for(n=new Uint8Array(r),n[0]=r>>24&255,n[1]=r>>16&255,n[2]=r>>8&255,n[3]=255&r,n.set(t,4),i=0,r=8;i>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(n+1)),a=Math.floor(r%(n+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,o)},t.sdtp=function(e){var r=e.samples||[],i=new Uint8Array(4+r.length),a=void 0,n=void 0;for(n=0;n>>8&255),r.push(255&s),r=r.concat(Object(a.a)(o));for(n=0;n>>8&255),i.push(255&s),i=i.concat(Object(a.a)(o));var l=t.box(t.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(i))),u=e.width,d=e.height,c=e.pixelRatio[0],h=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,255&u,d>>8&255,255&d,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,h>>24,h>>16&255,h>>8&255,255&h])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,a=e.width,o=e.height,s=Math.floor(i/(n+1)),l=Math.floor(i%(n+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),a=e.id,o=Math.floor(r/(n+1)),s=Math.floor(r%(n+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i=e.samples||[],a=i.length,n=12+16*a,o=new Uint8Array(n),s=void 0,l=void 0,u=void 0,d=void 0,c=void 0,h=void 0;for(r+=8+n,o.set([0,0,15,1,a>>>24&255,a>>>16&255,a>>>8&255,255&a,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),s=0;s>>24&255,u>>>16&255,u>>>8&255,255&u,d>>>24&255,d>>>16&255,d>>>8&255,255&d,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.paddingValue<<1|c.isNonSync,61440&c.degradPrio,15&c.degradPrio,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*s);return t.box(t.types.trun,o)},t.initSegment=function(e){t.types||t.init();var r=t.moov(e),i=void 0;return i=new Uint8Array(t.FTYP.byteLength+r.byteLength),i.set(t.FTYP),i.set(r,t.FTYP.byteLength),i},t}();e.a=o},function(t,e,r){"use strict";r.d(e,"a",function(){return i});var i="function"==typeof Array.from?Array.from:Array.prototype.slice.call},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(1),n=function(){function t(e){i(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,r,i,n,o,s,l){var u=this.observer,d="";t&&(d+="audio"),e&&(d+="video"),u.trigger(a.a.FRAG_PARSING_DATA,{data1:l,startPTS:n,startDTS:n,type:d,hasAudio:!!t,hasVideo:!!e,nb:1,dropped:0}),u.trigger(a.a.FRAG_PARSED)},t}();e.a=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(21),a=r(1),n=r(0),o=r(12),s=r.n(o),l=function(t){var e=new s.a;e.trigger=function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a1?r-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments[2],i=0;if(r.programDateTime){var a=Date.parse(r.programDateTime);isNaN(a)||(i=1e3*e+a-1e3*t)}return i}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Array.isArray(t)||!t.length||null===e)return null;if(e=t[t.length-1].endPdt)return null;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=void 0,l=t?e[t.sn-e[0].sn+1]:null;return ri-a&&(a=0),n=l&&!o(r,a,l)?l:s.a.search(e,o.bind(null,r,a))),n}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments[2],i=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=t?1:r.start-i>t&&r.start?-1:0}e.a=i,e.b=a,e.c=n,e.d=o;var s=r(6)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(0),u=r(2),d=r(19),c=r(15),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=function(){function t(t,e){for(var r=0;r0){r=e[0].bitrate,e.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=e;for(var p=0;p0&&n})}else this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},e.prototype.setLevelInternal=function(t){var e=this._levels,r=this.hls;if(t>=0&&t1&&s.loadError0){var e=this.currentLevelIndex,r=t.urlId,i=t.url[r];l.b.log("Attempt loading level index "+e+" with URL-id "+r),this.hls.trigger(o.a.LEVEL_LOADING,{url:i,level:e,id:r})}}},f(e,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}]),e}(s.a);e.a=g},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(7),u=r(26),d=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.MEDIA_DETACHING,o.a.FRAG_PARSING_METADATA));return n.id3Track=void 0,n.media=void 0,n}return n(e,t),e.prototype.destroy=function(){s.a.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){this.media=t.media,this.media},e.prototype.onMediaDetaching=function(){Object(u.a)(this.id3Track),this.id3Track=void 0,this.media=void 0},e.prototype.getID3Track=function(t){for(var e=0;e500*r.duration/u){var c=t.levels,h=Math.max(1,n.bw?n.bw/8:1e3*n.loaded/s),f=c[r.level],v=f.realBitrate?Math.max(f.realBitrate,f.bitrate):f.bitrate,g=n.total?n.total:Math.max(n.loaded,Math.round(r.duration*v/8)),y=e.currentTime,m=(g-n.loaded)/h,b=(l.a.bufferInfo(e,y,t.config.maxBufferHole).end-y)/u;if(b<2*r.duration/u&&m>b){var E=void 0,T=void 0;for(T=r.level-1;T>a;T--){var S=c[T].realBitrate?Math.max(c[T].realBitrate,c[T].bitrate):c[T].bitrate;if((E=r.duration*S/(6.4*h))=i;u--){var c=l[u],h=c.details,f=h?h.totalduration/h.fragments.length:e,p=!!h&&h.live,v=void 0;v=u<=t?o*r:s*r;var g=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,y=g*f/v;if(d.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(v)+"/"+g+"/"+f+"/"+n+"/"+y),v>g&&(!y||p&&!this.bitrateTestDelay||y=0)return p;d.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var v=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,y=i.abrBandWidthUpFactor;if(0===f){var m=this.bitrateTestDelay;if(m){v=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-m,d.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*v)+" ms"),g=y=1}}return p=this._findBestLevel(o,s,h,a,e,f+v,g,y,r),Math.max(p,0)}}]),e}(s.a);e.a=v},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(56),n=function(){function t(e,r,n,o){i(this,t),this.hls=e,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new a.a(r),this.fast_=new a.a(n)}return t.prototype.sample=function(t,e){t=Math.max(t,this.minDelayMs_);var r=8e3*e/t,i=t/1e3;this.fast_.sample(i,r),this.slow_.sample(i,r)},t.prototype.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},t.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.prototype.destroy=function(){},t}();e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(e){i(this,t),this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return t.prototype.sample=function(t,e){var r=Math.pow(this.alpha_,t);this.estimate_=e*(1-r)+r*this.estimate_,this.totalWeight_+=t},t.prototype.getTotalWeight=function(){return this.totalWeight_},t.prototype.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(0),u=r(2),d=r(14),c=Object(d.a)(),h=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.MEDIA_ATTACHING,o.a.MEDIA_DETACHING,o.a.MANIFEST_PARSED,o.a.BUFFER_RESET,o.a.BUFFER_APPENDING,o.a.BUFFER_CODECS,o.a.BUFFER_EOS,o.a.BUFFER_FLUSHING,o.a.LEVEL_PTS_UPDATED,o.a.LEVEL_UPDATED));return n._msDuration=null,n._levelDuration=null,n._live=null,n._objectUrl=null,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n.tracks={},n}return n(e,t),e.prototype.destroy=function(){s.a.prototype.destroy.call(this)},e.prototype.onLevelPtsUpdated=function(t){var e=t.type,r=this.tracks.audio;if("audio"===e&&r&&"audio/mpeg"===r.container){var i=this.sourceBuffer.audio;if(Math.abs(i.timestampOffset-t.start)>.1){var a=i.updating;try{i.abort()}catch(t){a=!0,l.b.warn("can not abort audio buffer: "+t)}a?this.audioTimestampOffset=t.start:(l.b.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+t.start),i.timestampOffset=t.start)}}},e.prototype.onManifestParsed=function(t){var e=t.audio,r=t.video||t.levels.length&&t.altAudio,i=0;t.altAudio&&(e||r)&&(i=(e?1:0)+(r?1:0),l.b.log(i+" sourceBuffer(s) expected")),this.sourceBufferNb=i},e.prototype.onMediaAttaching=function(t){var e=this.media=t.media;if(e){var r=this.mediaSource=new c;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),e.src=window.URL.createObjectURL(r),this._objectUrl=e.src}},e.prototype.onMediaDetaching=function(){l.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){l.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):l.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(o.a.MEDIA_DETACHED)},e.prototype.onMediaSourceOpen=function(){l.b.log("media source opened"),this.hls.trigger(o.a.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},e.prototype.checkPendingTracks=function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},e.prototype.onMediaSourceClose=function(){l.b.log("media source closed")},e.prototype.onMediaSourceEnded=function(){l.b.log("media source ended")},e.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var t=this.sourceBuffer.audio;l.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+this.audioTimestampOffset),t.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var e=this.parent,r=this.segments.reduce(function(t,r){return r.parent===e?t+1:t},0),i={},a=this.sourceBuffer;for(var n in a)i[n]=a[n].buffered;this.hls.trigger(o.a.BUFFER_APPENDED,{parent:e,pending:r,timeRanges:i}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()},e.prototype.onSBUpdateError=function(t){l.b.error("sourceBuffer error:",t),this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferReset=function(){var t=this.sourceBuffer;for(var e in t){var r=t[e];try{this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this.onsbue),r.removeEventListener("error",this.onsbe)}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},e.prototype.onBufferCodecs=function(t){if(0===Object.keys(this.sourceBuffer).length){for(var e in t)this.pendingTracks[e]=t[e];var r=this.mediaSource;r&&"open"===r.readyState&&this.checkPendingTracks()}},e.prototype.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;for(var i in t)if(!e[i]){var a=t[i],n=a.levelCodec||a.codec,s=a.container+";codecs="+n;l.b.log("creating sourceBuffer("+s+")");try{var d=e[i]=r.addSourceBuffer(s);d.addEventListener("updateend",this.onsbue),d.addEventListener("error",this.onsbe),this.tracks[i]={codec:n,container:a.container},a.buffer=d}catch(t){l.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:s})}}this.hls.trigger(o.a.BUFFER_CREATED,{tracks:t})},e.prototype.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},e.prototype.onBufferAppendFail=function(t){l.b.error("sourceBuffer error:",t.event),this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferEos=function(t){var e=this.sourceBuffer,r=t.type;for(var i in e)r&&i!==r||e[i].ended||(e[i].ended=!0,l.b.log(i+" sourceBuffer now EOS"));this.checkEos()},e.prototype.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(!e||"open"!==e.readyState)return void(this._needsEos=!1);for(var r in t){var i=t[r];if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}l.b.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){l.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},e.prototype.onBufferFlushing=function(t){this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush()},e.prototype.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._live=e.live,this.updateMediaElementDuration())},e.prototype.updateMediaElementDuration=function(){var t=this.hls.config,e=void 0;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var r in this.sourceBuffer)if(!0===this.sourceBuffer[r].updating)return;e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(l.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||e===1/0||isNaN(e))&&(l.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},e.prototype.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,r=this.sourceBuffer;try{for(var i in r)e+=r[i].buffered.length}catch(t){l.b.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(o.a.BUFFER_FLUSHED)}},e.prototype.doAppending=function(){var t=this.hls,e=this.sourceBuffer,r=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void l.b.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(r&&r.length){var i=r.shift();try{var a=i.type,n=e[a];n?n.updating?r.unshift(i):(n.ended=!1,this.parent=i.parent,n.appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){l.b.error("error while trying to append buffer:"+e.message),r.unshift(i);var s={type:u.b.MEDIA_ERROR,parent:i.parent};22!==e.code?(this.appendError?this.appendError++:this.appendError=1,s.details=u.a.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry?(l.b.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),r=[],s.fatal=!0,t.trigger(o.a.ERROR,s)):(s.fatal=!1,t.trigger(o.a.ERROR,s))):(this.segments=[],s.details=u.a.BUFFER_FULL_ERROR,s.fatal=!1,t.trigger(o.a.ERROR,s))}}}},e.prototype.flushBuffer=function(t,e,r){var i=void 0,a=void 0,n=void 0,o=void 0,s=void 0,u=void 0,d=this.sourceBuffer;if(Object.keys(d).length){if(l.b.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+t+"/"+e),this.flushBufferCounter.5)return this.flushBufferCounter++,l.b.log("flush "+c+" ["+s+","+u+"], of ["+n+","+o+"], pos:"+this.media.currentTime),i.remove(s,u),!1}catch(t){l.b.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else l.b.warn("abort flushing too many retries");l.b.log("buffer flushed")}return!0},e}(s.a);e.a=h},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=function(){function t(t,e){for(var r=0;rthis.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},e.prototype.getMaxLevel=function(t){var r=this;if(!this.levels)return-1;var i=this.levels.filter(function(i,a){return e.isLevelAllowed(a,r.restrictedLevels)&&a<=t});return e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},e.prototype._startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},e.prototype._stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},e.isLevelAllowed=function(t){return-1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).indexOf(t)},e.getMaxLevelByMediaSize=function(t,e,r){if(!t||t&&!t.length)return-1;for(var i=t.length-1,a=0;a=e||n.height>=r)&&function(t,e){return!e||(t.width!==e.width||t.height!==e.height)}(n,t[a+1])){i=a;break}}return i},l(e,[{key:"mediaWidth",get:function(){var t=void 0,r=this.media;return r&&(t=r.width||r.clientWidth||r.offsetWidth,t*=e.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0,r=this.media;return r&&(t=r.height||r.clientHeight||r.offsetHeight,t*=e.contentScaleFactor),t}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}}]),e}(s.a);e.a=u},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(0),u=window,d=u.performance,c=function(t){function e(r){return i(this,e),a(this,t.call(this,r,o.a.MEDIA_ATTACHING))}return n(e,t),e.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},e.prototype.onMediaAttaching=function(t){var e=this.hls.config;if(e.capLevelOnFPSDrop){"function"==typeof(this.video=t.media instanceof window.HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod)}},e.prototype.checkFPS=function(t,e,r){var i=d.now();if(e){if(this.lastTime){var a=i-this.lastTime,n=r-this.lastDroppedFrames,s=e-this.lastDecodedFrames,u=1e3*n/a,c=this.hls;if(c.trigger(o.a.FPS_DROP,{currentDropped:n,currentDecoded:s,totalDroppedFrames:r}),u>0&&n>c.config.fpsDroppedMonitoringThreshold*s){var h=c.currentLevel;l.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===c.autoLevelCapping||c.autoLevelCapping>=h)&&(h-=1,c.trigger(o.a.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:c.currentLevel}),c.autoLevelCapping=h,c.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.prototype.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},e}(s.a);e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(0),n=window,o=n.performance,s=n.XMLHttpRequest,l=function(){function t(e){i(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return t.prototype.destroy=function(){this.abort(),this.loader=null},t.prototype.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.prototype.load=function(t,e,r){this.context=t,this.config=e,this.callbacks=r,this.stats={trequest:o.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()},t.prototype.loadInternal=function(){var t=void 0,e=this.context;t=this.loader=new s;var r=this.stats;r.tfirst=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(t,e.url)}catch(r){t.open("GET",e.url,!0),i(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(r){return void this.callbacks.onError({code:t.status,text:r.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},t.prototype.readystatechange=function(t){var e=t.currentTarget,r=e.readyState,i=this.stats,n=this.context,s=this.config;if(!i.aborted&&r>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(o.now(),i.trequest)),4===r){var l=e.status;if(l>=200&&l<300){i.tload=Math.max(i.tfirst,o.now());var u=void 0,d=void 0;"arraybuffer"===n.responseType?(u=e.response,d=u.byteLength):(u=e.responseText,d=u.length),i.loaded=i.total=d;var c={url:e.responseURL,data:u};this.callbacks.onSuccess(c,i,n,e)}else i.retry>=s.maxRetry||l>=400&&l<499?(a.b.error(l+" while loading "+n.url),this.callbacks.onError({code:l,text:e.statusText},n,e)):(a.b.warn(l+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.timeout)},t.prototype.loadtimeout=function(){a.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.prototype.loadprogress=function(t){var e=t.currentTarget,r=this.stats;r.loaded=t.loaded,t.lengthComputable&&(r.total=t.total);var i=this.callbacks.onProgress;i&&i(r,this.context,null,e)},t}();e.a=l},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(8),l=r(0),u=r(2),d=function(){function t(t,e){for(var r=0;r=this.tracks.length)return void l.b.warn("Invalid audio track id:",t.id);if(l.b.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.hasInterval()){var e=1e3*t.details.targetduration;this.setInterval(e)}!t.details.live&&this.hasInterval()&&this.clearInterval()},e.prototype.onAudioTrackSwitched=function(t){var e=this.tracks[t.id].groupId;e&&this.audioGroupId!==e&&(this.audioGroupId=e)},e.prototype.onLevelLoaded=function(t){var e=this.hls.levels[t.level];if(e.audioGroupIds){var r=e.audioGroupIds[e.urlId];this.audioGroupId!==r&&(this.audioGroupId=r,this._selectInitialAudioTrack())}},e.prototype.onError=function(t){t.type===u.b.NETWORK_ERROR&&(t.fatal&&this.clearInterval(),t.details===u.a.AUDIO_TRACK_LOAD_ERROR&&(l.b.warn("Network failure on audio-track id:",t.context.id),this._handleLoadError()))},e.prototype.doTick=function(){this._updateTrack(this.trackId)},e.prototype._selectInitialAudioTrack=function(){var t=this,e=this.tracks;if(e.length){var r=this.tracks[this.trackId],i=null;r&&(i=r.name);var a=e.filter(function(t){return t.default});a.length?e=a:l.b.warn("No default audio tracks defined");var n=!1,s=function(){e.forEach(function(e){n||t.audioGroupId&&e.groupId!==t.audioGroupId||i&&i!==e.name||(t.audioTrack=e.id,n=!0)})};s(),n||(i=null,s()),n||(l.b.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},e.prototype._needsTrackLoading=function(t){var e=t.details;return!e||(!!e.live||void 0)},e.prototype._loadTrackDetailsIfNeeded=function(t){if(this._needsTrackLoading(t)){var e=t.url,r=t.id;l.b.log("loading audio-track playlist for id: "+r),this.hls.trigger(o.a.AUDIO_TRACK_LOADING,{url:e,id:r})}},e.prototype._updateTrack=function(t){if(!(t<0||t>=this.tracks.length)){this.clearInterval(),this.trackId=t,l.b.log("trying to update audio-track "+t);var e=this.tracks[t];this._loadTrackDetailsIfNeeded(e)}},e.prototype._handleLoadError=function(){this.trackIdBlacklist[this.trackId]=!0;var t=this.trackId,e=this.tracks[t],r=e.name,i=e.language,a=e.groupId;l.b.warn("Loading failed on audio track id: "+t+", group-id: "+a+', name/language: "'+r+'" / "'+i+'"');for(var n=t,o=0;o no-op");if(t<0||t>=this.tracks.length)return void l.b.warn("Invalid id passed to audio-track controller");var e=this.tracks[t];l.b.log("Now switching to audio-track index "+t),this.clearInterval(),this.trackId=t;var r=e.url,i=e.type,a=e.id;this.hls.trigger(o.a.AUDIO_TRACK_SWITCHING,{id:a,type:i,url:r}),this._loadTrackDetailsIfNeeded(e)}}]),e}(s.a);e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(6),s=r(11),l=r(20),u=r(1),d=r(15),c=r(24),h=r(2),f=r(0),p=r(25),v=r(8),g=r(10),y=r(9),m=function(){function t(t,e){for(var r=0;r0&&-1===t?(f.b.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=T.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=T.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=T.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=T.STOPPED},e.prototype.doTick=function(){var t=void 0,e=void 0,r=void 0,i=this.hls,a=i.config;switch(this.state){case T.ERROR:case T.PAUSED:case T.BUFFER_FLUSHING:break;case T.STARTING:this.state=T.WAITING_TRACK,this.loadedmetadata=!1;break;case T.IDLE:var n=this.tracks;if(!n)break;if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var l=this.mediaBuffer?this.mediaBuffer:this.media,d=this.videoBuffer?this.videoBuffer:this.media,c=s.a.bufferInfo(l,t,a.maxBufferHole),h=s.a.bufferInfo(d,t,a.maxBufferHole),v=c.len,y=c.end,m=this.fragPrevious,b=Math.min(a.maxBufferLength,a.maxMaxBufferLength),S=Math.max(b,h.len),R=this.audioSwitch,A=this.trackId;if((vL||c.nextStart))return;f.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=L+.05}if(r.initSegment&&!r.initSegment.data)I=r.initSegment;else if(y<=L){if(I=_[0],null!==this.videoTrackCC&&I.cc!==this.videoTrackCC&&(I=Object(p.b)(_,this.videoTrackCC)),r.live&&I.loadIdx&&I.loadIdx===this.fragLoadIdx){var k=c.nextStart?c.nextStart:L;return f.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(k+.05)),void(this.media.currentTime=k+.05)}}else{var O=void 0,C=a.maxFragLookUpTolerance,P=m?_[m.sn-_[0].sn+1]:void 0,x=function(t){var e=Math.min(C,t.duration);return t.start+t.duration-e<=y?1:t.start-e>y&&t.start?-1:0};yD-C&&(C=0),O=P&&!x(P)?P:o.a.search(_,x)):O=_[w-1],O&&(I=O,L=O.start,m&&I.level===m.level&&I.sn===m.sn&&(I.sn=N||M)&&(f.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=T.IDLE);break;case T.WAITING_INIT_PTS:var U=this.videoTrackCC;if(void 0===this.initPTS[U])break;var B=this.waitingFragment;if(B){var G=B.frag.cc;U!==G?(e=this.tracks[this.trackId],e.details&&e.details.live&&(f.b.warn("Waiting fragment CC ("+G+") does not match video track CC ("+U+")"),this.waitingFragment=null,this.state=T.IDLE)):(this.state=T.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=T.IDLE;break;case T.STOPPED:case T.FRAG_LOADING:case T.PARSING:case T.PARSED:case T.ENDED:}},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(f.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){this.state===T.ENDED&&(this.state=T.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),this.tick()},e.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},e.prototype.onAudioTracksUpdated=function(t){f.b.log("audio tracks updated"),this.tracks=t.audioTracks},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.state=T.PAUSED,this.waitingFragment=null,e?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=T.IDLE),this.tick()},e.prototype.onAudioTrackLoaded=function(t){var e=t.details,r=t.id,i=this.tracks[r],a=e.totalduration,n=0;if(f.b.log("track "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+a),e.live){var o=i.details;o&&e.fragments.length>0?(d.b(o,e),n=e.fragments[0].start,e.PTSKnown?f.b.log("live audio playlist sliding:"+n.toFixed(3)):f.b.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,f.b.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(i.details=e,!this.startFragRequested){if(-1===this.startPosition){var s=e.startTimeOffset;isNaN(s)?this.startPosition=0:(f.b.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===T.WAITING_TRACK&&(this.state=T.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===T.KEY_LOADING&&(this.state=T.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===T.FRAG_LOADING&&e&&"audio"===r.type&&r.level===e.level&&r.sn===e.sn){var i=this.tracks[this.trackId],a=i.details,n=a.totalduration,o=e.level,s=e.sn,d=e.cc,c=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",h=this.stats=t.stats;if("initSegment"===s)this.state=T.IDLE,h.tparsed=h.tbuffered=E.now(),a.initSegment.data=t.payload,this.hls.trigger(u.a.FRAG_BUFFERED,{stats:h,frag:e,id:"audio"}),this.tick();else{this.state=T.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new l.a(this.hls,"audio"));var p=this.initPTS[d],v=a.initSegment?a.initSegment.data:[];if(a.initSegment||void 0!==p){this.pendingBuffering=!0,f.b.log("Demuxing "+s+" of ["+a.startSN+" ,"+a.endSN+"],track "+o);this.demuxer.push(t.payload,v,c,null,e,n,!1,p)}else f.b.log("unknown video PTS for continuity counter "+d+", waiting for video PTS before demuxing audio frag "+s+" of ["+a.startSN+" ,"+a.endSN+"],track "+o),this.waitingFragment=t,this.state=T.WAITING_INIT_PTS}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===T.PARSING){var i=t.tracks,a=void 0;if(i.video&&delete i.video,a=i.audio){a.levelCodec=a.codec,a.id=t.id,this.hls.trigger(u.a.BUFFER_CODECS,i),f.b.log("audio track:audio,container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var n=a.initSegment;if(n){var o={type:"audio",data:n,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.a.BUFFER_APPENDING,o))}this.tick()}}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"audio"===t.id&&"audio"===t.type&&i.sn===r.sn&&i.level===r.level&&this.state===T.PARSING){var a=this.trackId,n=this.tracks[a],o=this.hls;isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),r.addElementaryStream(y.a.ElementaryStreamTypes.AUDIO),f.b.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),d.c(n.details,r,t.startPTS,t.endPTS);var s=this.audioSwitch,l=this.media,c=!1;if(s&&l)if(l.readyState){var p=l.currentTime;f.b.log("switching audio track : currentTime:"+p),p>=t.startPTS&&(f.b.log("switching audio track : flushing all audio"),this.state=T.BUFFER_FLUSHING,o.trigger(u.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),c=!0,this.audioSwitch=!1,o.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:a}))}else this.audioSwitch=!1,o.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:a});var v=this.pendingData;if(!v)return f.b.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void o.trigger(u.a.ERROR,{type:h.b.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&v.push({type:t.type,data:e,parent:"audio",content:"data"})}),!c&&v.length&&(v.forEach(function(t){e.state===T.PARSING&&(e.pendingBuffering=!0,e.hls.trigger(u.a.BUFFER_APPENDING,t))}),this.pendingData=[],this.appended=!0)),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===T.PARSING&&(this.stats.tparsed=E.now(),this.state=T.PARSED,this._checkAppendedParsed())},e.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},e.prototype.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},e.prototype.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;e!==T.PARSING&&e!==T.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==T.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,r=this.hls;if(t){this.fragPrevious=t,e.tbuffered=E.now(),r.trigger(u.a.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;f.b.log("audio buffered : "+c.a.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=T.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case h.a.FRAG_LOAD_ERROR:case h.a.FRAG_LOAD_TIMEOUT:var r=t.frag;if(r&&"audio"!==r.type)break;if(!t.fatal){var i=this.fragLoadError;i?i++:i=1;var a=this.config;if(i<=a.fragLoadingMaxRetry){this.fragLoadError=i;var n=Math.min(Math.pow(2,i-1)*a.fragLoadingRetryDelay,a.fragLoadingMaxRetryTimeout);f.b.warn("AudioStreamController: frag loading failed, retry in "+n+" ms"),this.retryDate=E.now()+n,this.state=T.FRAG_LOADING_WAITING_RETRY}else f.b.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=T.ERROR}break;case h.a.AUDIO_TRACK_LOAD_ERROR:case h.a.AUDIO_TRACK_LOAD_TIMEOUT:case h.a.KEY_LOAD_ERROR:case h.a.KEY_LOAD_TIMEOUT:this.state!==T.ERROR&&(this.state=t.fatal?T.ERROR:T.IDLE,f.b.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case h.a.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===T.PARSING||this.state===T.PARSED)){var o=this.mediaBuffer,l=this.media.currentTime;if(o&&s.a.isBuffered(o,l)&&s.a.isBuffered(o,l+.5)){var d=this.config;d.maxMaxBufferLength>=d.maxBufferLength&&(d.maxMaxBufferLength/=2,f.b.warn("AudioStreamController: reduce max buffer length to "+d.maxMaxBufferLength+"s")),this.state=T.IDLE}else f.b.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=T.BUFFER_FLUSHING,this.hls.trigger(u.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},e.prototype.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(f.b.log("AudioStreamController: appending pending audio data after buffer flushed"),e.forEach(function(e){t.hls.trigger(u.a.BUFFER_APPENDING,e)}),this.appended=!0,this.pendingData=[],this.state=T.PARSED):(this.state=T.IDLE,this.fragPrevious=null,this.tick())},m(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,f.b.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}]),e}(v.a);e.a=S},function(t,e,r){"use strict";function i(t,e,r,i){for(var n=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=window.VTTCue||window.TextTrackCue,c=0;c=16?l--:l++,navigator.userAgent.match(/Firefox\//)?o.line=c+1:o.line=c>7?c-2:c+1,o.align="left",o.position=Math.max(0,Math.min(100,l/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(o)}}Object.defineProperty(e,"__esModule",{value:!0}),e.newCue=i;var a=r(27)},function(t,e,r){"use strict";e.a=function(){function t(t){return"string"==typeof t&&(!!n[t.toLowerCase()]&&t.toLowerCase())}function e(t){return"string"==typeof t&&(!!o[t.toLowerCase()]&&t.toLowerCase())}function r(t){for(var e=1;e100)throw new Error("Position must be between 0 and 100.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",r({},u,{get:function(){return T},set:function(t){var r=e(t);if(!r)throw new SyntaxError("An invalid or illegal string was specified.");T=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",r({},u,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",r({},u,{get:function(){return R},set:function(t){var r=e(t);if(!r)throw new SyntaxError("An invalid or illegal string was specified.");R=r,this.hasBeenReset=!0}})),s.displayState=void 0,l)return s}if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var a="auto",n={"":!0,lr:!0,rl:!0},o={start:!0,middle:!0,end:!0,left:!0,right:!0};return i.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},i}()},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function s(t,e,r,i){return Math.min(e,i)-Math.max(t,r)}var l=r(1),u=r(3),d=r(66),c=r(67),h=r(68),f=r(0),p=r(26),v=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,l.a.MEDIA_ATTACHING,l.a.MEDIA_DETACHING,l.a.FRAG_PARSING_USERDATA,l.a.FRAG_DECRYPTED,l.a.MANIFEST_LOADING,l.a.MANIFEST_LOADED,l.a.FRAG_LOADED,l.a.LEVEL_SWITCHING,l.a.INIT_PTS_FOUND));if(n.hls=r,n.config=r.config,n.enabled=!0,n.Cues=r.config.cueHandler,n.textTracks=[],n.tracks=[],n.unparsedVttFrags=[],n.initPTS=void 0,n.cueRanges=[],n.captionsTracks={},n.captionsProperties={textTrack1:{label:n.config.captionsTextTrack1Label,languageCode:n.config.captionsTextTrack1LanguageCode},textTrack2:{label:n.config.captionsTextTrack2Label,languageCode:n.config.captionsTextTrack2LanguageCode}},n.config.enableCEA708Captions){var o=new c.a(n,"textTrack1"),s=new c.a(n,"textTrack2");n.cea608Parser=new d.a(0,o,s)}return n}return n(e,t),e.prototype.addCues=function(t,e,r,i){for(var a=this.cueRanges,n=!1,o=a.length;o--;){var l=a[o],u=s(l[0],l[1],e,r);if(u>=0&&(l[0]=Math.min(l[0],e),l[1]=Math.max(l[1],r),n=!0,u/(r-e)>.5))return}n||a.push([e,r]),this.Cues.newCue(this.captionsTracks[t],e,r,i)},e.prototype.onInitPtsFound=function(t){var e=this;void 0===this.initPTS&&(this.initPTS=t.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(t){e.onFragLoaded(t)}),this.unparsedVttFrags=[])},e.prototype.getExistingTrack=function(t){var e=this.media;if(e)for(var r=0;rs&&(f.log("ERROR","Too large cursor position "+this.pos),this.pos=s)},t.prototype.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var r=this.pos+1;r=144&&this.backSpace();var e=n(t);if(this.pos>=s)return void f.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!");this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1)},t.prototype.clearFromPos=function(t){var e=void 0;for(e=t;e0&&(r=t?"["+e.join(" | ")+"]":e.join("\n")),r},t.prototype.getTextAndFormat=function(){return this.rows},t}(),b=function(){function t(e,r){i(this,t),this.chNr=e,this.outputFilter=r,this.mode=null,this.verbose=0,this.displayedMemory=new m,this.nonDisplayedMemory=new m,this.lastOutputScreen=new m,this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return t.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},t.prototype.getHandler=function(){return this.outputFilter},t.prototype.setHandler=function(t){this.outputFilter=t},t.prototype.setPAC=function(t){this.writeScreen.setPAC(t)},t.prototype.setBkgData=function(t){this.writeScreen.setBkgData(t)},t.prototype.setMode=function(t){t!==this.mode&&(this.mode=t,f.log("INFO","MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},t.prototype.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var r=Math.floor(t/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];e.foreground=i[r]}f.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},t.prototype.outputDataUpdate=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=f.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),!0===t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},t.prototype.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),E=function(){function t(e,r,a){i(this,t),this.field=e||1,this.outputs=[r,a],this.channels=[new b(1,r),new b(2,a)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return t.prototype.getHandler=function(t){return this.channels[t].getHandler()},t.prototype.setHandler=function(t,e){this.channels[t].setHandler(e)},t.prototype.addData=function(t,e){var r=void 0,i=void 0,a=void 0,n=!1;this.lastTime=t,f.setTime(t);for(var o=0;o ("+p([i,a])+")"),r=this.parseCmd(i,a),r||(r=this.parseMidrow(i,a)),r||(r=this.parsePAC(i,a)),r||(r=this.parseBackgroundAttributes(i,a)),!r&&(n=this.parseChars(i,a)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(n)}else f.log("WARNING","No channel found yet. TEXT-MODE?");r?this.dataCounters.cmd+=2:n?this.dataCounters.char+=2:(this.dataCounters.other+=2,f.log("WARNING","Couldn't parse cleaned data "+p([i,a])+" orig: "+p([e[o],e[o+1]])))}else this.dataCounters.padding+=2},t.prototype.parseCmd=function(t,e){var r=null,i=(20===t||28===t)&&e>=32&&e<=47,a=(23===t||31===t)&&e>=33&&e<=35;if(!i&&!a)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,f.log("DEBUG","Repeated command ("+p([t,e])+") is dropped"),!0;r=20===t||23===t?1:2;var n=this.channels[r-1];return 20===t||28===t?32===e?n.ccRCL():33===e?n.ccBS():34===e?n.ccAOF():35===e?n.ccAON():36===e?n.ccDER():37===e?n.ccRU(2):38===e?n.ccRU(3):39===e?n.ccRU(4):40===e?n.ccFON():41===e?n.ccRDC():42===e?n.ccTR():43===e?n.ccRTD():44===e?n.ccEDM():45===e?n.ccCR():46===e?n.ccENM():47===e&&n.ccEOC():n.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.parseMidrow=function(t,e){var r=null;if((17===t||25===t)&&e>=32&&e<=47){if((r=17===t?1:2)!==this.currChNr)return f.log("ERROR","Mismatch channel in midrow parsing"),!1;return this.channels[r-1].ccMIDROW(e),f.log("DEBUG","MIDROW ("+p([t,e])+")"),!0}return!1},t.prototype.parsePAC=function(t,e){var r=null,i=null,a=(t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127,n=(16===t||24===t)&&e>=64&&e<=95;if(!a&&!n)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;r=t<=23?1:2,i=e>=64&&e<=95?1===r?l[t]:d[t]:1===r?u[t]:c[t];var o=this.interpretPAC(i,e);return this.channels[r-1].setPAC(o),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.interpretPAC=function(t,e){var r=e,i={color:null,italics:!1,indent:null,underline:!1,row:t};return r=e>95?e-96:e-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},t.prototype.parseChars=function(t,e){var r=null,i=null,a=null;if(t>=25?(r=2,a=t-8):(r=1,a=t),a>=17&&a<=19){var o=e;o=17===a?e+80:18===a?e+112:e+144,f.log("INFO","Special char '"+n(o)+"' in channel "+r),i=[o]}else t>=32&&t<=127&&(i=0===e?[t]:[t,e]);if(i){var s=p(i);f.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},t.prototype.parseBackgroundAttributes=function(t,e){var r=void 0,i=void 0,a=void 0,n=void 0,o=(16===t||24===t)&&e>=32&&e<=47,s=(23===t||31===t)&&e>=45&&e<=47;return!(!o&&!s)&&(r={},16===t||24===t?(i=Math.floor((e-32)/2),r.background=h[i],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0)),a=t<24?1:2,n=this.channels[a-1],n.setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0)},t.prototype.reset=function(){for(var t=0;tt)&&(this.startTime=t),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},t}();e.a=a},function(t,e,r){"use strict";var i=r(27),a=r(7),n=function(t,e,r){return t.substr(r||0,e.length)===e},o=function(t){var e=parseInt(t.substr(-3)),r=parseInt(t.substr(-6,2)),i=parseInt(t.substr(-9,2)),a=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;return isNaN(e)||isNaN(r)||isNaN(i)||isNaN(a)?-1:(e+=1e3*r,e+=6e4*i,e+=36e5*a)},s=function(t){for(var e=5381,r=t.length;r;)e=33*e^t.charCodeAt(--r);return(e>>>0).toString()},l=function(t,e,r){var i=t[e],a=t[i.prevCC];if(!a||!a.new&&i.new)return t.ccOffset=t.presentationOffset=i.start,void(i.new=!1);for(;a&&a.new;)t.ccOffset+=i.start-a.start,i.new=!1,i=a,a=t[i.prevCC];t.presentationOffset=r},u={parse:function(t,e,r,u,d,c){var h=/\r\n|\n\r|\n|\r/g,f=Object(a.b)(new Uint8Array(t)).trim().replace(h,"\n").split("\n"),p="00:00.000",v=0,g=0,y=0,m=[],b=void 0,E=!0,T=new i.a;T.oncue=function(t){var e=r[u],i=r.ccOffset;e&&e.new&&(void 0!==g?i=r.ccOffset=e.start:l(r,u,y)),y&&(i=y+r.ccOffset-r.presentationOffset),t.startTime+=i-g,t.endTime+=i-g,t.id=s(t.startTime.toString())+s(t.endTime.toString())+s(t.text),t.text=decodeURIComponent(encodeURIComponent(t.text)),t.endTime>0&&m.push(t)},T.onparsingerror=function(t){b=t},T.onflush=function(){if(b&&c)return void c(b);d(m)},f.forEach(function(t){if(E){if(n(t,"X-TIMESTAMP-MAP=")){E=!1,t.substr(16).split(",").forEach(function(t){n(t,"LOCAL:")?p=t.substr(6):n(t,"MPEGTS:")&&(v=parseInt(t.substr(7)))});try{e=e<0?e+8589934592:e,v-=e,g=o(p)/1e3,y=v/9e4,-1===g&&(b=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){b=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(E=!1)}T.parse(t+"\n")}),T.flush()}};e.a=u},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t){for(var e=[],r=0;r=r.length)&&(this._stopTimer(),this.trackId=t,u.b.log("switching to subtitle track "+t),e.trigger(s.a.SUBTITLE_TRACK_SWITCH,{id:t}),-1!==t)){var i=r[t],a=i.details;a&&!a.live||(u.b.log("(re)loading playlist for subtitle track "+t),e.trigger(s.a.SUBTITLE_TRACK_LOADING,{url:i.url,id:t}))}},e.prototype._stopTimer=function(){this.timer&&(clearInterval(this.timer),this.timer=null)},e.prototype._toggleTrackModes=function(t){var e=this.media,r=this.subtitleDisplay,i=this.trackId;if(e){var a=o(e.textTracks);if(-1===t)[].slice.call(a).forEach(function(t){t.mode="disabled"});else{var n=a[i];n&&(n.mode="disabled")}var s=a[t];s&&(s.mode=r?"showing":"hidden")}},d(e,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.trackId!==t&&(this._toggleTrackModes(t),this.setSubtitleTrackInternal(t))}}]),e}(l.a);e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(0),l=r(13),u=r(8),d=window,c=d.performance,h={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"},f=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.ERROR,o.a.KEY_LOADED,o.a.FRAG_LOADED,o.a.SUBTITLE_TRACKS_UPDATED,o.a.SUBTITLE_TRACK_SWITCH,o.a.SUBTITLE_TRACK_LOADED,o.a.SUBTITLE_FRAG_PROCESSED));return n.config=r.config,n.vttFragSNsProcessed={},n.vttFragQueues=void 0,n.currentlyProcessing=null,n.state=h.STOPPED,n.currentTrackId=-1,n.decrypter=new l.a(r.observer,r.config),n}return n(e,t),e.prototype.onHandlerDestroyed=function(){this.state=h.STOPPED},e.prototype.clearVttFragQueues=function(){var t=this;this.vttFragQueues={},this.tracks.forEach(function(e){t.vttFragQueues[e.id]=[]})},e.prototype.nextFrag=function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var t=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.fragCurrent=t,this.hls.trigger(o.a.FRAG_LOADING,{frag:t}),this.state=h.FRAG_LOADING}},e.prototype.onSubtitleFragProcessed=function(t){t.success&&this.vttFragSNsProcessed[t.frag.trackId].push(t.frag.sn),this.currentlyProcessing=null,this.state=h.IDLE,this.nextFrag()},e.prototype.onMediaAttached=function(){this.state=h.IDLE},e.prototype.onError=function(t){var e=t.frag;e&&"subtitle"!==e.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())},e.prototype.doTick=function(){var t=this;switch(this.state){case h.IDLE:var e=this.tracks,r=this.currentTrackId,i=this.vttFragSNsProcessed[r],a=this.vttFragQueues[r],n=this.currentlyProcessing?this.currentlyProcessing.sn:-1,l=function(t){return i.indexOf(t.sn)>-1},u=function(t){return a.some(function(e){return e.sn===t.sn})};if(!e)break;var d;if(r0&&null!=r&&null!=r.key&&"AES-128"===r.method){var n=void 0;try{n=c.now()}catch(t){n=Date.now()}this.decrypter.decrypt(t.payload,r.key.buffer,r.iv.buffer,function(t){var e=void 0;try{e=c.now()}catch(t){e=Date.now()}a.trigger(o.a.FRAG_DECRYPTED,{frag:i,payload:t,stats:{tstart:n,tdecrypt:e}})})}},e}(u.a);e.a=f},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(3),s=r(1),l=r(2),u=r(0),d=function(){function t(t,e){for(var r=0;r "+e}function n(t){var e=c.console[t];return e?function(){for(var r=arguments.length,i=Array(r),n=0;n1?e-1:0),i=1;i1?r-1:0),n=1;n0)r=a+1;else{if(!(o<0))return n;i=a-1}}return null}};e.a=i},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"b",function(){return n});var a=function(){function t(){i(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,r){for(var i=r,a=0;t.isHeader(e,r);){a+=10;a+=t._readSize(e,r+6),t.isFooter(e,r+10)&&(a+=10),r+=a}if(a>0)return e.subarray(i,i+a)},t._readSize=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},t.getTimeStamp=function(e){for(var r=t.getID3Frames(e),i=0;i1&&void 0!==arguments[1]&&arguments[1],r=t.length,i=void 0,a=void 0,n=void 0,o="",s=0;s>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(i);break;case 12:case 13:a=t[s++],o+=String.fromCharCode((31&i)<<6|63&a);break;case 14:a=t[s++],n=t[s++],o+=String.fromCharCode((15&i)<<12|(63&a)<<6|(63&n)<<0)}}return o},t}(),n=a._utf8ArrayToStr;e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(3),s=function(t){function e(r){i(this,e);for(var n=arguments.length,o=Array(n>1?n-1:0),s=1;s1&&(this.clearNextTick(),this._tickTimer=setTimeout(this._boundTick,0)),this._tickCallCount=0)},e.prototype.doTick=function(){},e}(o.a);e.a=s},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(5),n=r.n(a),o=r(18),s=function(){function t(t,e){for(var r=0;r>8*(15-r)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var r=t;return t&&t.method&&t.uri&&!t.iv&&(r=new o.a,r.method=t.method,r.baseuri=t.baseuri,r.reluri=t.reluri,r.iv=this.createInitializationVector(e)),r},s(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=n.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange&&!this.rawByteRange)return[];if(this._byteRange)return this._byteRange;var t=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var r=this.lastByteRangeEndOffset;t[0]=r||0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0],this._byteRange=t}return t}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}],[{key:"ElementaryStreamTypes",get:function(){return{AUDIO:"audio",VIDEO:"video"}}}]),t}();e.a=l},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.d(e,"a",function(){return l}),r.d(e,"b",function(){return u});var o=r(3),s=r(1),l={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},u=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,s.a.BUFFER_APPENDED,s.a.FRAG_BUFFERED,s.a.FRAG_LOADED));return n.bufferPadding=.2,n.fragments=Object.create(null),n.timeRanges=Object.create(null),n.config=r.config,n}return n(e,t),e.prototype.destroy=function(){this.fragments=null,this.timeRanges=null,this.config=null,o.a.prototype.destroy.call(this),t.prototype.destroy.call(this)},e.prototype.getBufferedFrag=function(t,e){var r=this.fragments,i=Object.keys(r).filter(function(i){var a=r[i];if(a.body.type!==e)return!1;if(!a.buffered)return!1;var n=a.body;return n.startPTS<=t&&t<=n.endPTS});if(0===i.length)return null;var a=i.pop();return r[a].body},e.prototype.detectEvictedFragments=function(t,e){var r=this,i=void 0,a=void 0;Object.keys(this.fragments).forEach(function(n){var o=r.fragments[n];if(!0===o.buffered){var s=o.range[t];if(s){i=s.time;for(var l=0;l=a&&e<=n){i.push({startPTS:Math.max(t,r.start(s)),endPTS:Math.min(e,r.end(s))});break}if(ta)i.push({startPTS:Math.max(t,r.start(s)),endPTS:Math.min(e,r.end(s))}),o=!0;else if(e<=a)break}return{time:i,partial:o}},e.prototype.getFragmentKey=function(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn},e.prototype.getPartialFragment=function(t){var e=this,r=void 0,i=void 0,a=void 0,n=null,o=0;return Object.keys(this.fragments).forEach(function(s){var l=e.fragments[s];e.isPartial(l)&&(i=l.body.startPTS-e.bufferPadding,a=l.body.endPTS+e.bufferPadding,t>=i&&t<=a&&(r=Math.min(t-i,a-t),o<=r&&(n=l.body,o=r)))}),n},e.prototype.getState=function(t){var e=this.getFragmentKey(t),r=this.fragments[e],i=l.NOT_LOADED;return void 0!==r&&(i=r.buffered?!0===this.isPartial(r)?l.PARTIAL:l.OK:l.APPENDING),i},e.prototype.isPartial=function(t){return!0===t.buffered&&(void 0!==t.range.video&&!0===t.range.video.partial||void 0!==t.range.audio&&!0===t.range.audio.partial)},e.prototype.isTimeBuffered=function(t,e,r){for(var i=void 0,a=void 0,n=0;n=i&&e<=a)return!0;if(e<=i)return!1}return!1},e.prototype.onFragLoaded=function(t){var e=t.frag;if(!isNaN(e.sn)&&!e.bitrateTest){var r=this.getFragmentKey(e),i={body:e,range:Object.create(null),buffered:!1};this.fragments[r]=i}},e.prototype.onBufferAppended=function(t){var e=this;this.timeRanges=t.timeRanges,Object.keys(this.timeRanges).forEach(function(t){var r=e.timeRanges[t];e.detectEvictedFragments(t,r)})},e.prototype.onFragBuffered=function(t){this.detectPartialFragments(t.frag)},e.prototype.hasFragment=function(t){var e=this.getFragmentKey(t);return void 0!==this.fragments[e]},e.prototype.removeFragment=function(t){var e=this.getFragmentKey(t);delete this.fragments[e]},e.prototype.removeAllFragments=function(){this.fragments=Object.create(null)},e}(o.a)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",function(){return a});var a=function(){function t(){i(this,t)}return t.isBuffered=function(t,e){try{if(t)for(var r=t.buffered,i=0;i=r.start(i)&&e<=r.end(i))return!0}catch(t){}return!1},t.bufferInfo=function(t,e,r){try{if(t){var i=t.buffered,a=[],n=void 0;for(n=0;nd&&(i[u-1].end=t[l].end):i.push(t[l])}else i.push(t[l])}for(l=0,a=0,n=o=e;l=c&&e0&&this._events[t].length>a&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),a||(a=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var a=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,a,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,a=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(n(r)){for(s=o;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(35),n=r(36),o=r(37),s=r(2),l=r(0),u=r(1),d=r(4),c=Object(d.a)(),h=function(){function t(e,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=a.removePKCS7Padding,o=void 0===n||n;if(i(this,t),this.logEnabled=!0,this.observer=e,this.config=r,this.removePKCS7Padding=o,o)try{var s=c.crypto;s&&(this.subtle=s.subtle||s.webkitSubtle)}catch(t){}this.disableWebCrypto=!this.subtle}return t.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.prototype.decrypt=function(t,e,r,i){var s=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(l.b.log("JS AES decrypt"),this.logEnabled=!1);var u=this.decryptor;u||(this.decryptor=u=new o.a),u.expandKey(e),i(u.decrypt(t,0,r,this.removePKCS7Padding))}else{this.logEnabled&&(l.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var d=this.subtle;this.key!==e&&(this.key=e,this.fastAesKey=new n.a(d,e)),this.fastAesKey.expandKey().then(function(n){new a.a(d,r).decrypt(t,n).catch(function(a){s.onWebCryptoError(a,t,e,r,i)}).then(function(t){i(t)})}).catch(function(a){s.onWebCryptoError(a,t,e,r,i)})}},t.prototype.onWebCryptoError=function(t,e,r,i,a){this.config.enableSoftwareAES?(l.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(e,r,i,a)):(l.b.error("decrypting error : "+t.message),this.observer.trigger(u.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},t.prototype.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}();e.a=h},function(t,e,r){"use strict";function i(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}e.a=i},function(t,e,r){"use strict";function i(t,e,r){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(r);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(r)}}function a(t,e,r){var i=t[e],a=t[r],n=a.startPTS;isNaN(n)?a.start=r>e?i.start+i.duration:Math.max(i.start-a.duration,0):r>e?(i.duration=n-i.start,i.duration<0&&s.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(a.duration=i.start-n,a.duration<0&&s.b.warn("negative duration computed for frag "+a.sn+",level "+a.level+", there should be some duration drift between playlist and fragment!"))}function n(t,e,r,i,n,o){var s=r;if(!isNaN(e.startPTS)){var l=Math.abs(e.startPTS-r);isNaN(e.deltaPTS)?e.deltaPTS=l:e.deltaPTS=Math.max(l,e.deltaPTS),s=Math.max(r,e.startPTS),r=Math.min(r,e.startPTS),i=Math.max(i,e.endPTS),n=Math.min(n,e.startDTS),o=Math.max(o,e.endDTS)}var u=r-e.start;e.start=e.startPTS=r,e.maxStartPTS=s,e.endPTS=i,e.startDTS=n,e.endDTS=o,e.duration=i-r;var d=e.sn;if(!t||dt.endSN)return 0;var c=void 0,h=void 0,f=void 0;for(c=d-t.startSN,h=t.fragments,h[c]=e,f=c;f>0;f--)a(h,f,f-1);for(f=c;f=0&&a3&&void 0!==arguments[3]?arguments[3]:null;if(r.isSidxRequest)return this._handleSidxRequest(t,r),void this._handlePlaylistLoaded(t,e,r,i);this.resetInternalLoader(r.type);var a=t.data;if(e.tload=p.now(),0!==a.indexOf("#EXTM3U"))return void this._handleManifestParsingError(t,r,"no EXTM3U delimiter",i);a.indexOf("#EXTINF:")>0||a.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(t,e,r,i):this._handleMasterPlaylist(t,e,r,i)},e.prototype.loaderror=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,r)},e.prototype.loadtimeout=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,r,!0)},e.prototype._handleMasterPlaylist=function(t,r,i,a){var n=this.hls,s=t.data,l=e.getResponseUrl(t,i),d=c.a.parseMasterPlaylist(s,l);if(!d.length)return void this._handleManifestParsingError(t,i,"no level found in manifest",a);var h=d.map(function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}}),f=c.a.parseMasterPlaylistMedia(s,l,"AUDIO",h),p=c.a.parseMasterPlaylistMedia(s,l,"SUBTITLES");if(f.length){var v=!1;f.forEach(function(t){t.url||(v=!0)}),!1===v&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(u.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main"}))}n.trigger(o.a.MANIFEST_LOADED,{levels:d,audioTracks:f,subtitles:p,url:l,stats:r,networkDetails:a})},e.prototype._handleTrackOrLevelPlaylist=function(t,r,i,a){var n=this.hls,s=i.id,l=i.level,u=i.type,d=e.getResponseUrl(t,i),h=isNaN(s)?0:s,f=isNaN(l)?h:l,g=e.mapContextToLevelType(i),y=c.a.parseLevelPlaylist(t.data,d,f,g,h);if(y.tload=r.tload,u===v.MANIFEST){var m={url:d,details:y};n.trigger(o.a.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:d,stats:r,networkDetails:a})}if(r.tparsed=p.now(),y.needSidxRanges){var b=y.initSegment.url;return void this.load(b,{isSidxRequest:!0,type:u,level:l,levelDetails:y,id:s,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}i.levelDetails=y,this._handlePlaylistLoaded(t,r,i,a)},e.prototype._handleSidxRequest=function(t,e){var r=d.a.parseSegmentIndex(new Uint8Array(t.data));r.references.forEach(function(t,r){var i=t.info,a=e.levelDetails.fragments[r];0===a.byteRange.length&&(a.rawByteRange=String(1+i.end-i.start)+"@"+String(i.start))}),e.levelDetails.initSegment.rawByteRange=String(r.moovEndOffset)+"@0"},e.prototype._handleManifestParsingError=function(t,e,r,i){this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.MANIFEST_PARSING_ERROR,fatal:!0,url:t.url,reason:r,networkDetails:i})},e.prototype._handleNetworkError=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];u.b.info("A network error occured while loading a "+t.type+"-type playlist");var i=void 0,a=void 0,n=this.getInternalLoader(t);switch(t.type){case v.MANIFEST:i=r?l.a.MANIFEST_LOAD_TIMEOUT:l.a.MANIFEST_LOAD_ERROR,a=!0;break;case v.LEVEL:i=r?l.a.LEVEL_LOAD_TIMEOUT:l.a.LEVEL_LOAD_ERROR,a=!1;break;case v.AUDIO_TRACK:i=r?l.a.AUDIO_TRACK_LOAD_TIMEOUT:l.a.AUDIO_TRACK_LOAD_ERROR,a=!1;break;default:a=!1}n&&(n.abort(),this.resetInternalLoader(t.type)),this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:i,fatal:a,url:n.url,loader:n,context:t,networkDetails:e})},e.prototype._handlePlaylistLoaded=function(t,r,i,a){var n=i.type,s=i.level,l=i.id,u=i.levelDetails;if(!u.targetduration)return void this._handleManifestParsingError(t,i,"invalid target duration",a);if(e.canHaveQualityLevels(i.type))this.hls.trigger(o.a.LEVEL_LOADED,{details:u,level:s||0,id:l||0,stats:r,networkDetails:a});else switch(n){case v.AUDIO_TRACK:this.hls.trigger(o.a.AUDIO_TRACK_LOADED,{details:u,id:l,stats:r,networkDetails:a});break;case v.SUBTITLE_TRACK:this.hls.trigger(o.a.SUBTITLE_TRACK_LOADED,{details:u,id:l,stats:r,networkDetails:a})}},h(e,null,[{key:"ContextType",get:function(){return v}},{key:"LevelType",get:function(){return g}}]),e}(s.a);e.a=y},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(0),n=r(1),o=Math.pow(2,32)-1,s=function(){function t(e,r){i(this,t),this.observer=e,this.remuxer=r}return t.prototype.resetTimeStamp=function(t){this.initPTS=t},t.prototype.resetInitSegment=function(e,r,i,a){if(e&&e.byteLength){var o=this.initData=t.parseInitSegment(e);null==r&&(r="mp4a.40.5"),null==i&&(i="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:r+","+i,initSegment:a?e:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:r,initSegment:a?e:null}),o.video&&(s.video={container:"video/mp4",codec:i,initSegment:a?e:null})),this.observer.trigger(n.a.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else r&&(this.audioCodec=r),i&&(this.videoCodec=i)},t.probe=function(e){return t.findBox({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint16=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<8|t[e+1];return r<0?65536+r:r},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r},t.writeUint32=function(t,e,r){t.data&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},t.findBox=function(e,r){var i=[],a=void 0,n=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0;if(e.data?(u=e.start,s=e.end,e=e.data):(u=0,s=e.byteLength),!r.length)return null;for(a=u;a1?a+n:s,o===r[0]&&(1===r.length?i.push({data:e,start:a+8,end:d}):(l=t.findBox({data:e,start:a+8,end:d},r.slice(1)),l.length&&(i=i.concat(l)))),a=d;return i},t.parseSegmentIndex=function(e){var r=t.findBox(e,["moov"])[0],i=r?r.end:null,a=0,n=t.findBox(e,["sidx"]),o=void 0;if(!n||!n[0])return null;o=[],n=n[0];var s=n.data[0];a=0===s?8:16;var l=t.readUint32(n,a);a+=4;a+=0===s?8:16,a+=2;var u=n.end+0,d=t.readUint16(n,a);a+=2;for(var c=0;c>>31)return void console.warn("SIDX has hierarchical references (not supported)");var v=t.readUint32(n,h);h+=4,o.push({referenceSize:p,subsegmentDuration:v,info:{duration:v/l,start:u,end:u+p-1}}),u+=p,h+=4,a=h}return{earliestPresentationTime:0,timescale:l,version:s,referencesCount:d,references:o,moovEndOffset:i}},t.parseInitSegment=function(e){var r=[];return t.findBox(e,["moov","trak"]).forEach(function(e){var i=t.findBox(e,["tkhd"])[0];if(i){var n=i.data[i.start],o=0===n?12:20,s=t.readUint32(i,o),l=t.findBox(e,["mdia","mdhd"])[0];if(l){n=l.data[l.start],o=0===n?12:20;var u=t.readUint32(l,o),d=t.findBox(e,["mdia","hdlr"])[0];if(d){var c=t.bin2str(d.data.subarray(d.start+8,d.start+12)),h={soun:"audio",vide:"video"}[c];if(h){var f=t.findBox(e,["mdia","minf","stbl","stsd"]);if(f.length){f=f[0];var p=t.bin2str(f.data.subarray(f.start+12,f.start+16));a.b.log("MP4Demuxer:"+h+":"+p+" found")}r[s]={timescale:u,type:h},r[h]={timescale:u,id:s}}}}}}),r},t.getStartDTS=function(e,r){var i=void 0,a=void 0,n=void 0;return i=t.findBox(r,["moof","traf"]),a=[].concat.apply([],i.map(function(r){return t.findBox(r,["tfhd"]).map(function(i){var a=void 0,n=void 0;return a=t.readUint32(i,4),n=e[a].timescale||9e4,t.findBox(r,["tfdt"]).map(function(e){var r=void 0,i=void 0;return r=e.data[e.start],i=t.readUint32(e,4),1===r&&(i*=Math.pow(2,32),i+=t.readUint32(e,8)),i})[0]/n})})),n=Math.min.apply(null,a),isFinite(n)?n:0},t.offsetStartDTS=function(e,r,i){t.findBox(r,["moof","traf"]).map(function(r){return t.findBox(r,["tfhd"]).map(function(a){var n=t.readUint32(a,4),s=e[n].timescale||9e4;t.findBox(r,["tfdt"]).map(function(e){var r=e.data[e.start],a=t.readUint32(e,4);if(0===r)t.writeUint32(e,4,a-i*s);else{a*=Math.pow(2,32),a+=t.readUint32(e,8),a-=i*s,a=Math.max(a,0);var n=Math.floor(a/(o+1)),l=Math.floor(a%(o+1));t.writeUint32(e,4,n),t.writeUint32(e,8,l)}})})})},t.prototype.append=function(e,r,i,a){var o=this.initData;o||(this.resetInitSegment(e,this.audioCodec,this.videoCodec,!1),o=this.initData);var s=void 0,l=this.initPTS;if(void 0===l){var u=t.getStartDTS(o,e);this.initPTS=l=u-r,this.observer.trigger(n.a.INIT_PTS_FOUND,{initPTS:l})}t.offsetStartDTS(o,e,l),s=t.getStartDTS(o,e),this.remuxer.remux(o.audio,o.video,null,null,s,i,a,e)},t.prototype.destroy=function(){},t}();e.a=s},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(5),n=r.n(a),o=function(){function t(t,e){for(var r=0;r1?e-1:0),i=1;i1?e-1:0),i=1;i0&&null!=e&&null!=e.key&&"AES-128"===e.method){var p=this.decrypter;null==p&&(p=this.decrypter=new o.a(this.observer,this.config));var g=this,y=void 0;try{y=v.now()}catch(t){y=Date.now()}p.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var o=void 0;try{o=v.now()}catch(t){o=Date.now()}g.observer.trigger(a.a.FRAG_DECRYPTED,{stats:{tstart:y,tdecrypt:o}}),g.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,n,s,l,u,d,c,h,f)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,n,s,l,u,d,c,h,f)},t.prototype.pushDecrypted=function(t,e,r,i,o,f,p,v,g,y,m,b){var E=this.demuxer;if(!E||(p||v)&&!this.probe(t)){for(var T=this.observer,S=this.typeSupported,R=this.config,A=[{demux:u.a,remux:c.a},{demux:l.a,remux:h.a},{demux:s.a,remux:c.a},{demux:d.a,remux:c.a}],_=0,w=A.length;_>>6),(n=(60&e[r+2])>>>2)>c.length-1?void t.trigger(v.a.ERROR,{type:p.b.MEDIA_ERROR,details:p.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+n}):(s=(1&e[r+2])<<2,s|=(192&e[r+3])>>>6,f.b.log("manifest codec:"+i+",ADTS data:type:"+a+",sampleingIndex:"+n+"["+c[n]+"Hz],channelConfig:"+s),/firefox/i.test(u)?n>=6?(a=5,l=new Array(4),o=n-3):(a=2,l=new Array(2),o=n):-1!==u.indexOf("android")?(a=2,l=new Array(2),o=n):(a=5,l=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&n>=6?o=n-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(n>=6&&1===s||/vivaldi/i.test(u))||!i&&1===s)&&(a=2,l=new Array(2)),o=n)),l[0]=a<<3,l[0]|=(14&n)>>1,l[1]|=(1&n)<<7,l[1]|=s<<3,5===a&&(l[1]|=(14&o)>>1,l[2]=(1&o)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:c[n],channelCount:s,codec:"mp4a.40."+a,manifestCodec:d})}function a(t,e){return 255===t[e]&&240==(246&t[e+1])}function n(t,e){return 1&t[e+1]?7:9}function o(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function s(t,e){return!!(e+10&&e+s+l<=d)return u=r+i*a,{headerLength:s,frameLength:l,stamp:u}}function h(t,e,r,i,a){var n=d(t.samplerate),o=c(e,r,i,a,n);if(o){var s=o.stamp,l=o.headerLength,u=o.frameLength,h={unit:e.subarray(r+l,r+l+u),pts:s,dts:s};return t.samples.push(h),t.len+=u,{sample:h,length:u+l}}}e.d=s,e.e=l,e.c=u,e.b=d,e.a=h;var f=r(0),p=r(2),v=r(1);r(4)},function(t,e,r){"use strict";var i={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],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,e,r,i,a){if(!(r+24>e.length)){var n=this.parseHeader(e,r);if(n&&r+n.frameLength<=e.length){var o=9e4*n.samplesPerFrame/n.sampleRate,s=i+a*o,l={unit:e.subarray(r,r+n.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=n.channelCount,t.samplerate=n.sampleRate,t.samples.push(l),t.len+=n.frameLength,{sample:l,length:n.frameLength}}}},parseHeader:function(t,e){var r=t[e+1]>>3&3,a=t[e+1]>>1&3,n=t[e+2]>>4&15,o=t[e+2]>>2&3,s=t[e+2]>>1&1;if(1!==r&&0!==n&&15!==n&&3!==o){var l=3===r?3-a:3===a?3:4,u=1e3*i.BitratesMap[14*l+n-1],d=3===r?0:2===r?1:2,c=i.SamplingRateMap[3*d+o],h=t[e+3]>>6==3?1:2,f=i.SamplesCoefficients[r][a],p=i.BytesInSlot[a],v=8*f*p;return{sampleRate:c,channelCount:h,frameLength:parseInt(f*u/c+s,10)*p,samplesPerFrame:v}}},isHeaderPattern:function(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])},isHeader:function(t,e){return!!(e+1e?-1:0})}function n(t,e,r){var i=!1;return e&&e.details&&r&&(r.endCC>r.startCC||t&&t.cc0;)t.removeCue(t.cues[0])}e.b=i,e.a=a},function(t,e,r){"use strict";function i(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new d,this.regionList=[]}function a(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+(0|i)/1e3}var r=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?e(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?e(r[1],r[2],0,r[4]):e(0,r[1],r[2],r[4]):null}function n(){this.values=Object.create(null)}function o(t,e,r,i){var a=i?t.split(i):[t];for(var n in a)if("string"==typeof a[n]){var o=a[n].split(r);if(2===o.length){var s=o[0],l=o[1];e(s,l)}}}function s(t,e,r){function i(){var e=a(t);if(null===e)throw new Error("Malformed timestamp: "+l);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function s(){t=t.replace(/^\s+/,"")}var l=t;if(s(),e.startTime=i(),s(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+l);t=t.substr(3),s(),e.endTime=i(),s(),function(t,e){var i=new n;o(t,function(t,e){switch(t){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===e){i.set(t,r[a].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":var n=e.split(","),o=n[0];i.integer(t,o),i.percent(t,o)&&i.set("snapToLines",!1),i.alt(t,o,["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",h,"end"]);break;case"position":n=e.split(","),i.percent(t,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",h,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",h,"end","left","right"])}},/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&-1===c.line&&(a=-1),e.line=a,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",h);var s=i.get("position","auto");"auto"===s&&50===c.position&&(s="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=s}(t,e)}function l(t){return t.replace(//gi,"\n")}r.d(e,"b",function(){return l});var u=r(63),d=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};n.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,r){for(var i=0;i=0&&e<=100)&&(this.set(t,e),!0)}};var c=new u.a(0,0,0),h="middle"===c.align?"middle":"center";i.prototype={parse:function(t){function e(){var t=r.buffer,e=0;for(t=l(t);e0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var a=t.DefaultConfig;if((r.liveSyncDurationCount||r.liveMaxLatencyDurationCount)&&(r.liveSyncDuration||r.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var n in a)n in r||(r[n]=a[n]);if(void 0!==r.liveMaxLatencyDurationCount&&r.liveMaxLatencyDurationCount<=r.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==r.liveMaxLatencyDuration&&(r.liveMaxLatencyDuration<=r.liveSyncDuration||void 0===r.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(v.a)(r.debug),this.config=r,this._autoLevelCapping=-1;var o=this.observer=new b.a;o.trigger=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:-1;v.b.log("startLoad("+t+")"),this.networkControllers.forEach(function(e){e.startLoad(t)})},t.prototype.stopLoad=function(){v.b.log("stopLoad"),this.networkControllers.forEach(function(t){t.stopLoad()})},t.prototype.swapAudioCodec=function(){v.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){v.b.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)},E(t,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){v.b.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){v.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){v.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){v.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){v.b.log("set startLevel:"+t);var e=this;-1!==t&&(t=Math.max(t,e.minAutoLevel)),e.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){v.b.log("set autoLevelCapping:"+t),this._autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this,e=t.levels,r=t.config.minAutoBitrate,i=e?e.length:0,a=0;ar)return a}return 0}},{key:"maxAutoLevel",get:function(){var t=this,e=t.levels,r=t.autoLevelCapping;return-1===r&&e&&e.length?e.length-1:r}},{key:"nextAutoLevel",get:function(){var t=this;return Math.min(Math.max(t.abrController.nextAutoLevel,t.minAutoLevel),t.maxAutoLevel)},set:function(t){var e=this;e.abrController.nextAutoLevel=Math.max(e.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),t}();e.default=T},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(5),n=r.n(a),o=r(9),s=r(18),l=r(30),u=r(0),d=r(19),c=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,h=/#EXT-X-MEDIA:(.*)/g,f=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),p=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,v=/\.(mp4|m4s|m4v|m4a)$/i,g=function(){function t(){i(this,t)}return t.findGroup=function(t,e){if(!t)return null;for(var r=null,i=0;i2?(e=r.shift()+".",e+=parseInt(r.shift()).toString(16),e+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):e=t,e},t.resolve=function(t,e){return n.a.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var i=[],a=void 0;for(c.lastIndex=0;null!=(a=c.exec(e));){var n={},o=n.attrs=new l.a(a[1]);n.url=t.resolve(a[2],r);var s=o.decimalResolution("RESOLUTION");s&&(n.width=s.width,n.height=s.height),n.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),n.name=o.NAME,function(t,e){["video","audio"].forEach(function(r){var i=t.filter(function(t){return Object(d.b)(t,r)});if(i.length){var a=i.filter(function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)});e[r+"Codec"]=a.length>0?a[0]:i[0],t=t.filter(function(t){return-1===i.indexOf(t)})}}),e.unknownCodecs=t}([].concat((o.CODECS||"").split(/[ ,]+/)),n),n.videoCodec&&-1!==n.videoCodec.indexOf("avc1")&&(n.videoCodec=t.convertAVC1ToAVCOTI(n.videoCodec)),i.push(n)}return i},t.parseMasterPlaylistMedia=function(e,r,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],n=void 0,o=[],s=0;for(h.lastIndex=0;null!==(n=h.exec(e));){var u={},d=new l.a(n[1]);if(d.TYPE===i){if(u.groupId=d["GROUP-ID"],u.name=d.NAME,u.type=i,u.default="YES"===d.DEFAULT,u.autoselect="YES"===d.AUTOSELECT,u.forced="YES"===d.FORCED,d.URI&&(u.url=t.resolve(d.URI,r)),u.lang=d.LANGUAGE,u.name||(u.name=u.lang),a.length){var c=t.findGroup(a,u.groupId);u.audioCodec=c?c.codec:a[0].codec}u.id=s++,o.push(u)}}return o},t.parseLevelPlaylist=function(t,e,r,i,a){var n=0,d=0,c={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},h=new s.a,g=0,y=null,m=new o.a,b=void 0,E=void 0;for(f.lastIndex=0;null!==(b=f.exec(t));){var T=b[1];if(T){m.duration=parseFloat(T);var S=(" "+b[2]).slice(1);m.title=S||null,m.tagList.push(S?["INF",T,S]:["INF",T])}else if(b[3]){if(!isNaN(m.duration)){var R=n++;m.type=i,m.start=d,m.levelkey=h,m.sn=R,m.level=r,m.cc=g,m.urlId=a,m.baseurl=e,m.relurl=(" "+b[3]).slice(1),c.programDateTime&&(y?m.rawProgramDateTime?m.pdt=Date.parse(m.rawProgramDateTime):m.pdt=y.pdt+1e3*y.duration:m.pdt=Date.parse(c.programDateTime),m.endPdt=m.pdt+1e3*m.duration),c.fragments.push(m),y=m,d+=m.duration,m=new o.a}}else if(b[4]){if(m.rawByteRange=(" "+b[4]).slice(1),y){var A=y.byteRangeEndOffset;A&&(m.lastByteRangeEndOffset=A)}}else if(b[5])m.rawProgramDateTime=(" "+b[5]).slice(1),m.tagList.push(["PROGRAM-DATE-TIME",m.rawProgramDateTime]),void 0===c.programDateTime&&(c.programDateTime=new Date(new Date(Date.parse(b[5]))-1e3*d));else{for(b=b[0].match(p),E=1;E=0&&(h.method=I,h.baseuri=e,h.reluri=k,h.key=null,h.iv=O));break;case"START":var C=_,P=new l.a(C),x=P.decimalFloatingPoint("TIME-OFFSET");isNaN(x)||(c.startTimeOffset=x);break;case"MAP":var F=new l.a(_);m.relurl=F.URI,m.rawByteRange=F.BYTERANGE,m.baseurl=e,m.level=r,m.type=i,m.sn="initSegment",c.initSegment=m,m=new o.a;break;default:u.b.warn("line parsed but not handled: "+b)}}}return m=y,m&&!m.relurl&&(c.fragments.pop(),d-=m.duration),c.totalduration=d,c.averagetargetduration=d/c.fragments.length,c.endSN=n-1,c.startCC=c.fragments[0]?c.fragments[0].cc:0,c.endCC=g,!c.initSegment&&c.fragments.length&&c.fragments.every(function(t){return v.test(t.relurl)})&&(u.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),m=new o.a,m.relurl=c.fragments[0].relurl,m.baseurl=e,m.level=r,m.type=i,m.sn="initSegment",c.initSegment=m,c.needSidxRanges=!0),c},t}();e.a=g},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=/^(\d+)x(\d+)$/,n=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function t(e){i(this,t),"string"==typeof e&&(e=t.parseAttrList(e));for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r])}return t.prototype.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;iNumber.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=a.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e=void 0,r={};for(n.lastIndex=0;null!==(e=n.exec(t));){var i=e[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}();e.a=o},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(2),u=r(0),d=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.FRAG_LOADING));return n.loaders={},n}return n(e,t),e.prototype.destroy=function(){var e=this.loaders;for(var r in e){var i=e[r];i&&i.destroy()}this.loaders={},t.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag,r=e.type,i=this.loaders,a=this.hls.config,n=a.fLoader,o=a.loader;e.loaded=0;var s=i[r];s&&(u.b.warn("abort previous fragment loader for type: "+r),s.abort()),s=i[r]=e.loader=a.fLoader?new n(a):new o(a);var l=void 0,d=void 0,c=void 0;l={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var h=e.byteRangeStartOffset,f=e.byteRangeEndOffset;isNaN(h)||isNaN(f)||(l.rangeStart=h,l.rangeEnd=f),d={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},s.load(l,d,c)},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.data,n=r.frag;n.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(o.a.FRAG_LOADED,{payload:a,frag:n,stats:e,networkDetails:i})},e.prototype.loaderror=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:r})},e.prototype.loadtimeout=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=e.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:r})},e.prototype.loadprogress=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=e.frag;a.loaded=t.loaded,this.hls.trigger(o.a.FRAG_LOAD_PROGRESS,{frag:a,stats:t,networkDetails:i})},e}(s.a);e.a=d},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(2),u=r(0),d=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.KEY_LOADING));return n.loaders={},n.decryptkey=null,n.decrypturl=null,n}return n(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},s.a.prototype.destroy.call(this)},e.prototype.onKeyLoading=function(t){var e=t.frag,r=e.type,i=this.loaders[r],a=e.decryptdata,n=a.uri;if(n!==this.decrypturl||null===this.decryptkey){var s=this.hls.config;i&&(u.b.warn("abort previous key loader for type:"+r),i.abort()),e.loader=this.loaders[r]=new s.loader(s),this.decrypturl=n,this.decryptkey=null;var l=void 0,d=void 0,c=void 0;l={url:n,frag:e,responseType:"arraybuffer"},d={timeout:s.fragLoadingTimeOut,maxRetry:s.fragLoadingMaxRetry,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(l,d,c)}else this.decryptkey&&(a.key=this.decryptkey,this.hls.trigger(o.a.KEY_LOADED,{frag:e}))},e.prototype.loadsuccess=function(t,e,r){var i=r.frag;this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(o.a.KEY_LOADED,{frag:i})},e.prototype.loaderror=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.prototype.loadtimeout=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:l.b.NETWORK_ERROR,details:l.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},e}(s.a);e.a=d},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(6),s=r(11),l=r(20),u=r(1),d=r(10),c=r(9),h=r(16),f=r(15),p=r(24),v=r(2),g=r(0),y=r(25),m=r(8),b=r(48),E=function(){function t(t,e){for(var r=0;r0&&-1===t&&(g.b.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=T.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=T.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.clearInterval(),this.state=T.STOPPED,this.forceStartLoad=!1},e.prototype.doTick=function(){switch(this.state){case T.BUFFER_FLUSHING:this.fragLoadError=0;break;case T.IDLE:this._doTickIdle();break;case T.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=T.IDLE);break;case T.FRAG_LOADING_WAITING_RETRY:var e=window.performance.now(),r=this.retryDate;(!r||e>=r||this.media&&this.media.seeking)&&(g.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=T.IDLE);break;case T.ERROR:case T.STOPPED:case T.FRAG_LOADING:case T.PARSING:case T.PARSED:case T.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},e.prototype._doTickIdle=function(){var t=this.hls,e=t.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&e.startFragPrefetch)){var i=void 0;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var a=t.nextLoadLevel,n=this.levels[a];if(n){var o=n.bitrate,l=void 0;l=o?Math.max(8*e.maxBufferSize/o,e.maxBufferLength):e.maxBufferLength,l=Math.min(l,e.maxMaxBufferLength);var d=s.a.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,e.maxBufferHole),c=d.len;if(!(c>=l)){g.b.trace("buffer length of "+c.toFixed(3)+" is below max of "+l.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=a;var h=n.details;if(!h||h.live&&this.levelLastLoaded!==a)return void(this.state=T.WAITING_LEVEL);var f=this.fragPrevious;if(!h.live&&f&&!f.backtracked&&f.sn===h.endSN&&!d.nextStart){if(Math.min(r.duration,f.start+f.duration)-Math.max(d.end,f.start)<=Math.max(.2,f.duration)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(u.a.BUFFER_EOS,p),void(this.state=T.ENDED)}}this._fetchPayloadOrEos(i,d,h)}}}},e.prototype._fetchPayloadOrEos=function(t,e,r){var i=this.fragPrevious,a=this.level,n=r.fragments,o=n.length;if(0!==o){var s=n[0].start,l=n[o-1].start+n[o-1].duration,u=e.end,d=void 0;if(r.initSegment&&!r.initSegment.data)d=r.initSegment;else if(r.live){var c=this.config.initialLiveManifestSize;if(oh&&(u.currentTime=h),this.nextLoadPosition=h}if(t.PTSKnown&&e>i&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(a)if(t.programDateTime)d=Object(b.b)(n,a.endPdt+1);else{var f=a.sn+1;if(f>=t.startSN&&f<=t.endSN){var p=n[f-t.startSN];a.cc===p.cc&&(d=p,g.b.log("live playlist, switching playlist, load frag with next SN: "+d.sn))}d||(d=o.a.search(n,function(t){return a.cc-t.cc}))&&g.b.log("live playlist, switching playlist, load frag with same CC: "+d.sn)}d||(d=n[Math.min(s-1,Math.round(s/2))],g.b.log("live playlist, switching playlist, unknown, load middle frag : "+d.sn))}return d},e.prototype._findFragment=function(t,e,r,i,a,n,o){var s=this.hls.config,l=void 0,u=void 0;if(as.maxBufferHole&&e.dropped&&d?(l=h,g.b.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")):(l=f,g.b.log("SN just loaded, load next one: "+l.sn))}else l=null;else l.backtracked&&(f&&f.backtracked?(g.b.warn("Already backtracked from fragment "+f.sn+", will not backtrack to fragment "+l.sn+". Loading fragment "+f.sn),l=f):(g.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),l.dropped=0,h?(l=h,l.backtracked=!0):d&&(l=null)))}return l},e.prototype._loadKey=function(t){this.state=T.KEY_LOADING,this.hls.trigger(u.a.KEY_LOADING,{frag:t})},e.prototype._loadFragment=function(t){var e=this.fragmentTracker.getState(t);this.fragCurrent=t,this.startFragRequested=!0,isNaN(t.sn)||t.bitrateTest||(this.nextLoadPosition=t.start+t.duration),t.backtracked||e===d.a.NOT_LOADED||e===d.a.PARTIAL?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(u.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new l.a(this.hls,"main")),this.state=T.FRAG_LOADING):e===d.a.APPENDING&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)},e.prototype.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,h.a.LevelType.MAIN)},e.prototype.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},e.prototype._checkFragmentChanged=function(){var t=void 0,e=void 0,r=this.media;if(r&&r.readyState&&!1===r.seeking&&(e=r.currentTime,e>this.lastCurrentTime&&(this.lastCurrentTime=e),s.a.isBuffered(r,e)?t=this.getBufferedFrag(e):s.a.isBuffered(r,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var i=t;if(i!==this.fragPlaying){this.hls.trigger(u.a.FRAG_CHANGED,{frag:i});var a=i.level;this.fragPlaying&&this.fragPlaying.level===a||this.hls.trigger(u.a.LEVEL_SWITCHED,{level:a}),this.fragPlaying=i}}},e.prototype.immediateLevelSwitch=function(){if(g.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,e=void 0;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},e.prototype.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,s.a.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},e.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e=void 0,r=void 0,i=void 0;if(r=this.getBufferedFrag(t.currentTime),r&&r.startPTS>1&&this.flushMainBuffer(0,r.startPTS-1),t.paused)e=0;else{var a=this.hls.nextLoadLevel,n=this.levels[a],o=this.fragLastKbps;e=o&&this.fragCurrent?this.fragCurrent.duration*n.bitrate/(1e3*o)+1:0}if((i=this.getBufferedFrag(t.currentTime+e))&&(i=this.followingBufferedFrag(i))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.maxStartPTS,Number.POSITIVE_INFINITY)}}},e.prototype.flushMainBuffer=function(t,e){this.state=T.BUFFER_FLUSHING;var r={startOffset:t,endOffset:e};this.altAudio&&(r.type="video"),this.hls.trigger(u.a.BUFFER_FLUSHING,r)},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(g.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.backtracked=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){var t=this.media,e=t?t.currentTime:void 0,r=this.config;isNaN(e)||g.b.log("media seeking to "+e.toFixed(3));var i=this.mediaBuffer?this.mediaBuffer:t,a=s.a.bufferInfo(i,e,this.config.maxBufferHole);if(this.state===T.FRAG_LOADING){var n=this.fragCurrent;if(0===a.len&&n){var o=r.maxFragLookUpTolerance,l=n.start-o,u=n.start+n.duration+o;eu?(n.loader&&(g.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=T.IDLE):g.b.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===T.ENDED&&(0===a.len&&(this.fragPrevious=0),this.state=T.IDLE);t&&(this.lastCurrentTime=e),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=e),this.tick()},e.prototype.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;isNaN(e)||g.b.log("media seeked to "+e.toFixed(3)),this.tick()},e.prototype.onMediaEnded=function(){g.b.log("media ended"),this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestLoading=function(){g.b.log("trigger BUFFER_RESET"),this.hls.trigger(u.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestParsed=function(t){var e=!1,r=!1,i=void 0;t.levels.forEach(function(t){(i=t.audioCodec)&&(-1!==i.indexOf("mp4a.40.2")&&(e=!0),-1!==i.indexOf("mp4a.40.5")&&(r=!0))}),this.audioCodecSwitch=e&&r,this.audioCodecSwitch&&g.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1;var a=this.config;(a.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(a.startPosition)},e.prototype.onLevelLoaded=function(t){var e=t.details,r=t.level,i=this.levels[this.levelLastLoaded],a=this.levels[r],n=e.totalduration,o=0;if(g.b.log("level "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+n),e.live){var s=a.details;s&&e.fragments.length>0?(f.b(s,e),o=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,s),e.PTSKnown&&!isNaN(o)?g.b.log("live playlist sliding:"+o.toFixed(3)):(g.b.log("live playlist - outdated PTS, unknown sliding"),Object(y.a)(this.fragPrevious,i,e))):(g.b.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,Object(y.a)(this.fragPrevious,i,e))}else e.PTSKnown=!1;if(a.details=e,this.levelLastLoaded=r,this.hls.trigger(u.a.LEVEL_UPDATED,{details:e,level:r}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var l=e.startTimeOffset;isNaN(l)?e.live?(this.startPosition=this.computeLivePosition(o,e),g.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(l<0&&(g.b.log("negative start time offset "+l+", count from end of last fragment"),l=o+n+l),g.b.log("start time offset found in playlist, adjust startPosition to "+l),this.startPosition=l),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===T.WAITING_LEVEL&&(this.state=T.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===T.KEY_LOADING&&(this.state=T.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===T.FRAG_LOADING&&e&&"main"===r.type&&r.level===e.level&&r.sn===e.sn){var i=t.stats,a=this.levels[e.level],n=a.details;if(g.b.log("Loaded "+e.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+e.level),this.bitrateTest=!1,this.stats=i,!0===r.bitrateTest&&this.hls.nextLoadLevel)this.state=T.IDLE,this.startFragRequested=!1,i.tparsed=i.tbuffered=window.performance.now(),this.hls.trigger(u.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else if("initSegment"===r.sn)this.state=T.IDLE,i.tparsed=i.tbuffered=window.performance.now(),n.initSegment.data=t.payload,this.hls.trigger(u.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else{this.state=T.PARSING;var o=n.totalduration,s=e.level,d=e.sn,c=this.config.defaultAudioCodec||a.audioCodec;this.audioCodecSwap&&(g.b.log("swapping playlist audio codec"),void 0===c&&(c=this.lastAudioCodec),c&&(c=-1!==c.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,g.b.log("Parsing "+d+" of ["+n.startSN+" ,"+n.endSN+"],level "+s+", cc "+e.cc);var h=this.demuxer;h||(h=this.demuxer=new l.a(this.hls,"main"));var f=this.media,p=f&&f.seeking,v=!p&&(n.PTSKnown||!n.live),y=n.initSegment?n.initSegment.data:[];h.push(t.payload,y,c,a.videoCodec,e,o,v,void 0)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===T.PARSING){var i=t.tracks,a=void 0,n=void 0;if(i.audio&&this.altAudio&&delete i.audio,n=i.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(g.b.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==n.metadata.channelCount&&-1===s.indexOf("firefox")&&(o="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==n.container&&(o="mp4a.40.2",g.b.log("Android: force audio codec to "+o)),n.levelCodec=o,n.id=t.id}n=i.video,n&&(n.levelCodec=this.levels[this.level].videoCodec,n.id=t.id),this.hls.trigger(u.a.BUFFER_CODECS,i);for(a in i){n=i[a],g.b.log("main track:"+a+",container:"+n.container+",codecs[level/parsed]=["+n.levelCodec+"/"+n.codec+"]");var l=n.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.a.BUFFER_APPENDING,{type:a,data:l,parent:"main",content:"initSegment"}))}this.tick()}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"main"===t.id&&i.sn===r.sn&&i.level===r.level&&("audio"!==t.type||!this.altAudio)&&this.state===T.PARSING){var a=this.levels[this.level],n=r;if(isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),!0===t.hasAudio&&n.addElementaryStream(c.a.ElementaryStreamTypes.AUDIO),!0===t.hasVideo&&n.addElementaryStream(c.a.ElementaryStreamTypes.VIDEO),g.b.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(n.dropped=t.dropped,n.dropped)if(n.backtracked)g.b.warn("Already backtracked on this fragment, appending with the gap",n.sn);else{var o=a.details;if(!o||n.sn!==o.startSN)return g.b.warn("missing video frame(s), backtracking fragment",n.sn),this.fragmentTracker.removeFragment(n),n.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=T.IDLE,this.fragPrevious=n,void this.tick();g.b.warn("missing video frame(s) on first frag, appending with gap",n.sn)}else n.backtracked=!1;var s=f.c(a.details,n,t.startPTS,t.endPTS,t.startDTS,t.endDTS),l=this.hls;l.trigger(u.a.LEVEL_PTS_UPDATED,{details:a.details,level:this.level,drift:s,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(r){r&&r.length&&e.state===T.PARSING&&(e.appended=!0,e.pendingBuffering=!0,l.trigger(u.a.BUFFER_APPENDING,{type:t.type,data:r,parent:"main",content:"data"}))}),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===T.PARSING&&(this.stats.tparsed=window.performance.now(),this.state=T.PARSED,this._checkAppendedParsed())},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url,r=t.id;if(!e){if(this.mediaBuffer!==this.media){g.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(g.b.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=T.IDLE}var a=this.hls;a.trigger(u.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),a.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:r}),this.altAudio=!1}},e.prototype.onAudioTrackSwitched=function(t){var e=t.id,r=!!this.hls.audioTracks[e].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(g.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},e.prototype.onBufferCreated=function(t){var e=t.tracks,r=void 0,i=void 0,a=!1;for(var n in e){var o=e[n];"main"===o.id?(i=n,r=o,"video"===n&&(this.videoBuffer=e[n].buffer)):a=!0}a&&r?(g.b.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},e.prototype.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;e!==T.PARSING&&e!==T.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==T.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var e=this.mediaBuffer?this.mediaBuffer:this.media;g.b.log("main buffered : "+p.a.toString(e.buffered)),this.fragPrevious=t;var r=this.stats;r.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),this.hls.trigger(u.a.FRAG_BUFFERED,{stats:r,frag:t,id:"main"}),this.state=T.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var r=!!this.media&&s.a.isBuffered(this.media,this.media.currentTime)&&s.a.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case v.a.FRAG_LOAD_ERROR:case v.a.FRAG_LOAD_TIMEOUT:case v.a.KEY_LOAD_ERROR:case v.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);g.b.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=window.performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=T.FRAG_LOADING_WAITING_RETRY}else g.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=T.ERROR;break;case v.a.LEVEL_LOAD_ERROR:case v.a.LEVEL_LOAD_TIMEOUT:this.state!==T.ERROR&&(t.fatal?(this.state=T.ERROR,g.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==T.WAITING_LEVEL||(this.state=T.IDLE));break;case v.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==T.PARSING&&this.state!==T.PARSED||(r?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=T.IDLE):(g.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},e.prototype._reduceMaxBufferLength=function(t){var e=this.config;return e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,g.b.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},e.prototype._checkBuffer=function(){var t=this.config,e=this.media;if(e&&0!==e.readyState){var r=e.currentTime,i=this.mediaBuffer?this.mediaBuffer:e,a=i.buffered;if(!this.loadedmetadata&&a.length)this.loadedmetadata=!0,this._seekToStartPos();else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var n=!(e.paused&&e.readyState>1||e.ended||0===e.buffered.length),o=window.performance.now();if(r!==this.lastCurrentTime)this.stallReported&&(g.b.warn("playback not stuck anymore @"+r+", after "+Math.round(o-this.stalled)+"ms"),this.stallReported=!1),this.stalled=null,this.nudgeRetry=0;else if(n){var l=o-this.stalled,u=s.a.bufferInfo(e,r,t.maxBufferHole);if(!this.stalled)return void(this.stalled=o);l>=1e3&&this._reportStall(u.len),this._tryFixBufferStall(u,l)}}}},e.prototype.onFragLoadEmergencyAborted=function(){this.state=T.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},e.prototype.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;t&&this.fragmentTracker.detectEvictedFragments(c.a.ElementaryStreamTypes.VIDEO,t.buffered),this.state=T.IDLE,this.fragPrevious=null},e.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},e.prototype.computeLivePosition=function(t,e){var r=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*e.targetduration;return t+Math.max(0,e.totalduration-r)},e.prototype._tryFixBufferStall=function(t,e){var r=this.config,i=this.media,a=i.currentTime,n=this.fragmentTracker.getPartialFragment(a);n&&this._trySkipBufferHole(n),t.len>.5&&e>1e3*r.highBufferWatchdogPeriod&&(this.stalled=null,this._tryNudgeBuffer())},e.prototype._reportStall=function(t){var e=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,g.b.warn("Playback stalling at @"+r.currentTime+" due to low buffer"),e.trigger(u.a.ERROR,{type:v.b.MEDIA_ERROR,details:v.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e.prototype._trySkipBufferHole=function(t){for(var e=this.hls,r=this.media,i=r.currentTime,a=0,n=0;n=a&&i"+t),this.hls.trigger(u.a.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(m.a);e.a=S},function(t,e,r){function i(t){function e(i){if(r[i])return r[i].exports;var a=r[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var r={};e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e.oe=function(t){throw console.error(t),t};var i=e(e.s=ENTRY_MODULE);return i.default||i}function a(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function n(t,e,i){var n={};n[i]=[];var o=e.toString(),s=o.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return n;for(var d,c=s[1],h=new RegExp("(\\\\n|\\W)"+a(c)+u,"g");d=h.exec(o);)"dll-reference"!==d[3]&&n[i].push(d[3]);for(h=new RegExp("\\("+a(c)+'\\("(dll-reference\\s('+l+'))"\\)\\)'+u,"g");d=h.exec(o);)t[d[2]]||(n[i].push(d[1]),t[d[2]]=r(d[1]).m),n[d[2]]=n[d[2]]||[],n[d[2]].push(d[4]);return n}function o(t){return Object.keys(t).reduce(function(e,r){return e||t[r].length>0},!1)}function s(t,e){for(var r={main:[e]},i={main:[]},a={main:{}};o(r);)for(var s=Object.keys(r),l=0;l>>8^255&g^99,t[f]=g,e[g]=f;var y=h[f],m=h[y],b=h[m],E=257*h[g]^16843008*g;i[f]=E<<24|E>>>8,a[f]=E<<16|E>>>16,n[f]=E<<8|E>>>24,o[f]=E,E=16843009*b^65537*m^257*y^16843008*f,l[g]=E<<24|E>>>8,u[g]=E<<16|E>>>16,d[g]=E<<8|E>>>24,c[g]=E,f?(f=y^h[h[h[b^y]]],p^=h[h[p]]):f=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i>4>1){if((h=n+5+e[n+4])===n+188)continue}else h=n+4;switch(c){case b:l&&(R&&(f=D(R))&&void 0!==f.pts&&I(f,!1),R={data:[],size:0}),R&&(R.data.push(e.subarray(h,n+188)),R.size+=n+188-h);break;case E:l&&(A&&(f=D(A))&&void 0!==f.pts&&(y.isAAC?k(f):O(f)),A={data:[],size:0}),A&&(A.data.push(e.subarray(h,n+188)),A.size+=n+188-h);break;case T:l&&(_&&(f=D(_))&&void 0!==f.pts&&C(f),_={data:[],size:0}),_&&(_.data.push(e.subarray(h,n+188)),_.size+=n+188-h);break;case 0:l&&(h+=e[h]+1),S=this._pmtId=w(e,h);break;case S:l&&(h+=e[h]+1);var x=L(e,h,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);b=x.avc,b>0&&(g.pid=b),E=x.audio,E>0&&(y.pid=E,y.isAAC=x.isAAC),T=x.id3,T>0&&(m.pid=T),p&&!v&&(u.b.log("reparse from beginning"),p=!1,n=P-188),v=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(o.a.ERROR,{type:d.b.MEDIA_ERROR,details:d.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});R&&(f=D(R))&&void 0!==f.pts?(I(f,!0),g.pesData=null):g.pesData=R,A&&(f=D(A))&&void 0!==f.pts?(y.isAAC?k(f):O(f),y.pesData=null):(A&&A.size&&u.b.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=A),_&&(f=D(_))&&void 0!==f.pts?(C(f),m.pesData=null):m.pesData=_,null==this.sampleAes?this.remuxer.remux(y,g,m,this._txtTrack,r,i,a):this.decryptAndRemux(y,g,m,this._txtTrack,r,i,a)},t.prototype.decryptAndRemux=function(t,e,r,i,a,n,o){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){s.decryptAndRemuxAvc(t,e,r,i,a,n,o)})}else this.decryptAndRemuxAvc(t,e,r,i,a,n,o)},t.prototype.decryptAndRemuxAvc=function(t,e,r,i,a,n,o){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){s.remuxer.remux(t,e,r,i,a,n,o)})}else this.remuxer.remux(t,e,r,i,a,n,o)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,r,i){var a=void 0,n=void 0,o=void 0,s=void 0,l={audio:-1,avc:-1,id3:-1,isAAC:!0};for(a=(15&t[e+1])<<8|t[e+2],n=e+3+a-4,o=(15&t[e+10])<<8|t[e+11],e+=12+o;e1;){var h=new Uint8Array(c[0].length+c[1].length);h.set(c[0]),h.set(c[1],c[0].length),c[0]=h,c.splice(1,1)}if(r=c[0],1===(r[0]<<16)+(r[1]<<8)+r[2]){if((a=(r[4]<<8)+r[5])&&a>t.size-6)return null;i=r[7],192&i&&(s=536870912*(14&r[9])+4194304*(255&r[10])+16384*(254&r[11])+128*(255&r[12])+(254&r[13])/2,s>4294967295&&(s-=8589934592),64&i?(l=536870912*(14&r[14])+4194304*(255&r[15])+16384*(254&r[16])+128*(255&r[17])+(254&r[18])/2,l>4294967295&&(l-=8589934592),s-l>54e5&&(u.b.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),n=r[8],d=n+9,t.size-=d,o=new Uint8Array(t.size);for(var f=0,p=c.length;fv){d-=v;continue}r=r.subarray(d),v-=d,d=0}o.set(r,e),e+=v}return a&&(a-=n+3),{data:o,pts:s,dts:l,len:a}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var r=e.samples,i=r.length;!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(i||this.contiguous)?(t.id=i,r.push(t)):e.dropped++}t.debug.length&&u.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var r=this,i=this._avcTrack,a=this._parseAVCNALu(t.data),n=void 0,o=this.avcSample,l=void 0,u=!1,d=void 0,c=this.pushAccesUnit.bind(this),h=function(t,e,r,i){return{key:t,pts:e,dts:r,units:[],debug:i}};t.data=null,o&&a.length&&!i.audFound&&(c(o,i),o=this.avcSample=h(!1,t.pts,t.dts,"")),a.forEach(function(e){switch(e.type){case 1:l=!0,o||(o=r.avcSample=h(!0,t.pts,t.dts,"")),o.frame=!0;var a=e.data;if(u&&a.length>4){var f=new s.a(a).readSliceType();2!==f&&4!==f&&7!==f&&9!==f||(o.key=!0)}break;case 5:l=!0,o||(o=r.avcSample=h(!0,t.pts,t.dts,"")),o.key=!0,o.frame=!0;break;case 6:l=!0,n=new s.a(r.discardEPB(e.data)),n.readUByte();for(var p=0,v=0,g=!1,y=0;!g&&n.bytesAvailable>1;){p=0;do{y=n.readUByte(),p+=y}while(255===y);v=0;do{y=n.readUByte(),v+=y}while(255===y);if(4===p&&0!==n.bytesAvailable){g=!0;if(181===n.readUByte()){if(49===n.readUShort()){if(1195456820===n.readUInt()){if(3===n.readUByte()){var m=n.readUByte(),b=n.readUByte(),E=31&m,T=[m,b];for(d=0;d0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts=0)u={data:t.subarray(c,e-o-1),type:h},l.push(u);else{var f=this._getLastNalUnit();if(f&&(s&&e<=4-s&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-s)),(a=e-o-1)>0)){var p=new Uint8Array(f.data.byteLength+a);p.set(f.data,0),p.set(t.subarray(0,a),f.data.byteLength),f.data=p}}e=0&&o>=0&&(u={data:t.subarray(c,r),type:h,state:o},l.push(u)),0===l.length){var v=this._getLastNalUnit();if(v){var g=new Uint8Array(v.data.byteLength+t.byteLength);g.set(v.data,0),g.set(t,v.data.byteLength),v.data=g}}return n.naluState=o,l},t.prototype.discardEPB=function(t){for(var e=t.byteLength,r=[],i=1,a=void 0,n=void 0;i1&&(u.b.log("AAC: align PTS for overlapping frames by "+Math.round((m-i)/90)),i=m)}for(;ht?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&a.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0&&this.bitsAvailable?r<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e=8,r=8,i=void 0,a=void 0;for(i=0;i=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,a=32;a<=t.length-16;a+=160,i+=16)r.set(t.subarray(a,a+16),i);return r},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var r=0,i=32;i<=t.length-16;i+=160,r+=16)t.set(e.subarray(r,r+16),i);return t},t.prototype.decryptAvcSample=function(t,e,r,i,a,n){var o=this.discardEPB(a.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){a.data=l.getAvcDecryptedUnit(o,s),n||l.decryptAvcSamples(t,e,r+1,i)})},t.prototype.decryptAvcSamples=function(t,e,r,i){for(;;e++,r=0){if(e>=t.length)return void i();for(var a=t[e].units;!(r>=a.length);r++){var n=a[r];if(!(n.length<=48||1!==n.type&&5!==n.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,n,o),!o)return}}}},t}();e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(7),n=r(0),o=r(23),s=function(){function t(e,r,a){i(this,t),this.observer=e,this.config=a,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){var e=void 0,r=void 0,i=a.a.getID3Data(t,0);if(i&&void 0!==a.a.getTimeStamp(i))for(e=i.length,r=Math.min(t.length-1,e+100);e-1&&o&&!o.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,r,i,a,n,s){if(this.ISGenerated||this.generateIS(t,e,a),this.ISGenerated){var u=t.samples.length,d=e.samples.length,c=a,h=a;if(u&&d){var f=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;c+=Math.max(0,f),h+=Math.max(0,-f)}if(u){t.timescale||(l.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,a));var p=this.remuxAudio(t,c,n,s);if(d){var v=void 0;p&&(v=p.endPTS-p.startPTS),e.timescale||(l.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,a)),this.remuxVideo(e,h,n,v,s)}}else if(d){var g=this.remuxVideo(e,h,n,0,s);g&&t.codec&&this.remuxEmptyAudio(t,c,n,g)}}r.samples.length&&this.remuxID3(r,a),i.samples.length&&this.remuxText(i,a),this.observer.trigger(o.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,r){var i=this.observer,a=t.samples,u=e.samples,d=this.typeSupported,c="audio/mp4",h={},f={tracks:h},p=void 0===this._initPTS,v=void 0,g=void 0;if(p&&(v=g=1/0),t.config&&a.length&&(t.timescale=t.samplerate,l.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(d.mpeg?(c="audio/mpeg",t.codec=""):d.mp3&&(t.codec="mp3")),h.audio={container:c,codec:t.codec,initSegment:!t.isAAC&&d.mpeg?new Uint8Array:n.a.initSegment([t]),metadata:{channelCount:t.channelCount}},p&&(v=g=a[0].pts-t.inputTimeScale*r)),e.sps&&e.pps&&u.length){var y=e.inputTimeScale;e.timescale=y,h.video={container:"video/mp4",codec:e.codec,initSegment:n.a.initSegment([e]),metadata:{width:e.width,height:e.height}},p&&(v=Math.min(v,u[0].pts-y*r),g=Math.min(g,u[0].dts-y*r),this.observer.trigger(o.a.INIT_PTS_FOUND,{initPTS:v}))}Object.keys(h).length?(i.trigger(o.a.FRAG_PARSING_INIT_SEGMENT,f),this.ISGenerated=!0,p&&(this._initPTS=v,this._initDTS=g)):i.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,r,i,a){var u=8,d=t.timescale,c=void 0,h=void 0,f=void 0,p=void 0,v=void 0,g=void 0,y=void 0,m=t.samples,b=[],E=m.length,T=this._PTSNormalize,S=this._initDTS,R=this.nextAvcDts,A=this.isSafari;if(0!==E){A&&(r|=m.length&&R&&(a&&Math.abs(e-R/d)<.1||Math.abs(m[0].pts-R-S)1?l.b.log("AVC:"+D+" ms hole between fragments detected,filling it"):D<-1&&l.b.log("AVC:"+-D+" ms overlapping between fragments detected"),v=R,m[0].dts=v,p=Math.max(p-D,R),m[0].pts=p,l.b.log("Video/PTS/DTS adjusted: "+Math.round(p/90)+"/"+Math.round(v/90)+",delta:"+D+" ms")),v,L=m[m.length-1],y=Math.max(L.dts,0),g=Math.max(L.pts,0,y),A&&(c=Math.round((y-v)/(m.length-1)));for(var I=0,k=0,O=0;O0?B-1:B].dts;if(z.stretchShortVideoTrack){var $=z.maxBufferHole,J=Math.floor($*d),Z=(i?p+i*d:this.nextAudioPts)-G.pts;Z>J?(c=Z-Q,c<0&&(c=Q),l.b.log("It is approximately "+Z/90+" ms to the next segment; using duration "+c/90+" ms for the last video frame.")):c=Q}else c=Q}H=Math.round(G.pts-G.dts)}b.push({size:j,duration:c,cts:H,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:G.key?2:1,isNonSync:G.key?0:1}})}this.nextAvcDts=y+c;var tt=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var et=b[0].flags;et.dependsOn=2,et.isNonSync=0}t.samples=b,f=n.a.moof(t.sequenceNumber++,v,t),t.samples=[];var rt={data1:f,data2:h,startPTS:p/d,endPTS:(g+c)/d,startDTS:v/d,endDTS:this.nextAvcDts/d,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:tt};return this.observer.trigger(o.a.FRAG_PARSING_DATA,rt),rt}},t.prototype.remuxAudio=function(t,e,r,i){var u=t.inputTimeScale,d=t.timescale,c=u/d,h=t.isAAC?1024:1152,f=h*c,p=this._PTSNormalize,v=this._initDTS,g=!t.isAAC&&this.typeSupported.mpeg,y=void 0,m=void 0,b=void 0,E=void 0,T=void 0,S=void 0,R=void 0,A=t.samples,_=[],w=this.nextAudioPts;if(r|=A.length&&w&&(i&&Math.abs(e-w/u)<.1||Math.abs(A[0].pts-w-v)<20*f),A.forEach(function(t){t.pts=t.dts=p(t.pts-v,e*u)}),A=A.filter(function(t){return t.pts>=0}),0!==A.length){if(r||(w=i?e*u:A[0].pts),t.isAAC)for(var L=this.config.maxAudioFramesDrift,D=0,I=w;D=L*f&&P<1e4&&I){var x=Math.round(k/f);l.b.warn("Injecting "+x+" audio frame @ "+(I/u).toFixed(3)+"s due to "+Math.round(1e3*k/u)+" ms gap.");for(var F=0;F0&&j<1e4)H=Math.round((K-w)/f),l.b.log(j+" ms hole between AAC samples detected,filling it"),H>0&&(b=a.a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),b||(b=G.subarray()),t.len+=H*b.length);else if(j<-12){l.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(w/u).toFixed(3)+"s/"+(K/u).toFixed(3)+"s/"+-j+"ms"),t.len-=G.byteLength;continue}K=w}if(S=K,!(t.len>0))return;var V=g?t.len:t.len+8;y=g?0:8;try{E=new Uint8Array(V)}catch(t){return void this.observer.trigger(o.a.ERROR,{type:s.b.MUX_ERROR,details:s.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:V,reason:"fail allocating audio mdat "+V})}if(!g){new DataView(E.buffer).setUint32(0,V),E.set(n.a.types.mdat,4)}for(var Y=0;Y=2&&(q=_[X-2].duration,m.duration=q),X){this.nextAudioPts=w=R+c*q,t.len=0,t.samples=_,T=g?new Uint8Array:n.a.moof(t.sequenceNumber++,S/c,t),t.samples=[];var z=S/u,Q=w/u,$={data1:T,data2:E,startPTS:z,endPTS:Q,startDTS:z,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:X};return this.observer.trigger(o.a.FRAG_PARSING_DATA,$),$}return null}},t.prototype.remuxEmptyAudio=function(t,e,r,i){var n=t.inputTimeScale,o=t.samplerate?t.samplerate:n,s=n/o,u=this.nextAudioPts,d=(void 0!==u?u:i.startDTS*n)+this._initDTS,c=i.endDTS*n+this._initDTS,h=1024*s,f=Math.ceil((c-d)/h),p=a.a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(l.b.warn("remux empty Audio"),!p)return void l.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var v=[],g=0;g4294967296;)t+=r;return t},t}();e.a=u},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(){i(this,t)}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=Math.pow(2,32)-1,n=function(){function t(){i(this,t)}return t.init=function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e=void 0;for(e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:r,audio:i};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=n,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,a))},t.box=function(t){for(var e=Array.prototype.slice.call(arguments,1),r=8,i=e.length,a=i,n=void 0;i--;)r+=e[i].byteLength;for(n=new Uint8Array(r),n[0]=r>>24&255,n[1]=r>>16&255,n[2]=r>>8&255,n[3]=255&r,n.set(t,4),i=0,r=8;i>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(a+1)),n=Math.floor(r%(a+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,n>>24,n>>16&255,n>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,o)},t.sdtp=function(e){var r=e.samples||[],i=new Uint8Array(4+r.length),a=void 0,n=void 0;for(n=0;n>>8&255),r.push(255&o),r=r.concat(Array.prototype.slice.call(n));for(a=0;a>>8&255),i.push(255&o),i=i.concat(Array.prototype.slice.call(n));var s=t.box(t.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(i))),l=e.width,u=e.height,d=e.pixelRatio[0],c=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,c>>24,c>>16&255,c>>8&255,255&c])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,n=e.width,o=e.height,s=Math.floor(i/(a+1)),l=Math.floor(i%(a+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,255&n,0,0,o>>8&255,255&o,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),n=e.id,o=Math.floor(r/(a+1)),s=Math.floor(r%(a+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i=e.samples||[],a=i.length,n=12+16*a,o=new Uint8Array(n),s=void 0,l=void 0,u=void 0,d=void 0,c=void 0,h=void 0;for(r+=8+n,o.set([0,0,15,1,a>>>24&255,a>>>16&255,a>>>8&255,255&a,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),s=0;s>>24&255,u>>>16&255,u>>>8&255,255&u,d>>>24&255,d>>>16&255,d>>>8&255,255&d,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.paddingValue<<1|c.isNonSync,61440&c.degradPrio,15&c.degradPrio,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*s);return t.box(t.types.trun,o)},t.initSegment=function(e){t.types||t.init();var r=t.moov(e),i=void 0;return i=new Uint8Array(t.FTYP.byteLength+r.byteLength),i.set(t.FTYP),i.set(r,t.FTYP.byteLength),i},t}();e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(1),n=function(){function t(e){i(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,r,i,n,o,s,l){var u=this.observer,d="";t&&(d+="audio"),e&&(d+="video"),u.trigger(a.a.FRAG_PARSING_DATA,{data1:l,startPTS:n,startDTS:n,type:d,hasAudio:!!t,hasVideo:!!e,nb:1,dropped:0}),u.trigger(a.a.FRAG_PARSED)},t}();e.a=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(21),a=r(1),n=r(0),o=r(12),s=r.n(o),l=function(t){var e=new s.a;e.trigger=function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a1?r-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments[2],i=0;if(r.programDateTime){var a=Date.parse(r.programDateTime);isNaN(a)||(i=1e3*e+a-1e3*t)}return i}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Array.isArray(t)||!t.length||null===e)return null;if(e=t[t.length-1].endPdt)return null;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=void 0,l=t?e[t.sn-e[0].sn+1]:null;return ri-a&&(a=0),n=l&&!o(r,a,l)?l:s.a.search(e,o.bind(null,r,a))),n}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments[2],i=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=t?1:r.start-i>t&&r.start?-1:0}e.a=i,e.b=a,e.c=n,e.d=o;var s=r(6)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(0),u=r(2),d=r(19),c=r(15),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=function(){function t(t,e){for(var r=0;r0){r=e[0].bitrate,e.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=e;for(var p=0;p0&&n})}else this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},e.prototype.setLevelInternal=function(t){var e=this._levels,r=this.hls;if(t>=0&&t1&&s.loadError0){var e=this.currentLevelIndex,r=t.urlId,i=t.url[r];l.b.log("Attempt loading level index "+e+" with URL-id "+r),this.hls.trigger(o.a.LEVEL_LOADING,{url:i,level:e,id:r})}}},f(e,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}]),e}(s.a);e.a=g},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(7),u=r(26),d=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.MEDIA_DETACHING,o.a.FRAG_PARSING_METADATA));return n.id3Track=void 0,n.media=void 0,n}return n(e,t),e.prototype.destroy=function(){s.a.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){this.media=t.media,this.media},e.prototype.onMediaDetaching=function(){Object(u.a)(this.id3Track),this.id3Track=void 0,this.media=void 0},e.prototype.getID3Track=function(t){for(var e=0;e500*r.duration/u){var c=t.levels,h=Math.max(1,n.bw?n.bw/8:1e3*n.loaded/s),f=c[r.level],v=f.realBitrate?Math.max(f.realBitrate,f.bitrate):f.bitrate,g=n.total?n.total:Math.max(n.loaded,Math.round(r.duration*v/8)),y=e.currentTime,m=(g-n.loaded)/h,b=(l.a.bufferInfo(e,y,t.config.maxBufferHole).end-y)/u;if(b<2*r.duration/u&&m>b){var E=void 0,T=void 0;for(T=r.level-1;T>a;T--){var S=c[T].realBitrate?Math.max(c[T].realBitrate,c[T].bitrate):c[T].bitrate;if((E=r.duration*S/(6.4*h))=i;u--){var c=l[u],h=c.details,f=h?h.totalduration/h.fragments.length:e,p=!!h&&h.live,v=void 0;v=u<=t?o*r:s*r;var g=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,y=g*f/v;if(d.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(v)+"/"+g+"/"+f+"/"+n+"/"+y),v>g&&(!y||p&&!this.bitrateTestDelay||y=0)return p;d.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var v=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,y=i.abrBandWidthUpFactor;if(0===f){var m=this.bitrateTestDelay;if(m){v=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-m,d.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*v)+" ms"),g=y=1}}return p=this._findBestLevel(o,s,h,a,e,f+v,g,y,r),Math.max(p,0)}}]),e}(s.a);e.a=v},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(55),n=function(){function t(e,r,n,o){i(this,t),this.hls=e,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new a.a(r),this.fast_=new a.a(n)}return t.prototype.sample=function(t,e){t=Math.max(t,this.minDelayMs_);var r=8e3*e/t,i=t/1e3;this.fast_.sample(i,r),this.slow_.sample(i,r)},t.prototype.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},t.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.prototype.destroy=function(){},t}();e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(e){i(this,t),this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return t.prototype.sample=function(t,e){var r=Math.pow(this.alpha_,t);this.estimate_=e*(1-r)+r*this.estimate_,this.totalWeight_+=t},t.prototype.getTotalWeight=function(){return this.totalWeight_},t.prototype.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(0),u=r(2),d=r(14),c=Object(d.a)(),h=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.MEDIA_ATTACHING,o.a.MEDIA_DETACHING,o.a.MANIFEST_PARSED,o.a.BUFFER_RESET,o.a.BUFFER_APPENDING,o.a.BUFFER_CODECS,o.a.BUFFER_EOS,o.a.BUFFER_FLUSHING,o.a.LEVEL_PTS_UPDATED,o.a.LEVEL_UPDATED));return n._msDuration=null,n._levelDuration=null,n._live=null,n._objectUrl=null,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n.tracks={},n}return n(e,t),e.prototype.destroy=function(){s.a.prototype.destroy.call(this)},e.prototype.onLevelPtsUpdated=function(t){var e=t.type,r=this.tracks.audio;if("audio"===e&&r&&"audio/mpeg"===r.container){var i=this.sourceBuffer.audio;if(Math.abs(i.timestampOffset-t.start)>.1){var a=i.updating;try{i.abort()}catch(t){a=!0,l.b.warn("can not abort audio buffer: "+t)}a?this.audioTimestampOffset=t.start:(l.b.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+t.start),i.timestampOffset=t.start)}}},e.prototype.onManifestParsed=function(t){var e=t.audio,r=t.video||t.levels.length&&t.altAudio,i=0;t.altAudio&&(e||r)&&(i=(e?1:0)+(r?1:0),l.b.log(i+" sourceBuffer(s) expected")),this.sourceBufferNb=i},e.prototype.onMediaAttaching=function(t){var e=this.media=t.media;if(e){var r=this.mediaSource=new c;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),e.src=window.URL.createObjectURL(r),this._objectUrl=e.src}},e.prototype.onMediaDetaching=function(){l.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){l.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):l.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(o.a.MEDIA_DETACHED)},e.prototype.onMediaSourceOpen=function(){l.b.log("media source opened"),this.hls.trigger(o.a.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},e.prototype.checkPendingTracks=function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},e.prototype.onMediaSourceClose=function(){l.b.log("media source closed")},e.prototype.onMediaSourceEnded=function(){l.b.log("media source ended")},e.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var t=this.sourceBuffer.audio;l.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+this.audioTimestampOffset),t.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var e=this.parent,r=this.segments.reduce(function(t,r){return r.parent===e?t+1:t},0),i={},a=this.sourceBuffer;for(var n in a)i[n]=a[n].buffered;this.hls.trigger(o.a.BUFFER_APPENDED,{parent:e,pending:r,timeRanges:i}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()},e.prototype.onSBUpdateError=function(t){l.b.error("sourceBuffer error:",t),this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferReset=function(){var t=this.sourceBuffer;for(var e in t){var r=t[e];try{this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this.onsbue),r.removeEventListener("error",this.onsbe)}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},e.prototype.onBufferCodecs=function(t){if(0===Object.keys(this.sourceBuffer).length){for(var e in t)this.pendingTracks[e]=t[e];var r=this.mediaSource;r&&"open"===r.readyState&&this.checkPendingTracks()}},e.prototype.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;for(var i in t)if(!e[i]){var a=t[i],n=a.levelCodec||a.codec,s=a.container+";codecs="+n;l.b.log("creating sourceBuffer("+s+")");try{var d=e[i]=r.addSourceBuffer(s);d.addEventListener("updateend",this.onsbue),d.addEventListener("error",this.onsbe),this.tracks[i]={codec:n,container:a.container},a.buffer=d}catch(t){l.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:s})}}this.hls.trigger(o.a.BUFFER_CREATED,{tracks:t})},e.prototype.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},e.prototype.onBufferAppendFail=function(t){l.b.error("sourceBuffer error:",t.event),this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferEos=function(t){var e=this.sourceBuffer,r=t.type;for(var i in e)r&&i!==r||e[i].ended||(e[i].ended=!0,l.b.log(i+" sourceBuffer now EOS"));this.checkEos()},e.prototype.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(!e||"open"!==e.readyState)return void(this._needsEos=!1);for(var r in t){var i=t[r];if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}l.b.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){l.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},e.prototype.onBufferFlushing=function(t){this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush()},e.prototype.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._live=e.live,this.updateMediaElementDuration())},e.prototype.updateMediaElementDuration=function(){var t=this.hls.config,e=void 0;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var r in this.sourceBuffer)if(!0===this.sourceBuffer[r].updating)return;e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(l.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||e===1/0||isNaN(e))&&(l.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},e.prototype.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,r=this.sourceBuffer;try{for(var i in r)e+=r[i].buffered.length}catch(t){l.b.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(o.a.BUFFER_FLUSHED)}},e.prototype.doAppending=function(){var t=this.hls,e=this.sourceBuffer,r=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void l.b.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(r&&r.length){var i=r.shift();try{var a=i.type,n=e[a];n?n.updating?r.unshift(i):(n.ended=!1,this.parent=i.parent,n.appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){l.b.error("error while trying to append buffer:"+e.message),r.unshift(i);var s={type:u.b.MEDIA_ERROR,parent:i.parent};22!==e.code?(this.appendError?this.appendError++:this.appendError=1,s.details=u.a.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry?(l.b.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),r=[],s.fatal=!0,t.trigger(o.a.ERROR,s)):(s.fatal=!1,t.trigger(o.a.ERROR,s))):(this.segments=[],s.details=u.a.BUFFER_FULL_ERROR,s.fatal=!1,t.trigger(o.a.ERROR,s))}}}},e.prototype.flushBuffer=function(t,e,r){var i=void 0,a=void 0,n=void 0,o=void 0,s=void 0,u=void 0,d=this.sourceBuffer;if(Object.keys(d).length){if(l.b.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+t+"/"+e),this.flushBufferCounter.5)return this.flushBufferCounter++,l.b.log("flush "+c+" ["+s+","+u+"], of ["+n+","+o+"], pos:"+this.media.currentTime),i.remove(s,u),!1}catch(t){l.b.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else l.b.warn("abort flushing too many retries");l.b.log("buffer flushed")}return!0},e}(s.a);e.a=h},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=function(){function t(t,e){for(var r=0;rthis.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},e.prototype.getMaxLevel=function(t){var r=this;if(!this.levels)return-1;var i=this.levels.filter(function(i,a){return e.isLevelAllowed(a,r.restrictedLevels)&&a<=t});return e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},e.prototype._startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},e.prototype._stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},e.isLevelAllowed=function(t){return-1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).indexOf(t)},e.getMaxLevelByMediaSize=function(t,e,r){if(!t||t&&!t.length)return-1;for(var i=t.length-1,a=0;a=e||n.height>=r)&&function(t,e){return!e||(t.width!==e.width||t.height!==e.height)}(n,t[a+1])){i=a;break}}return i},l(e,[{key:"mediaWidth",get:function(){var t=void 0,r=this.media;return r&&(t=r.width||r.clientWidth||r.offsetWidth,t*=e.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0,r=this.media;return r&&(t=r.height||r.clientHeight||r.offsetHeight,t*=e.contentScaleFactor),t}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}}]),e}(s.a);e.a=u},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(3),l=r(0),u=window,d=u.performance,c=function(t){function e(r){return i(this,e),a(this,t.call(this,r,o.a.MEDIA_ATTACHING))}return n(e,t),e.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},e.prototype.onMediaAttaching=function(t){var e=this.hls.config;if(e.capLevelOnFPSDrop){"function"==typeof(this.video=t.media instanceof window.HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod)}},e.prototype.checkFPS=function(t,e,r){var i=d.now();if(e){if(this.lastTime){var a=i-this.lastTime,n=r-this.lastDroppedFrames,s=e-this.lastDecodedFrames,u=1e3*n/a,c=this.hls;if(c.trigger(o.a.FPS_DROP,{currentDropped:n,currentDecoded:s,totalDroppedFrames:r}),u>0&&n>c.config.fpsDroppedMonitoringThreshold*s){var h=c.currentLevel;l.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===c.autoLevelCapping||c.autoLevelCapping>=h)&&(h-=1,c.trigger(o.a.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:c.currentLevel}),c.autoLevelCapping=h,c.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.prototype.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},e}(s.a);e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=r(0),n=window,o=n.performance,s=n.XMLHttpRequest,l=function(){function t(e){i(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return t.prototype.destroy=function(){this.abort(),this.loader=null},t.prototype.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.prototype.load=function(t,e,r){this.context=t,this.config=e,this.callbacks=r,this.stats={trequest:o.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()},t.prototype.loadInternal=function(){var t=void 0,e=this.context;t=this.loader=new s;var r=this.stats;r.tfirst=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(t,e.url)}catch(r){t.open("GET",e.url,!0),i(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(r){return void this.callbacks.onError({code:t.status,text:r.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},t.prototype.readystatechange=function(t){var e=t.currentTarget,r=e.readyState,i=this.stats,n=this.context,s=this.config;if(!i.aborted&&r>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(o.now(),i.trequest)),4===r){var l=e.status;if(l>=200&&l<300){i.tload=Math.max(i.tfirst,o.now());var u=void 0,d=void 0;"arraybuffer"===n.responseType?(u=e.response,d=u.byteLength):(u=e.responseText,d=u.length),i.loaded=i.total=d;var c={url:e.responseURL,data:u};this.callbacks.onSuccess(c,i,n,e)}else i.retry>=s.maxRetry||l>=400&&l<499?(a.b.error(l+" while loading "+n.url),this.callbacks.onError({code:l,text:e.statusText},n,e)):(a.b.warn(l+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.timeout)},t.prototype.loadtimeout=function(){a.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.prototype.loadprogress=function(t){var e=t.currentTarget,r=this.stats;r.loaded=t.loaded,t.lengthComputable&&(r.total=t.total);var i=this.callbacks.onProgress;i&&i(r,this.context,null,e)},t}();e.a=l},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(8),l=r(0),u=r(2),d=function(){function t(t,e){for(var r=0;r=this.tracks.length)return void l.b.warn("Invalid audio track id:",t.id);if(l.b.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.hasInterval()){var e=1e3*t.details.targetduration;this.setInterval(e)}!t.details.live&&this.hasInterval()&&this.clearInterval()},e.prototype.onAudioTrackSwitched=function(t){var e=this.tracks[t.id].groupId;e&&this.audioGroupId!==e&&(this.audioGroupId=e)},e.prototype.onLevelLoaded=function(t){var e=this.hls.levels[t.level];if(e.audioGroupIds){var r=e.audioGroupIds[e.urlId];this.audioGroupId!==r&&(this.audioGroupId=r,this._selectInitialAudioTrack())}},e.prototype.onError=function(t){t.type===u.b.NETWORK_ERROR&&(t.fatal&&this.clearInterval(),t.details===u.a.AUDIO_TRACK_LOAD_ERROR&&(l.b.warn("Network failure on audio-track id:",t.context.id),this._handleLoadError()))},e.prototype.doTick=function(){this._updateTrack(this.trackId)},e.prototype._selectInitialAudioTrack=function(){var t=this,e=this.tracks;if(e.length){var r=this.tracks[this.trackId],i=null;r&&(i=r.name);var a=e.filter(function(t){return t.default});a.length?e=a:l.b.warn("No default audio tracks defined");var n=!1,s=function(){e.forEach(function(e){n||t.audioGroupId&&e.groupId!==t.audioGroupId||i&&i!==e.name||(t.audioTrack=e.id,n=!0)})};s(),n||(i=null,s()),n||(l.b.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(o.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},e.prototype._needsTrackLoading=function(t){var e=t.details;return!e||(!!e.live||void 0)},e.prototype._loadTrackDetailsIfNeeded=function(t){if(this._needsTrackLoading(t)){var e=t.url,r=t.id;l.b.log("loading audio-track playlist for id: "+r),this.hls.trigger(o.a.AUDIO_TRACK_LOADING,{url:e,id:r})}},e.prototype._updateTrack=function(t){if(!(t<0||t>=this.tracks.length)){this.clearInterval(),this.trackId=t,l.b.log("trying to update audio-track "+t);var e=this.tracks[t];this._loadTrackDetailsIfNeeded(e)}},e.prototype._handleLoadError=function(){this.trackIdBlacklist[this.trackId]=!0;var t=this.trackId,e=this.tracks[t],r=e.name,i=e.language,a=e.groupId;l.b.warn("Loading failed on audio track id: "+t+", group-id: "+a+', name/language: "'+r+'" / "'+i+'"');for(var n=t,o=0;o no-op");if(t<0||t>=this.tracks.length)return void l.b.warn("Invalid id passed to audio-track controller");var e=this.tracks[t];l.b.log("Now switching to audio-track index "+t),this.clearInterval(),this.trackId=t;var r=e.url,i=e.type,a=e.id;this.hls.trigger(o.a.AUDIO_TRACK_SWITCHING,{id:a,type:i,url:r}),this._loadTrackDetailsIfNeeded(e)}}]),e}(s.a);e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(6),s=r(11),l=r(20),u=r(1),d=r(15),c=r(24),h=r(2),f=r(0),p=r(25),v=r(8),g=r(10),y=r(9),m=function(){function t(t,e){for(var r=0;r0&&-1===t?(f.b.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=T.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=T.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=T.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=T.STOPPED},e.prototype.doTick=function(){var t=void 0,e=void 0,r=void 0,i=this.hls,a=i.config;switch(this.state){case T.ERROR:case T.PAUSED:case T.BUFFER_FLUSHING:break;case T.STARTING:this.state=T.WAITING_TRACK,this.loadedmetadata=!1;break;case T.IDLE:var n=this.tracks;if(!n)break;if(!this.media&&(this.startFragRequested||!a.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var l=this.mediaBuffer?this.mediaBuffer:this.media,d=this.videoBuffer?this.videoBuffer:this.media,c=s.a.bufferInfo(l,t,a.maxBufferHole),h=s.a.bufferInfo(d,t,a.maxBufferHole),v=c.len,y=c.end,m=this.fragPrevious,b=Math.min(a.maxBufferLength,a.maxMaxBufferLength),S=Math.max(b,h.len),R=this.audioSwitch,A=this.trackId;if((vL||c.nextStart))return;f.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=L+.05}if(r.initSegment&&!r.initSegment.data)I=r.initSegment;else if(y<=L){if(I=_[0],null!==this.videoTrackCC&&I.cc!==this.videoTrackCC&&(I=Object(p.b)(_,this.videoTrackCC)),r.live&&I.loadIdx&&I.loadIdx===this.fragLoadIdx){var k=c.nextStart?c.nextStart:L;return f.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(k+.05)),void(this.media.currentTime=k+.05)}}else{var O=void 0,C=a.maxFragLookUpTolerance,P=m?_[m.sn-_[0].sn+1]:void 0,x=function(t){var e=Math.min(C,t.duration);return t.start+t.duration-e<=y?1:t.start-e>y&&t.start?-1:0};yD-C&&(C=0),O=P&&!x(P)?P:o.a.search(_,x)):O=_[w-1],O&&(I=O,L=O.start,m&&I.level===m.level&&I.sn===m.sn&&(I.sn=N||M)&&(f.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=T.IDLE);break;case T.WAITING_INIT_PTS:var U=this.videoTrackCC;if(void 0===this.initPTS[U])break;var B=this.waitingFragment;if(B){var G=B.frag.cc;U!==G?(e=this.tracks[this.trackId],e.details&&e.details.live&&(f.b.warn("Waiting fragment CC ("+G+") does not match video track CC ("+U+")"),this.waitingFragment=null,this.state=T.IDLE)):(this.state=T.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=T.IDLE;break;case T.STOPPED:case T.FRAG_LOADING:case T.PARSING:case T.PARSED:case T.ENDED:}},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(f.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){this.state===T.ENDED&&(this.state=T.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),this.tick()},e.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},e.prototype.onAudioTracksUpdated=function(t){f.b.log("audio tracks updated"),this.tracks=t.audioTracks},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.state=T.PAUSED,this.waitingFragment=null,e?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=T.IDLE),this.tick()},e.prototype.onAudioTrackLoaded=function(t){var e=t.details,r=t.id,i=this.tracks[r],a=e.totalduration,n=0;if(f.b.log("track "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+a),e.live){var o=i.details;o&&e.fragments.length>0?(d.b(o,e),n=e.fragments[0].start,e.PTSKnown?f.b.log("live audio playlist sliding:"+n.toFixed(3)):f.b.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,f.b.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(i.details=e,!this.startFragRequested){if(-1===this.startPosition){var s=e.startTimeOffset;isNaN(s)?this.startPosition=0:(f.b.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===T.WAITING_TRACK&&(this.state=T.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===T.KEY_LOADING&&(this.state=T.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===T.FRAG_LOADING&&e&&"audio"===r.type&&r.level===e.level&&r.sn===e.sn){var i=this.tracks[this.trackId],a=i.details,n=a.totalduration,o=e.level,s=e.sn,d=e.cc,c=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",h=this.stats=t.stats;if("initSegment"===s)this.state=T.IDLE,h.tparsed=h.tbuffered=E.now(),a.initSegment.data=t.payload,this.hls.trigger(u.a.FRAG_BUFFERED,{stats:h,frag:e,id:"audio"}),this.tick();else{this.state=T.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new l.a(this.hls,"audio"));var p=this.initPTS[d],v=a.initSegment?a.initSegment.data:[];if(a.initSegment||void 0!==p){this.pendingBuffering=!0,f.b.log("Demuxing "+s+" of ["+a.startSN+" ,"+a.endSN+"],track "+o);this.demuxer.push(t.payload,v,c,null,e,n,!1,p)}else f.b.log("unknown video PTS for continuity counter "+d+", waiting for video PTS before demuxing audio frag "+s+" of ["+a.startSN+" ,"+a.endSN+"],track "+o),this.waitingFragment=t,this.state=T.WAITING_INIT_PTS}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===T.PARSING){var i=t.tracks,a=void 0;if(i.video&&delete i.video,a=i.audio){a.levelCodec=a.codec,a.id=t.id,this.hls.trigger(u.a.BUFFER_CODECS,i),f.b.log("audio track:audio,container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var n=a.initSegment;if(n){var o={type:"audio",data:n,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.a.BUFFER_APPENDING,o))}this.tick()}}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"audio"===t.id&&"audio"===t.type&&i.sn===r.sn&&i.level===r.level&&this.state===T.PARSING){var a=this.trackId,n=this.tracks[a],o=this.hls;isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),r.addElementaryStream(y.a.ElementaryStreamTypes.AUDIO),f.b.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),d.c(n.details,r,t.startPTS,t.endPTS);var s=this.audioSwitch,l=this.media,c=!1;if(s&&l)if(l.readyState){var p=l.currentTime;f.b.log("switching audio track : currentTime:"+p),p>=t.startPTS&&(f.b.log("switching audio track : flushing all audio"),this.state=T.BUFFER_FLUSHING,o.trigger(u.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),c=!0,this.audioSwitch=!1,o.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:a}))}else this.audioSwitch=!1,o.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:a});var v=this.pendingData;if(!v)return f.b.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void o.trigger(u.a.ERROR,{type:h.b.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&v.push({type:t.type,data:e,parent:"audio",content:"data"})}),!c&&v.length&&(v.forEach(function(t){e.state===T.PARSING&&(e.pendingBuffering=!0,e.hls.trigger(u.a.BUFFER_APPENDING,t))}),this.pendingData=[],this.appended=!0)),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===T.PARSING&&(this.stats.tparsed=E.now(),this.state=T.PARSED,this._checkAppendedParsed())},e.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},e.prototype.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},e.prototype.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;e!==T.PARSING&&e!==T.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==T.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,r=this.hls;if(t){this.fragPrevious=t,e.tbuffered=E.now(),r.trigger(u.a.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;f.b.log("audio buffered : "+c.a.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(u.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=T.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case h.a.FRAG_LOAD_ERROR:case h.a.FRAG_LOAD_TIMEOUT:var r=t.frag;if(r&&"audio"!==r.type)break;if(!t.fatal){var i=this.fragLoadError;i?i++:i=1;var a=this.config;if(i<=a.fragLoadingMaxRetry){this.fragLoadError=i;var n=Math.min(Math.pow(2,i-1)*a.fragLoadingRetryDelay,a.fragLoadingMaxRetryTimeout);f.b.warn("AudioStreamController: frag loading failed, retry in "+n+" ms"),this.retryDate=E.now()+n,this.state=T.FRAG_LOADING_WAITING_RETRY}else f.b.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=T.ERROR}break;case h.a.AUDIO_TRACK_LOAD_ERROR:case h.a.AUDIO_TRACK_LOAD_TIMEOUT:case h.a.KEY_LOAD_ERROR:case h.a.KEY_LOAD_TIMEOUT:this.state!==T.ERROR&&(this.state=t.fatal?T.ERROR:T.IDLE,f.b.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case h.a.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===T.PARSING||this.state===T.PARSED)){var o=this.mediaBuffer,l=this.media.currentTime;if(o&&s.a.isBuffered(o,l)&&s.a.isBuffered(o,l+.5)){var d=this.config;d.maxMaxBufferLength>=d.maxBufferLength&&(d.maxMaxBufferLength/=2,f.b.warn("AudioStreamController: reduce max buffer length to "+d.maxMaxBufferLength+"s")),this.state=T.IDLE}else f.b.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=T.BUFFER_FLUSHING,this.hls.trigger(u.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},e.prototype.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(f.b.log("AudioStreamController: appending pending audio data after buffer flushed"),e.forEach(function(e){t.hls.trigger(u.a.BUFFER_APPENDING,e)}),this.appended=!0,this.pendingData=[],this.state=T.PARSED):(this.state=T.IDLE,this.fragPrevious=null,this.tick())},m(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,f.b.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}]),e}(v.a);e.a=S},function(t,e,r){"use strict";function i(t,e,r,i){for(var n=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=window.VTTCue||window.TextTrackCue,c=0;c=16?l--:l++,navigator.userAgent.match(/Firefox\//)?o.line=c+1:o.line=c>7?c-2:c+1,o.align="left",o.position=Math.max(0,Math.min(100,l/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(o)}}Object.defineProperty(e,"__esModule",{value:!0}),e.newCue=i;var a=r(27)},function(t,e,r){"use strict";e.a=function(){function t(t){return"string"==typeof t&&(!!n[t.toLowerCase()]&&t.toLowerCase())}function e(t){return"string"==typeof t&&(!!o[t.toLowerCase()]&&t.toLowerCase())}function r(t){for(var e=1;e100)throw new Error("Position must be between 0 and 100.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",r({},u,{get:function(){return T},set:function(t){var r=e(t);if(!r)throw new SyntaxError("An invalid or illegal string was specified.");T=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",r({},u,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",r({},u,{get:function(){return R},set:function(t){var r=e(t);if(!r)throw new SyntaxError("An invalid or illegal string was specified.");R=r,this.hasBeenReset=!0}})),s.displayState=void 0,l)return s}if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var a="auto",n={"":!0,lr:!0,rl:!0},o={start:!0,middle:!0,end:!0,left:!0,right:!0};return i.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},i}()},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function s(t,e,r,i){return Math.min(e,i)-Math.max(t,r)}var l=r(1),u=r(3),d=r(65),c=r(66),h=r(67),f=r(0),p=r(26),v=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,l.a.MEDIA_ATTACHING,l.a.MEDIA_DETACHING,l.a.FRAG_PARSING_USERDATA,l.a.FRAG_DECRYPTED,l.a.MANIFEST_LOADING,l.a.MANIFEST_LOADED,l.a.FRAG_LOADED,l.a.LEVEL_SWITCHING,l.a.INIT_PTS_FOUND));if(n.hls=r,n.config=r.config,n.enabled=!0,n.Cues=r.config.cueHandler,n.textTracks=[],n.tracks=[],n.unparsedVttFrags=[],n.initPTS=void 0,n.cueRanges=[],n.captionsTracks={},n.captionsProperties={textTrack1:{label:n.config.captionsTextTrack1Label,languageCode:n.config.captionsTextTrack1LanguageCode},textTrack2:{label:n.config.captionsTextTrack2Label,languageCode:n.config.captionsTextTrack2LanguageCode}},n.config.enableCEA708Captions){var o=new c.a(n,"textTrack1"),s=new c.a(n,"textTrack2");n.cea608Parser=new d.a(0,o,s)}return n}return n(e,t),e.prototype.addCues=function(t,e,r,i){for(var a=this.cueRanges,n=!1,o=a.length;o--;){var l=a[o],u=s(l[0],l[1],e,r);if(u>=0&&(l[0]=Math.min(l[0],e),l[1]=Math.max(l[1],r),n=!0,u/(r-e)>.5))return}n||a.push([e,r]),this.Cues.newCue(this.captionsTracks[t],e,r,i)},e.prototype.onInitPtsFound=function(t){var e=this;void 0===this.initPTS&&(this.initPTS=t.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(t){e.onFragLoaded(t)}),this.unparsedVttFrags=[])},e.prototype.getExistingTrack=function(t){var e=this.media;if(e)for(var r=0;rs&&(f.log("ERROR","Too large cursor position "+this.pos),this.pos=s)},t.prototype.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var r=this.pos+1;r=144&&this.backSpace();var e=n(t);if(this.pos>=s)return void f.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!");this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1)},t.prototype.clearFromPos=function(t){var e=void 0;for(e=t;e0&&(r=t?"["+e.join(" | ")+"]":e.join("\n")),r},t.prototype.getTextAndFormat=function(){return this.rows},t}(),b=function(){function t(e,r){i(this,t),this.chNr=e,this.outputFilter=r,this.mode=null,this.verbose=0,this.displayedMemory=new m,this.nonDisplayedMemory=new m,this.lastOutputScreen=new m,this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return t.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},t.prototype.getHandler=function(){return this.outputFilter},t.prototype.setHandler=function(t){this.outputFilter=t},t.prototype.setPAC=function(t){this.writeScreen.setPAC(t)},t.prototype.setBkgData=function(t){this.writeScreen.setBkgData(t)},t.prototype.setMode=function(t){t!==this.mode&&(this.mode=t,f.log("INFO","MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},t.prototype.insertChars=function(t){for(var e=0;e=46,e.italics)e.foreground="white";else{var r=Math.floor(t/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];e.foreground=i[r]}f.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},t.prototype.outputDataUpdate=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=f.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),!0===t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},t.prototype.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),E=function(){function t(e,r,a){i(this,t),this.field=e||1,this.outputs=[r,a],this.channels=[new b(1,r),new b(2,a)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return t.prototype.getHandler=function(t){return this.channels[t].getHandler()},t.prototype.setHandler=function(t,e){this.channels[t].setHandler(e)},t.prototype.addData=function(t,e){var r=void 0,i=void 0,a=void 0,n=!1;this.lastTime=t,f.setTime(t);for(var o=0;o ("+p([i,a])+")"),r=this.parseCmd(i,a),r||(r=this.parseMidrow(i,a)),r||(r=this.parsePAC(i,a)),r||(r=this.parseBackgroundAttributes(i,a)),!r&&(n=this.parseChars(i,a)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(n)}else f.log("WARNING","No channel found yet. TEXT-MODE?");r?this.dataCounters.cmd+=2:n?this.dataCounters.char+=2:(this.dataCounters.other+=2,f.log("WARNING","Couldn't parse cleaned data "+p([i,a])+" orig: "+p([e[o],e[o+1]])))}else this.dataCounters.padding+=2},t.prototype.parseCmd=function(t,e){var r=null,i=(20===t||28===t)&&e>=32&&e<=47,a=(23===t||31===t)&&e>=33&&e<=35;if(!i&&!a)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,f.log("DEBUG","Repeated command ("+p([t,e])+") is dropped"),!0;r=20===t||23===t?1:2;var n=this.channels[r-1];return 20===t||28===t?32===e?n.ccRCL():33===e?n.ccBS():34===e?n.ccAOF():35===e?n.ccAON():36===e?n.ccDER():37===e?n.ccRU(2):38===e?n.ccRU(3):39===e?n.ccRU(4):40===e?n.ccFON():41===e?n.ccRDC():42===e?n.ccTR():43===e?n.ccRTD():44===e?n.ccEDM():45===e?n.ccCR():46===e?n.ccENM():47===e&&n.ccEOC():n.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.parseMidrow=function(t,e){var r=null;if((17===t||25===t)&&e>=32&&e<=47){if((r=17===t?1:2)!==this.currChNr)return f.log("ERROR","Mismatch channel in midrow parsing"),!1;return this.channels[r-1].ccMIDROW(e),f.log("DEBUG","MIDROW ("+p([t,e])+")"),!0}return!1},t.prototype.parsePAC=function(t,e){var r=null,i=null,a=(t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127,n=(16===t||24===t)&&e>=64&&e<=95;if(!a&&!n)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;r=t<=23?1:2,i=e>=64&&e<=95?1===r?l[t]:d[t]:1===r?u[t]:c[t];var o=this.interpretPAC(i,e);return this.channels[r-1].setPAC(o),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.interpretPAC=function(t,e){var r=e,i={color:null,italics:!1,indent:null,underline:!1,row:t};return r=e>95?e-96:e-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},t.prototype.parseChars=function(t,e){var r=null,i=null,a=null;if(t>=25?(r=2,a=t-8):(r=1,a=t),a>=17&&a<=19){var o=e;o=17===a?e+80:18===a?e+112:e+144,f.log("INFO","Special char '"+n(o)+"' in channel "+r),i=[o]}else t>=32&&t<=127&&(i=0===e?[t]:[t,e]);if(i){var s=p(i);f.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},t.prototype.parseBackgroundAttributes=function(t,e){var r=void 0,i=void 0,a=void 0,n=void 0,o=(16===t||24===t)&&e>=32&&e<=47,s=(23===t||31===t)&&e>=45&&e<=47;return!(!o&&!s)&&(r={},16===t||24===t?(i=Math.floor((e-32)/2),r.background=h[i],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0)),a=t<24?1:2,n=this.channels[a-1],n.setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0)},t.prototype.reset=function(){for(var t=0;tt)&&(this.startTime=t),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},t}();e.a=a},function(t,e,r){"use strict";var i=r(27),a=r(7),n=function(t,e,r){return t.substr(r||0,e.length)===e},o=function(t){var e=parseInt(t.substr(-3)),r=parseInt(t.substr(-6,2)),i=parseInt(t.substr(-9,2)),a=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;return isNaN(e)||isNaN(r)||isNaN(i)||isNaN(a)?-1:(e+=1e3*r,e+=6e4*i,e+=36e5*a)},s=function(t){for(var e=5381,r=t.length;r;)e=33*e^t.charCodeAt(--r);return(e>>>0).toString()},l=function(t,e,r){var i=t[e],a=t[i.prevCC];if(!a||!a.new&&i.new)return t.ccOffset=t.presentationOffset=i.start,void(i.new=!1);for(;a&&a.new;)t.ccOffset+=i.start-a.start,i.new=!1,i=a,a=t[i.prevCC];t.presentationOffset=r},u={parse:function(t,e,r,u,d,c){var h=/\r\n|\n\r|\n|\r/g,f=Object(a.b)(new Uint8Array(t)).trim().replace(h,"\n").split("\n"),p="00:00.000",v=0,g=0,y=0,m=[],b=void 0,E=!0,T=new i.a;T.oncue=function(t){var e=r[u],i=r.ccOffset;e&&e.new&&(void 0!==g?i=r.ccOffset=e.start:l(r,u,y)),y&&(i=y+r.ccOffset-r.presentationOffset),t.startTime+=i-g,t.endTime+=i-g,t.id=s(t.startTime.toString())+s(t.endTime.toString())+s(t.text),t.text=decodeURIComponent(encodeURIComponent(t.text)),t.endTime>0&&m.push(t)},T.onparsingerror=function(t){b=t},T.onflush=function(){if(b&&c)return void c(b);d(m)},f.forEach(function(t){if(E){if(n(t,"X-TIMESTAMP-MAP=")){E=!1,t.substr(16).split(",").forEach(function(t){n(t,"LOCAL:")?p=t.substr(6):n(t,"MPEGTS:")&&(v=parseInt(t.substr(7)))});try{e=e<0?e+8589934592:e,v-=e,g=o(p)/1e3,y=v/9e4,-1===g&&(b=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){b=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(E=!1)}T.parse(t+"\n")}),T.flush()}};e.a=u},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t){for(var e=[],r=0;r=r.length)&&(this._stopTimer(),this.trackId=t,u.b.log("switching to subtitle track "+t),e.trigger(s.a.SUBTITLE_TRACK_SWITCH,{id:t}),-1!==t)){var i=r[t],a=i.details;a&&!a.live||(u.b.log("(re)loading playlist for subtitle track "+t),e.trigger(s.a.SUBTITLE_TRACK_LOADING,{url:i.url,id:t}))}},e.prototype._stopTimer=function(){this.timer&&(clearInterval(this.timer),this.timer=null)},e.prototype._toggleTrackModes=function(t){var e=this.media,r=this.subtitleDisplay,i=this.trackId;if(e){var a=o(e.textTracks);if(-1===t)[].slice.call(a).forEach(function(t){t.mode="disabled"});else{var n=a[i];n&&(n.mode="disabled")}var s=a[t];s&&(s.mode=r?"showing":"hidden")}},d(e,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.trackId!==t&&(this._toggleTrackModes(t),this.setSubtitleTrackInternal(t))}}]),e}(l.a);e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(1),s=r(0),l=r(13),u=r(8),d=window,c=d.performance,h={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"},f=function(t){function e(r){i(this,e);var n=a(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.ERROR,o.a.KEY_LOADED,o.a.FRAG_LOADED,o.a.SUBTITLE_TRACKS_UPDATED,o.a.SUBTITLE_TRACK_SWITCH,o.a.SUBTITLE_TRACK_LOADED,o.a.SUBTITLE_FRAG_PROCESSED));return n.config=r.config,n.vttFragSNsProcessed={},n.vttFragQueues=void 0,n.currentlyProcessing=null,n.state=h.STOPPED,n.currentTrackId=-1,n.decrypter=new l.a(r.observer,r.config),n}return n(e,t),e.prototype.onHandlerDestroyed=function(){this.state=h.STOPPED},e.prototype.clearVttFragQueues=function(){var t=this;this.vttFragQueues={},this.tracks.forEach(function(e){t.vttFragQueues[e.id]=[]})},e.prototype.nextFrag=function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var t=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.fragCurrent=t,this.hls.trigger(o.a.FRAG_LOADING,{frag:t}),this.state=h.FRAG_LOADING}},e.prototype.onSubtitleFragProcessed=function(t){t.success&&this.vttFragSNsProcessed[t.frag.trackId].push(t.frag.sn),this.currentlyProcessing=null,this.state=h.IDLE,this.nextFrag()},e.prototype.onMediaAttached=function(){this.state=h.IDLE},e.prototype.onError=function(t){var e=t.frag;e&&"subtitle"!==e.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())},e.prototype.doTick=function(){var t=this;switch(this.state){case h.IDLE:var e=this.tracks,r=this.currentTrackId,i=this.vttFragSNsProcessed[r],a=this.vttFragQueues[r],n=this.currentlyProcessing?this.currentlyProcessing.sn:-1,l=function(t){return i.indexOf(t.sn)>-1},u=function(t){return a.some(function(e){return e.sn===t.sn})};if(!e)break;var d;if(r0&&null!=r&&null!=r.key&&"AES-128"===r.method){var n=void 0;try{n=c.now()}catch(t){n=Date.now()}this.decrypter.decrypt(t.payload,r.key.buffer,r.iv.buffer,function(t){var e=void 0;try{e=c.now()}catch(t){e=Date.now()}a.trigger(o.a.FRAG_DECRYPTED,{frag:i,payload:t,stats:{tstart:n,tdecrypt:e}})})}},e}(u.a);e.a=f},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(3),s=r(1),l=r(2),u=r(0),d=function(){function t(t,e){for(var r=0;r1){var s=arguments[1];void 0!==s&&(o=s?Number(s):0)!=o&&(o=0)}var l=Math.min(Math.max(o,0),i),u=l-n;if(u<0)return!1;for(var d=-1;++d0},ResizeObserverController.prototype.connect_=function(){isBrowser&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh),mutationObserverSupported?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},ResizeObserverController.prototype.disconnect_=function(){isBrowser&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},ResizeObserverController.prototype.onTransitionEnd_=function(ref){var propertyName=ref.propertyName;void 0===propertyName&&(propertyName=""),transitionKeys.some(function(key){return!!~propertyName.indexOf(key)})&&this.refresh()},ResizeObserverController.getInstance=function(){return this.instance_||(this.instance_=new ResizeObserverController),this.instance_},ResizeObserverController.instance_=null;var defineConfigurable=function(target,props){for(var i=0,list=Object.keys(props);i0};var observers="undefined"!=typeof WeakMap?new WeakMap:new MapShim,ResizeObserver=function(callback){if(!(this instanceof ResizeObserver))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var controller=ResizeObserverController.getInstance(),observer=new ResizeObserverSPI(callback,controller,this);observers.set(this,observer)};return["observe","unobserve","disconnect"].forEach(function(method){ResizeObserver.prototype[method]=function(){return(ref=observers.get(this))[method].apply(ref,arguments);var ref}}),function(){return void 0!==global$1.ResizeObserver?global$1.ResizeObserver:ResizeObserver}()}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/components/apphost.js b/MediaBrowser.WebDashboard/dashboard-ui/components/apphost.js index fcfb1fd986..76958c0d72 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/components/apphost.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/components/apphost.js @@ -1 +1 @@ -define(["appSettings","browser","events","htmlMediaHelper"],function(appSettings,browser,events,htmlMediaHelper){"use strict";function getBaseProfileOptions(item){var disableHlsVideoAudioCodecs=[];return item&&htmlMediaHelper.enableHlsJsPlayer(item.RunTimeTicks,item.MediaType)&&((browser.edge||browser.msie)&&disableHlsVideoAudioCodecs.push("mp3"),disableHlsVideoAudioCodecs.push("ac3"),disableHlsVideoAudioCodecs.push("eac3"),disableHlsVideoAudioCodecs.push("opus")),{enableMkvProgressive:!1,disableHlsVideoAudioCodecs:disableHlsVideoAudioCodecs}}function getDeviceProfileForWindowsUwp(item){return new Promise(function(resolve,reject){require(["browserdeviceprofile","environments/windows-uwp/mediacaps"],function(profileBuilder,uwpMediaCaps){var profileOptions=getBaseProfileOptions(item);profileOptions.supportsDts=uwpMediaCaps.supportsDTS(),profileOptions.supportsTrueHd=uwpMediaCaps.supportsDolby(),profileOptions.audioChannels=uwpMediaCaps.getAudioChannels(),resolve(profileBuilder(profileOptions))})})}function getDeviceProfile(item,options){return options=options||{},self.Windows?getDeviceProfileForWindowsUwp(item):new Promise(function(resolve,reject){require(["browserdeviceprofile"],function(profileBuilder){var profile=profileBuilder(getBaseProfileOptions(item));item&&!options.isRetry&&"allcomplexformats"!==appSettings.get("subtitleburnin")&&(browser.orsay||browser.tizen||(profile.SubtitleProfiles.push({Format:"ass",Method:"External"}),profile.SubtitleProfiles.push({Format:"ssa",Method:"External"}))),resolve(profile)})})}function escapeRegExp(str){return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}function replaceAll(originalString,strReplace,strWith){var strReplace2=escapeRegExp(strReplace),reg=new RegExp(strReplace2,"ig");return originalString.replace(reg,strWith)}function generateDeviceId(){var keys=[];if(keys.push(navigator.userAgent),keys.push((new Date).getTime()),self.btoa){var result=replaceAll(btoa(keys.join("|")),"=","1");return Promise.resolve(result)}return Promise.resolve((new Date).getTime())}function getDeviceId(){var key="_deviceId2",deviceId=appSettings.get(key);return deviceId?Promise.resolve(deviceId):generateDeviceId().then(function(deviceId){return appSettings.set(key,deviceId),deviceId})}function getDeviceName(){var deviceName;return deviceName=browser.tizen?"Samsung Smart TV":browser.web0s?"LG Smart TV":browser.operaTv?"Opera TV":browser.xboxOne?"Xbox One":browser.ps4?"Sony PS4":browser.chrome?"Chrome":browser.edge?"Edge":browser.firefox?"Firefox":browser.msie?"Internet Explorer":"Web Browser",browser.ipad?deviceName+=" Ipad":browser.iphone?deviceName+=" Iphone":browser.android&&(deviceName+=" Android"),deviceName}function supportsVoiceInput(){return!browser.tv&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.oSpeechRecognition||window.msSpeechRecognition)}function supportsFullscreen(){if(browser.tv)return!1;var element=document.documentElement;return!!(element.requestFullscreen||element.mozRequestFullScreen||element.webkitRequestFullscreen||element.msRequestFullscreen)||!!document.createElement("video").webkitEnterFullscreen}function getSyncProfile(){return new Promise(function(resolve,reject){require(["browserdeviceprofile","appSettings"],function(profileBuilder,appSettings){var profile=profileBuilder();profile.MaxStaticMusicBitrate=appSettings.maxStaticMusicBitrate(),resolve(profile)})})}function getDefaultLayout(){return"desktop"}function supportsHtmlMediaAutoplay(){if(browser.edgeUwp||browser.tizen||browser.web0s||browser.orsay||browser.operaTv||browser.ps4||browser.xboxOne)return!0;if(browser.mobile)return!1;var savedResult=appSettings.get(htmlMediaAutoplayAppStorageKey);return"true"===savedResult||"false"!==savedResult&&null}function cueSupported(){try{var video=document.createElement("video"),style=document.createElement("style");style.textContent="video::cue {background: inherit}",document.body.appendChild(style),document.body.appendChild(video);var cue=window.getComputedStyle(video,"::cue").background;return document.body.removeChild(style),document.body.removeChild(video),!!cue.length}catch(err){return console.log("Error detecting cue support:"+err),!1}}function onAppVisible(){_isHidden&&(_isHidden=!1,console.log("triggering app resume event"),events.trigger(appHost,"resume"))}function onAppHidden(){_isHidden||(_isHidden=!0,console.log("app is hidden"))}var htmlMediaAutoplayAppStorageKey="supportshtmlmediaautoplay0",supportedFeatures=function(){var features=[];return navigator.share&&features.push("sharing"),browser.edgeUwp||browser.tv||browser.xboxOne||browser.ps4||features.push("filedownload"),browser.operaTv||browser.tizen||browser.orsay||browser.web0s?features.push("exit"):(features.push("exitmenu"),features.push("plugins")),browser.operaTv||browser.tizen||browser.orsay||browser.web0s||browser.ps4||(features.push("externallinks"),features.push("externalpremium")),browser.operaTv||features.push("externallinkdisplay"),supportsVoiceInput()&&features.push("voiceinput"),!browser.tv&&!browser.xboxOne&&browser.ps4,supportsHtmlMediaAutoplay()&&(features.push("htmlaudioautoplay"),features.push("htmlvideoautoplay")),browser.edgeUwp&&features.push("sync"),supportsFullscreen()&&features.push("fullscreenchange"),(browser.chrome||browser.edge&&!browser.slow)&&(browser.noAnimation||browser.edgeUwp||browser.xboxOne||features.push("imageanalysis")),Dashboard.isConnectMode()&&features.push("multiserver"),(browser.tv||browser.xboxOne||browser.ps4||browser.mobile)&&features.push("physicalvolumecontrol"),browser.tv||browser.xboxOne||browser.ps4||features.push("remotecontrol"),browser.operaTv||browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp||features.push("remotevideo"),features.push("otherapppromotions"),features.push("targetblank"),browser.orsay||browser.tizen||browser.msie||!(browser.firefox||browser.ps4||browser.edge||cueSupported())||features.push("subtitleappearancesettings"),browser.orsay||browser.tizen||features.push("subtitleburnsettings"),browser.tv||browser.ps4||browser.xboxOne||features.push("fileinput"),Dashboard.isConnectMode()&&features.push("displaylanguage"),browser.chrome&&features.push("chromecast"),features}();-1===supportedFeatures.indexOf("htmlvideoautoplay")&&!1!==supportsHtmlMediaAutoplay()&&require(["autoPlayDetect"],function(autoPlayDetect){autoPlayDetect.supportsHtmlMediaAutoplay().then(function(){appSettings.set(htmlMediaAutoplayAppStorageKey,"true"),supportedFeatures.push("htmlvideoautoplay"),supportedFeatures.push("htmlaudioautoplay")},function(){appSettings.set(htmlMediaAutoplayAppStorageKey,"false")})});var deviceId,deviceName,visibilityChange,visibilityState,appVersion=window.dashboardVersion||"3.0",appHost={getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(state){alert("setWindowState is not supported and should not be called")},exit:function(){if(browser.tizen)try{tizen.application.getCurrentApplication().exit()}catch(err){console.log("error closing application: "+err)}else window.close()},supports:function(command){return-1!==supportedFeatures.indexOf(command.toLowerCase())},preferVisualCards:browser.android||browser.chrome,moreIcon:browser.android?"dots-vert":"dots-horiz",getSyncProfile:getSyncProfile,getDefaultLayout:getDefaultLayout,getDeviceProfile:getDeviceProfile,init:function(){return deviceName=getDeviceName(),getDeviceId().then(function(resolvedDeviceId){deviceId=resolvedDeviceId})},deviceName:function(){return deviceName},deviceId:function(){return deviceId},appName:function(){return"Emby Mobile"},appVersion:function(){return appVersion},getPushTokenInfo:function(){return{}},setThemeColor:function(color){var metaThemeColor=document.querySelector("meta[name=theme-color]");metaThemeColor&&metaThemeColor.setAttribute("content",color)}},doc=self.document;doc&&(void 0!==doc.visibilityState?(visibilityChange="visibilitychange",visibilityState="hidden"):void 0!==doc.mozHidden?(visibilityChange="mozvisibilitychange",visibilityState="mozVisibilityState"):void 0!==doc.msHidden?(visibilityChange="msvisibilitychange",visibilityState="msVisibilityState"):void 0!==doc.webkitHidden&&(visibilityChange="webkitvisibilitychange",visibilityState="webkitVisibilityState"));var _isHidden=!1;return doc&&doc.addEventListener(visibilityChange,function(){document[visibilityState]?onAppHidden():onAppVisible()}),self.addEventListener&&(self.addEventListener("focus",onAppVisible),self.addEventListener("blur",onAppHidden)),appHost}); \ No newline at end of file +define(["appSettings","browser","events","htmlMediaHelper"],function(appSettings,browser,events,htmlMediaHelper){"use strict";function getBaseProfileOptions(item){var disableHlsVideoAudioCodecs=[];return item&&htmlMediaHelper.enableHlsJsPlayer(item.RunTimeTicks,item.MediaType)&&((browser.edge||browser.msie)&&disableHlsVideoAudioCodecs.push("mp3"),disableHlsVideoAudioCodecs.push("ac3"),disableHlsVideoAudioCodecs.push("eac3"),disableHlsVideoAudioCodecs.push("opus")),{enableMkvProgressive:!1,disableHlsVideoAudioCodecs:disableHlsVideoAudioCodecs}}function getDeviceProfileForWindowsUwp(item){return new Promise(function(resolve,reject){require(["browserdeviceprofile","environments/windows-uwp/mediacaps"],function(profileBuilder,uwpMediaCaps){var profileOptions=getBaseProfileOptions(item);profileOptions.supportsDts=uwpMediaCaps.supportsDTS(),profileOptions.supportsTrueHd=uwpMediaCaps.supportsDolby(),profileOptions.audioChannels=uwpMediaCaps.getAudioChannels(),resolve(profileBuilder(profileOptions))})})}function getDeviceProfile(item,options){return options=options||{},self.Windows?getDeviceProfileForWindowsUwp(item):new Promise(function(resolve,reject){require(["browserdeviceprofile"],function(profileBuilder){var profile=profileBuilder(getBaseProfileOptions(item));item&&!options.isRetry&&"allcomplexformats"!==appSettings.get("subtitleburnin")&&(browser.orsay||browser.tizen||(profile.SubtitleProfiles.push({Format:"ass",Method:"External"}),profile.SubtitleProfiles.push({Format:"ssa",Method:"External"}))),resolve(profile)})})}function escapeRegExp(str){return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}function replaceAll(originalString,strReplace,strWith){var strReplace2=escapeRegExp(strReplace),reg=new RegExp(strReplace2,"ig");return originalString.replace(reg,strWith)}function generateDeviceId(){var keys=[];if(keys.push(navigator.userAgent),keys.push((new Date).getTime()),self.btoa){var result=replaceAll(btoa(keys.join("|")),"=","1");return Promise.resolve(result)}return Promise.resolve((new Date).getTime())}function getDeviceId(){var key="_deviceId2",deviceId=appSettings.get(key);return deviceId?Promise.resolve(deviceId):generateDeviceId().then(function(deviceId){return appSettings.set(key,deviceId),deviceId})}function getDeviceName(){var deviceName;return deviceName=browser.tizen?"Samsung Smart TV":browser.web0s?"LG Smart TV":browser.operaTv?"Opera TV":browser.xboxOne?"Xbox One":browser.ps4?"Sony PS4":browser.chrome?"Chrome":browser.edge?"Edge":browser.firefox?"Firefox":browser.msie?"Internet Explorer":"Web Browser",browser.ipad?deviceName+=" Ipad":browser.iphone?deviceName+=" Iphone":browser.android&&(deviceName+=" Android"),deviceName}function supportsVoiceInput(){return!browser.tv&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.oSpeechRecognition||window.msSpeechRecognition)}function supportsFullscreen(){if(browser.tv)return!1;var element=document.documentElement;return!!(element.requestFullscreen||element.mozRequestFullScreen||element.webkitRequestFullscreen||element.msRequestFullscreen)||!!document.createElement("video").webkitEnterFullscreen}function getSyncProfile(){return new Promise(function(resolve,reject){require(["browserdeviceprofile","appSettings"],function(profileBuilder,appSettings){var profile=profileBuilder();profile.MaxStaticMusicBitrate=appSettings.maxStaticMusicBitrate(),resolve(profile)})})}function getDefaultLayout(){return"desktop"}function supportsHtmlMediaAutoplay(){if(browser.edgeUwp||browser.tizen||browser.web0s||browser.orsay||browser.operaTv||browser.ps4||browser.xboxOne)return!0;if(browser.mobile)return!1;var savedResult=appSettings.get(htmlMediaAutoplayAppStorageKey);return"true"===savedResult||"false"!==savedResult&&null}function cueSupported(){try{var video=document.createElement("video"),style=document.createElement("style");style.textContent="video::cue {background: inherit}",document.body.appendChild(style),document.body.appendChild(video);var cue=window.getComputedStyle(video,"::cue").background;return document.body.removeChild(style),document.body.removeChild(video),!!cue.length}catch(err){return console.log("Error detecting cue support:"+err),!1}}function onAppVisible(){_isHidden&&(_isHidden=!1,console.log("triggering app resume event"),events.trigger(appHost,"resume"))}function onAppHidden(){_isHidden||(_isHidden=!0,console.log("app is hidden"))}var htmlMediaAutoplayAppStorageKey="supportshtmlmediaautoplay0",supportedFeatures=function(){var features=[];return navigator.share&&features.push("sharing"),browser.edgeUwp||browser.tv||browser.xboxOne||browser.ps4||features.push("filedownload"),browser.operaTv||browser.tizen||browser.orsay||browser.web0s?features.push("exit"):(features.push("exitmenu"),features.push("plugins")),browser.operaTv||browser.tizen||browser.orsay||browser.web0s||browser.ps4||(features.push("externallinks"),features.push("externalpremium")),browser.operaTv||features.push("externallinkdisplay"),supportsVoiceInput()&&features.push("voiceinput"),!browser.tv&&!browser.xboxOne&&browser.ps4,supportsHtmlMediaAutoplay()&&(features.push("htmlaudioautoplay"),features.push("htmlvideoautoplay")),browser.edgeUwp&&features.push("sync"),supportsFullscreen()&&features.push("fullscreenchange"),(browser.chrome||browser.edge&&!browser.slow)&&(browser.noAnimation||browser.edgeUwp||browser.xboxOne||features.push("imageanalysis")),Dashboard.isConnectMode()&&features.push("multiserver"),(browser.tv||browser.xboxOne||browser.ps4||browser.mobile)&&features.push("physicalvolumecontrol"),browser.tv||browser.xboxOne||browser.ps4||features.push("remotecontrol"),browser.operaTv||browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp||features.push("remotevideo"),features.push("otherapppromotions"),features.push("targetblank"),browser.orsay||browser.tizen||browser.msie||!(browser.firefox||browser.ps4||browser.edge||cueSupported())||features.push("subtitleappearancesettings"),browser.orsay||browser.tizen||features.push("subtitleburnsettings"),browser.tv||browser.ps4||browser.xboxOne||features.push("fileinput"),Dashboard.isConnectMode()&&features.push("displaylanguage"),browser.chrome&&features.push("chromecast"),features}();-1===supportedFeatures.indexOf("htmlvideoautoplay")&&!1!==supportsHtmlMediaAutoplay()&&require(["autoPlayDetect"],function(autoPlayDetect){autoPlayDetect.supportsHtmlMediaAutoplay().then(function(){appSettings.set(htmlMediaAutoplayAppStorageKey,"true"),supportedFeatures.push("htmlvideoautoplay"),supportedFeatures.push("htmlaudioautoplay")},function(){appSettings.set(htmlMediaAutoplayAppStorageKey,"false")})});var deviceId,deviceName,visibilityChange,visibilityState,appVersion=window.dashboardVersion||"3.0",appHost={getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(state){alert("setWindowState is not supported and should not be called")},exit:function(){if(browser.tizen)try{tizen.application.getCurrentApplication().exit()}catch(err){console.log("error closing application: "+err)}else window.close()},supports:function(command){return-1!==supportedFeatures.indexOf(command.toLowerCase())},preferVisualCards:browser.android||browser.chrome,moreIcon:browser.android?"dots-vert":"dots-horiz",getSyncProfile:getSyncProfile,getDefaultLayout:getDefaultLayout,getDeviceProfile:getDeviceProfile,init:function(){return deviceName=getDeviceName(),getDeviceId().then(function(resolvedDeviceId){deviceId=resolvedDeviceId})},deviceName:function(){return deviceName},deviceId:function(){return deviceId},appName:function(){return"Emby Mobile"},appVersion:function(){return appVersion},getPushTokenInfo:function(){return{}},setThemeColor:function(color){var metaThemeColor=document.querySelector("meta[name=theme-color]");metaThemeColor&&metaThemeColor.setAttribute("content",color)},setUserScalable:function(scalable){if(!browser.tv){var att=scalable?"width=device-width, initial-scale=1, minimum-scale=1, user-scalable=yes":"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no";document.querySelector("meta[name=viewport]").setAttribute("content",att)}}},doc=self.document;doc&&(void 0!==doc.visibilityState?(visibilityChange="visibilitychange",visibilityState="hidden"):void 0!==doc.mozHidden?(visibilityChange="mozvisibilitychange",visibilityState="mozVisibilityState"):void 0!==doc.msHidden?(visibilityChange="msvisibilitychange",visibilityState="msVisibilityState"):void 0!==doc.webkitHidden&&(visibilityChange="webkitvisibilitychange",visibilityState="webkitVisibilityState"));var _isHidden=!1;return doc&&doc.addEventListener(visibilityChange,function(){document[visibilityState]?onAppHidden():onAppVisible()}),self.addEventListener&&(self.addEventListener("focus",onAppVisible),self.addEventListener("blur",onAppHidden)),appHost}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/css/librarybrowser.css b/MediaBrowser.WebDashboard/dashboard-ui/css/librarybrowser.css index b34c151cc9..e904b7d518 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/css/librarybrowser.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/css/librarybrowser.css @@ -1 +1 @@ -.headerUserImage,.navMenuOption,.pageTitle{vertical-align:middle}.detailButton-mobile,.itemLinks,.listPaging,.sectionTabs,.viewSettings{text-align:center}.headerSelectedPlayer,.itemMiscInfo{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.libraryPage{padding-top:7em!important}.itemDetailPage{padding-top:4em!important}.standalonePage{padding-top:4.5em!important}.wizardPage{padding-top:7em!important}.libraryPage:not(.noSecondaryNavPage){padding-top:7.5em!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}.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}.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;contain:layout style paint}.mainAnimatedPages,.pageTabContent{contain:layout style}.hiddenViewMenuBar .skinHeader{display:none}.headerLeft,.headerRight{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.headerTop{padding:.865em 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;text-decoration:none;color:inherit;padding:.9em 0 .9em 2.4em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.layout-desktop .searchTabButton,.layout-mobile .searchTabButton,.layout-tv .headerSearchButton,body:not(.dashboardDocument) .btnNotifications{display:none!important}.navMenuOptionIcon{margin-right:1em;-webkit-flex-shrink:0;flex-shrink:0}.sidebarHeader{padding-left:1.2em;margin:1em 0 .5em}.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}.mainDrawer-scrollContainer{padding-bottom:10vh}@media all and (min-width:40em){.dashboardDocument .adminDrawerLogo,.dashboardDocument .mainDrawerButton{display:none!important}.dashboardDocument .mainDrawer{z-index:inherit!important;left:0!important;top:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;width:20.205em!important;font-size:94%}.dashboardDocument .mainDrawer-scrollContainer{margin-top:5em!important}.dashboardDocument withSectionTabs .mainDrawer-scrollContainer{margin-top:8.7em!important}.dashboardDocument .skinBody{left:20em}}@media all and (min-width:40em) and (max-width:84em){.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:8.4em!important}}@media all and (max-width:60em){.libraryDocument .mainDrawerButton{display:none}}@media all and (max-width:84em){.withSectionTabs .headerTop{padding-bottom:.2em}.sectionTabs{font-size:83.5%}}@media all and (min-width:84em){.headerTop{padding:1.489em 0}.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:-1.05em}.libraryPage:not(.noSecondaryNavPage){padding-top:4.6em!important}.pageWithAbsoluteTabs:not(.noSecondaryNavPage){padding-top:6.7em!important}.absolutePageTabContent{top:5.7em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:6.1em!important}.dashboardDocument .mainDrawer-scrollContainer{margin-top:6.3em!important}}.headerSelectedPlayer{max-width:10em;white-space:nowrap}@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}.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;margin-right:1em}.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:50vh;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{width:100%}.thumbDetailImageContainer{width:400px}.itemDetailImage.loaded{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}@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{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}}@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:1em 0}.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}.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!important;padding:.5em .7em!important}@media all and (min-width:29em){.detailButton-mobile{padding-left:.75em!important;padding-right:.75em!important}}@media all and (min-width:32em){.detailButton-mobile{padding-left:.8em!important;padding-right:.8em!important}}@media all and (min-width:35em){.detailButton-mobile{padding-left:.85em!important;padding-right:.85em!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.6em!important;width:1em;height:1em}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}@media all and (max-width:62.5em){.detailButton-mobile-text{margin-top:.7em;font-size:80%;font-weight:400}.mainDetailButtons{margin-left:-.5em}}@media all and (min-width:62.5em){.detailButton-mobile-icon:not(.always),.detailButton-mobile-text.texthide{display:none!important}.detailButton-mobile{padding-top:0!important;padding-bottom:0!important;height:3em;margin-right:.3em!important}.mainDetailButtons{font-size:108%;margin:1.25em 0}.detailButton-mobile-icon:not(.notext){margin-right:.25em}.detailButton-mobile-icon.playstatebutton-icon-unplayed{opacity:.2}.detailButton-mobile-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}}.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}}.mediaInfoStream{margin:0 3em 0 0;display:inline-block;vertical-align:top}.mediaInfoStreamType{display:block;margin:1em 0}.mediaInfoAttribute,.mediaInfoLabel{display:inline-block}.mediaInfoLabel{margin-right:1em;font-weight:600}.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}@media all and (max-height:31.25em){.itemBackdrop{height:52vh}}@media all and (max-width:75em){.listViewUserDataButtons{display:none!important}}@media all and (max-width:62.5em){.detailsHiddenOnMobile{display:none}}.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:1em 0;-webkit-flex-wrap:wrap;flex-wrap:wrap}.verticalSection-extrabottompadding{margin-bottom:2.7em}.sectionTitleContainer{margin:1.25em 0}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.sectionTitleContainer-cards{margin-bottom:.1em}.sectionTitle{margin-bottom:1em}.sectionTitle-cards{margin-left:.55em;margin-bottom:0}@media all and (max-width:50em){.sectionTitle-cards{margin-left:.28em}}.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;font-size:84%!important;padding:.5em!important}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.sectionTitleTextButton{margin:0!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;margin-top: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:7.5%}.padded-right-withalphapicker{padding-right:7.5%}}@media all and (min-width:500px){.padded-left{padding-left:6%}.padded-right{padding-right:6%}}@media all and (min-width:600px){.padded-left{padding-left:4%}.padded-right{padding-right:4%}}@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.5%}.layout-tv .padded-right-withalphapicker{padding-right:4.5%}}.searchfields-icon{color:#aaa}.button-accent-flat{color:#52B54B!important}.clearLink{text-decoration:none;font-weight:inherit!important;vertical-align:middle;color:inherit!important}.itemsViewSettingsContainer{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}@media all and (min-width:40em){.listIconButton-autohide{display:none!important}}@media all and (max-width:40em){.listTextButton-autohide{display:none!important}}.layout-tv .itemsViewSettingsContainer{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;padding:1.5em .75em 1em 0;font-size:92%}.itemsViewSettingsContainer>.button-flat{margin:0} \ No newline at end of file +.headerUserImage,.navMenuOption,.pageTitle{vertical-align:middle}.detailButton-mobile,.itemLinks,.listPaging,.sectionTabs,.viewSettings{text-align:center}.headerSelectedPlayer,.itemMiscInfo{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.libraryPage{padding-top:7em!important}.itemDetailPage{padding-top:4em!important}.standalonePage{padding-top:4.5em!important}.wizardPage{padding-top:7em!important}.libraryPage:not(.noSecondaryNavPage){padding-top:7.5em!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}.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}.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}.headerLeft,.skinHeader{display:-webkit-box;display:-webkit-flex}.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:flex;flex-direction:column;contain:layout style paint}.headerLeft,.headerRight{-webkit-box-align:center}.mainAnimatedPages,.pageTabContent{contain:layout style}.hiddenViewMenuBar .skinHeader{display:none}.headerTop{padding:.865em 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:-webkit-box;display:-webkit-flex;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!important;display:-webkit-flex!important;display:flex!important;-webkit-box-align:center;-webkit-align-items:center;align-items:center;text-decoration:none;color:inherit;padding:.9em 0 .9em 2.4em!important;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;font-weight:400!important;margin:0!important;-webkit-border-radius:0!important;border-radius:0!important}.layout-desktop .searchTabButton,.layout-mobile .searchTabButton,.layout-tv .headerSearchButton,body:not(.dashboardDocument) .btnNotifications{display:none!important}.navMenuOptionIcon{margin-right:1em;-webkit-flex-shrink:0;flex-shrink:0}.sidebarHeader{padding-left:1.2em;margin:1em 0 .5em}.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}.mainDrawer-scrollContainer{padding-bottom:10vh}@media all and (min-width:40em){.dashboardDocument .adminDrawerLogo,.dashboardDocument .mainDrawerButton{display:none!important}.dashboardDocument .mainDrawer{z-index:inherit!important;left:0!important;top:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;width:20.205em!important;font-size:94%}.dashboardDocument .mainDrawer-scrollContainer{margin-top:5em!important}.dashboardDocument withSectionTabs .mainDrawer-scrollContainer{margin-top:8.7em!important}.dashboardDocument .skinBody{left:20em}}@media all and (min-width:40em) and (max-width:84em){.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:8.4em!important}}@media all and (max-width:60em){.libraryDocument .mainDrawerButton{display:none}}@media all and (max-width:84em){.withSectionTabs .headerTop{padding-bottom:.2em}.sectionTabs{font-size:83.5%}}@media all and (min-width:84em){.headerTop{padding:1.489em 0}.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:-1.05em}.libraryPage:not(.noSecondaryNavPage){padding-top:4.6em!important}.pageWithAbsoluteTabs:not(.noSecondaryNavPage){padding-top:6.7em!important}.absolutePageTabContent{top:5.7em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:6.1em!important}.dashboardDocument .mainDrawer-scrollContainer{margin-top:6.3em!important}}.headerSelectedPlayer{max-width:10em;white-space:nowrap}@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}.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;margin-right:1em}.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:50vh;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{width:100%}.thumbDetailImageContainer{width:400px}.itemDetailImage.loaded{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}@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{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}}@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:1em 0}.recordingFields button{margin-left:0;margin-right:.5em;-webkit-flex-shrink:0;flex-shrink:0}.mainDetailButtons.hide+.recordingFields{margin-top:1.5em!important}.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!important;padding:.5em .7em!important}.detailButton{margin:0 .5em 0 0!important}@media all and (min-width:29em){.detailButton-mobile{padding-left:.75em!important;padding-right:.75em!important}}@media all and (min-width:32em){.detailButton-mobile{padding-left:.8em!important;padding-right:.8em!important}}@media all and (min-width:35em){.detailButton-mobile{padding-left:.85em!important;padding-right:.85em!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.6em!important;width:1em;height:1em}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}.detailButton-mobile-text{margin-top:.7em;font-size:80%;font-weight:400}@media all and (max-width:62.5em){.mainDetailButtons{margin-left:-.5em}.detailButton{display:none!important}}@media all and (min-width:62.5em){.detailButton-mobile{display:none!important}.mainDetailButtons{font-size:108%;margin:1.25em 0}}.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}}.mediaInfoStream{margin:0 3em 0 0;display:inline-block;vertical-align:top}.mediaInfoStreamType{display:block;margin:1em 0}.mediaInfoAttribute,.mediaInfoLabel{display:inline-block}.mediaInfoLabel{margin-right:1em;font-weight:600}.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}@media all and (max-height:31.25em){.itemBackdrop{height:52vh}}@media all and (max-width:75em){.listViewUserDataButtons{display:none!important}}@media all and (max-width:62.5em){.detailsHiddenOnMobile{display:none}}.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:1em 0;-webkit-flex-wrap:wrap;flex-wrap:wrap}.verticalSection-extrabottompadding{margin-bottom:2.7em}.sectionTitleContainer{margin:1.25em 0}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.sectionTitleContainer-cards{margin-bottom:.1em}.sectionTitle{margin-bottom:1em}.sectionTitle-cards{margin-left:.55em;margin-bottom:0}@media all and (max-width:50em){.sectionTitle-cards{margin-left:.28em}}.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;font-size:84%!important;padding:.5em!important}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.sectionTitleTextButton{margin:0!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;margin-top: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:7.5%}.padded-right-withalphapicker{padding-right:7.5%}}@media all and (min-width:500px){.padded-left{padding-left:6%}.padded-right{padding-right:6%}}@media all and (min-width:600px){.padded-left{padding-left:4%}.padded-right{padding-right:4%}}@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.5%}.layout-tv .padded-right-withalphapicker{padding-right:4.5%}}.searchfields-icon{color:#aaa}.button-accent-flat{color:#52B54B!important}.clearLink{text-decoration:none;font-weight:inherit!important;vertical-align:middle;color:inherit!important}.itemsViewSettingsContainer{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}@media all and (min-width:40em){.listIconButton-autohide{display:none!important}}@media all and (max-width:40em){.listTextButton-autohide{display:none!important}}.layout-tv .itemsViewSettingsContainer{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;padding:1.5em .75em 1em 0;font-size:92%}.itemsViewSettingsContainer>.button-flat{margin:0} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/devices/ios/ios.css b/MediaBrowser.WebDashboard/dashboard-ui/devices/ios/ios.css index b8c4526daa..53b33ae434 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/devices/ios/ios.css +++ b/MediaBrowser.WebDashboard/dashboard-ui/devices/ios/ios.css @@ -1 +1 @@ -html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:82%!important}.backdropContainer{background-attachment:initial}.dialog{background:rgba(28,28,28,.84);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.formDialogFooter{position:static!important;margin:0 -1em!important} \ No newline at end of file +html{font-size:82%!important}.formDialogFooter{position:static!important;margin:0 -1em!important} \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/home/favorites.js b/MediaBrowser.WebDashboard/dashboard-ui/home/favorites.js index d4a564cefe..004076c0b1 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/home/favorites.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/home/favorites.js @@ -1 +1 @@ -define(["appRouter","cardBuilder","dom","globalize","connectionManager","apphost","layoutManager","focusManager","emby-itemscontainer","emby-scroller"],function(appRouter,cardBuilder,dom,globalize,connectionManager,appHost,layoutManager,focusManager){"use strict";function enableScrollX(){return!0}function getThumbShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function getPosterShape(){return enableScrollX()?"overflowPortrait":"portrait"}function getSquareShape(){return enableScrollX()?"overflowSquare":"square"}function getSections(){return[{name:"sharedcomponents#HeaderFavoriteMovies",types:"Movie",shape:getPosterShape(),showTitle:!0,showYear:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"sharedcomponents#HeaderFavoriteShows",types:"Series",shape:getPosterShape(),showTitle:!0,showYear:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"sharedcomponents#HeaderFavoriteEpisodes",types:"Episode",shape:getThumbShape(),preferThumb:!1,showTitle:!0,showParentTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"sharedcomponents#HeaderFavoriteVideos",types:"Video",shape:getThumbShape(),preferThumb:!0,showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"sharedcomponents#HeaderFavoriteCollections",types:"BoxSet",shape:getPosterShape(),showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"sharedcomponents#HeaderFavoritePlaylists",types:"Playlist",shape:getSquareShape(),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!1,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"sharedcomponents#HeaderFavoriteArtists",types:"MusicArtist",shape:getSquareShape(),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!1,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"sharedcomponents#HeaderFavoriteAlbums",types:"MusicAlbum",shape:getSquareShape(),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"sharedcomponents#HeaderFavoriteSongs",types:"Audio",shape:getSquareShape(),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayMoreButton:!0,action:"instantmix",coverImage:!0},{name:"sharedcomponents#HeaderFavoriteGames",types:"Game",shape:getSquareShape(),preferThumb:!1,showTitle:!0}]}function getFetchDataFn(section){return function(){var apiClient=this.apiClient,options={SortBy:"SortName",SortOrder:"Ascending",Filters:"IsFavorite",Recursive:!0,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",CollapseBoxSetItems:!1,ExcludeLocationTypes:"Virtual",EnableTotalRecordCount:!1};options.Limit=20;var userId=apiClient.getCurrentUserId();return"MusicArtist"===section.types?apiClient.getArtists(userId,options):(options.IncludeItemTypes=section.types,apiClient.getItems(userId,options))}}function getRouteUrl(section,serverId){return appRouter.getRouteUrl("list",{serverId:serverId,itemTypes:section.types,isFavorite:!0})}function getItemsHtmlFn(section){return function(items){var supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=(appHost.preferVisualCards||supportsImageAnalysis)&§ion.autoCardLayout&§ion.showTitle;cardLayout=!1;var serverId=this.apiClient.serverId(),leadingButtons=layoutManager.tv?[{name:globalize.translate("sharedcomponents#All"),id:"more",icon:"",routeUrl:getRouteUrl(section,serverId)}]:null,lines=0;return section.showTitle&&lines++,section.showYear&&lines++,section.showParentTitle&&lines++,cardBuilder.getCardsHtml({items:items,preferThumb:section.preferThumb,shape:section.shape,centerText:section.centerText&&!cardLayout,overlayText:!1!==section.overlayText,showTitle:section.showTitle,showYear:section.showYear,showParentTitle:section.showParentTitle,scalable:!0,coverImage:section.coverImage,overlayPlayButton:section.overlayPlayButton,overlayMoreButton:section.overlayMoreButton&&!cardLayout,action:section.action,allowBottomPadding:!enableScrollX(),cardLayout:cardLayout,vibrant:supportsImageAnalysis&&cardLayout,leadingButtons:leadingButtons,lines:lines})}}function FavoritesTab(view,params){this.view=view,this.params=params,this.apiClient=connectionManager.currentApiClient(),this.sectionsContainer=view.querySelector(".sections"),createSections(this,this.sectionsContainer,this.apiClient)}function createSections(instance,elem,apiClient){var i,length,sections=getSections(),html="";for(i=0,length=sections.length;i',html+='
',layoutManager.tv?html+='

'+globalize.translate(section.name)+"

":(html+='',html+='

',html+=globalize.translate(section.name),html+="

",html+='',html+="
"),html+="
",html+='
',html+="
"}elem.innerHTML=html;var elems=elem.querySelectorAll(".itemsContainer");for(i=0,length=elems.length;i',html+='
',layoutManager.tv?html+='

'+globalize.translate(section.name)+"

":(html+='',html+='

',html+=globalize.translate(section.name),html+="

",html+='',html+="
"),html+="
",html+='
',html+="
"}elem.innerHTML=html;var elems=elem.querySelectorAll(".itemsContainer");for(i=0,length=elems.length;i + diff --git a/MediaBrowser.WebDashboard/dashboard-ui/itemdetails.html b/MediaBrowser.WebDashboard/dashboard-ui/itemdetails.html index 279e7d4f97..65474f64f2 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/itemdetails.html +++ b/MediaBrowser.WebDashboard/dashboard-ui/itemdetails.html @@ -63,18 +63,12 @@
- -
+ + + + + + + + + + + + + + + + + + + +
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/list/list.js b/MediaBrowser.WebDashboard/dashboard-ui/list/list.js index d07c706175..e1de101270 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/list/list.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/list/list.js @@ -1 +1 @@ -define(["globalize","listView","layoutManager","userSettings","focusManager","cardBuilder","loading","connectionManager","alphaNumericShortcuts","scroller","playbackManager","alphaPicker","emby-itemscontainer","emby-scroller"],function(globalize,listView,layoutManager,userSettings,focusManager,cardBuilder,loading,connectionManager,AlphaNumericShortcuts,scroller,playbackManager,alphaPicker){"use strict";function getInitialLiveTvQuery(instance,params){var query={UserId:connectionManager.getApiClient(params.serverId).getCurrentUserId(),StartIndex:0,Fields:"ChannelInfo,PrimaryImageAspectRatio",Limit:300};return"Recordings"===params.type?query.IsInProgress=!1:query.HasAired=!1,params.genreId&&(query.GenreIds=params.genreId),"true"===params.IsMovie?query.IsMovie=!0:"false"===params.IsMovie&&(query.IsMovie=!1),"true"===params.IsSeries?query.IsSeries=!0:"false"===params.IsSeries&&(query.IsSeries=!1),"true"===params.IsNews?query.IsNews=!0:"false"===params.IsNews&&(query.IsNews=!1),"true"===params.IsSports?query.IsSports=!0:"false"===params.IsSports&&(query.IsSports=!1),"true"===params.IsKids?query.IsKids=!0:"false"===params.IsKids&&(query.IsKids=!1),"true"===params.IsAiring?query.IsAiring=!0:"false"===params.IsAiring&&(query.IsAiring=!1),modifyQueryWithFilters(instance,query)}function modifyQueryWithFilters(instance,query){var sortValues=instance.getSortValues();query.SortBy||(query.SortBy=sortValues.sortBy,query.SortOrder=sortValues.sortOrder),query.Fields=query.Fields?query.Fields+",PrimaryImageAspectRatio":"PrimaryImageAspectRatio",query.ImageTypeLimit=1;var hasFilters,queryFilters=[],filters=instance.getFilters();return filters.IsPlayed&&(queryFilters.push("IsPlayed"),hasFilters=!0),filters.IsUnplayed&&(queryFilters.push("IsUnplayed"),hasFilters=!0),filters.IsFavorite&&(queryFilters.push("IsFavorite"),hasFilters=!0),filters.IsResumable&&(queryFilters.push("IsResumable"),hasFilters=!0),filters.VideoTypes&&(hasFilters=!0,query.VideoTypes=filters.VideoTypes),filters.GenreIds&&(hasFilters=!0,query.GenreIds=filters.GenreIds),filters.IsHD&&(query.IsHD=!0,hasFilters=!0),filters.IsSD&&(query.IsHD=!1,hasFilters=!0),filters.Is3D&&(query.Is3D=!0,hasFilters=!0),filters.HasSubtitles&&(query.HasSubtitles=!0,hasFilters=!0),filters.HasTrailer&&(query.HasTrailer=!0,hasFilters=!0),filters.HasSpecialFeature&&(query.HasSpecialFeature=!0,hasFilters=!0),filters.HasThemeSong&&(query.HasThemeSong=!0,hasFilters=!0),filters.HasThemeVideo&&(query.HasThemeVideo=!0,hasFilters=!0),query.Filters=queryFilters.length?queryFilters.join(","):null,instance.setFilterStatus(hasFilters),instance.alphaPicker&&(query.NameStartsWithOrGreater=instance.alphaPicker.value()),query}function updateSortText(instance){var btnSortText=instance.btnSortText;if(btnSortText){for(var options=instance.getSortMenuOptions(),values=instance.getSortValues(),sortBy=values.sortBy,i=0,length=options.length;i40?(alphaPicker.classList.remove("hide"),layoutManager.tv?instance.itemsContainer.parentNode.classList.add("padded-left-withalphapicker"):instance.itemsContainer.parentNode.classList.add("padded-right-withalphapicker")):(alphaPicker.classList.add("hide"),instance.itemsContainer.parentNode.classList.remove("padded-left-withalphapicker"),instance.itemsContainer.parentNode.classList.remove("padded-right-withalphapicker"))}}}function getItems(instance,params,item,sortBy,startIndex,limit){var apiClient=connectionManager.getApiClient(params.serverId);if(instance.queryRecursive=!1,"Recordings"===params.type)return apiClient.getLiveTvRecordings(getInitialLiveTvQuery(instance,params));if("Programs"===params.type)return"true"===params.IsAiring?apiClient.getLiveTvRecommendedPrograms(getInitialLiveTvQuery(instance,params)):apiClient.getLiveTvPrograms(getInitialLiveTvQuery(instance,params));if("nextup"===params.type)return apiClient.getNextUpEpisodes(modifyQueryWithFilters(instance,{Limit:limit,Fields:"PrimaryImageAspectRatio,SeriesInfo,DateCreated,BasicSyncInfo",UserId:apiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1,SortBy:sortBy}));if(!item)return instance.queryRecursive=!0,apiClient.getItems(apiClient.getCurrentUserId(),modifyQueryWithFilters(instance,{StartIndex:startIndex,Limit:limit,Fields:"PrimaryImageAspectRatio,SortName",ImageTypeLimit:1,IncludeItemTypes:params.type,Recursive:!0,IsFavorite:"true"===params.IsFavorite||null,ArtistIds:params.artistId||null,SortBy:sortBy}));if("Genre"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type||"Studio"===item.Type||"Person"===item.Type){instance.queryRecursive=!0;var query={StartIndex:startIndex,Limit:limit,Fields:"PrimaryImageAspectRatio,SortName",Recursive:!0,parentId:params.parentId,SortBy:sortBy};return"Studio"===item.Type?query.StudioIds=item.Id:"Genre"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type?query.GenreIds=item.Id:"Person"===item.Type&&(query.PersonIds=item.Id),"MusicGenre"===item.Type?query.IncludeItemTypes="MusicAlbum":"GameGenre"===item.Type?query.IncludeItemTypes="Game":"movies"===item.CollectionType?query.IncludeItemTypes="Movie":"tvshows"===item.CollectionType?query.IncludeItemTypes="Series":"Genre"===item.Type?query.IncludeItemTypes="Movie,Series,Video":"Person"===item.Type&&(query.IncludeItemTypes=params.type),apiClient.getItems(apiClient.getCurrentUserId(),modifyQueryWithFilters(instance,query))}return apiClient.getItems(apiClient.getCurrentUserId(),modifyQueryWithFilters(instance,{StartIndex:startIndex,Limit:limit,Fields:"PrimaryImageAspectRatio,SortName",ImageTypeLimit:1,ParentId:item.Id,SortBy:sortBy}))}function getItem(params){if("Recordings"===params.type)return Promise.resolve(null);if("Programs"===params.type)return Promise.resolve(null);if("nextup"===params.type)return Promise.resolve(null);var apiClient=connectionManager.getApiClient(params.serverId),itemId=params.genreId||params.gameGenreId||params.musicGenreId||params.studioId||params.personId||params.parentId;return itemId?apiClient.getItem(apiClient.getCurrentUserId(),itemId):Promise.resolve(null)}function showViewSettingsMenu(){var instance=this;require(["viewSettings"],function(ViewSettings){(new ViewSettings).show({settingsKey:instance.getSettingsKey(),settings:instance.getViewSettings(),visibleSettings:instance.getVisibleViewSettings()}).then(function(){updateItemsContainerForViewType(instance),instance.itemsContainer.refreshItems()})})}function showFilterMenu(){var instance=this;require(["filterMenu"],function(FilterMenu){(new FilterMenu).show({settingsKey:instance.getSettingsKey(),settings:instance.getFilters(),visibleSettings:instance.getVisibleFilters(),onChange:instance.itemsContainer.refreshItems.bind(instance.itemsContainer),parentId:instance.params.parentId,itemTypes:instance.getItemTypes(),serverId:instance.params.serverId,filterMenuOptions:instance.getFilterMenuOptions()}).then(function(){instance.itemsContainer.refreshItems()})})}function showSortMenu(){var instance=this;require(["sortMenu"],function(SortMenu){(new SortMenu).show({settingsKey:instance.getSettingsKey(),settings:instance.getSortValues(),onChange:instance.itemsContainer.refreshItems.bind(instance.itemsContainer),serverId:instance.params.serverId,sortOptions:instance.getSortMenuOptions()}).then(function(){updateSortText(instance),updateAlphaPickerState(instance),instance.itemsContainer.refreshItems()})})}function onNewItemClick(){var instance=this;require(["playlistEditor"],function(playlistEditor){(new playlistEditor).show({items:[],serverId:instance.params.serverId})})}function hideOrShowAll(elems,hide){for(var i=0,length=elems.length;i!
'),btnFilter.classList.add("btnFilterWithBubble"),bubble=btnFilter.querySelector(".filterButtonBubble")}hasFilters?bubble.classList.remove("hide"):bubble.classList.add("hide")}},ItemsView.prototype.getFilterMenuOptions=function(){var params=this.params;return{IsAiring:params.IsAiring,IsMovie:params.IsMovie,IsSports:params.IsSports,IsKids:params.IsKids,IsNews:params.IsNews,IsSeries:params.IsSeries,Recursive:this.queryRecursive}},ItemsView.prototype.getVisibleViewSettings=function(){var item=(this.params,this.currentItem),fields=["showTitle"];return(!item||"PhotoAlbum"!==item.Type&&"ChannelFolderItem"!==item.Type)&&fields.push("imageType"),fields.push("viewType"),fields},ItemsView.prototype.getViewSettings=function(){var basekey=this.getSettingsKey(),params=this.params,item=this.currentItem,showTitle=userSettings.get(basekey+"-showTitle");"true"===showTitle?showTitle=!0:"false"===showTitle?showTitle=!1:"Programs"===params.type||"Recordings"===params.type||"nextup"===params.type||"Audio"===params.type||"MusicAlbum"===params.type||"MusicArtist"===params.type?showTitle=!0:item&&"PhotoAlbum"!==item.Type&&(showTitle=!0);var imageType=userSettings.get(basekey+"-imageType");return imageType||"nextup"===params.type&&(imageType="thumb"),{showTitle:showTitle,showYear:"false"!==userSettings.get(basekey+"-showYear"),imageType:imageType||"primary",viewType:userSettings.get(basekey+"-viewType")||"images"}},ItemsView.prototype.getItemTypes=function(){var params=this.params;return"nextup"===params.type?["Episode"]:"Programs"===params.type?["Program"]:[]},ItemsView.prototype.getSettingsKey=function(){var values=[];values.push("items");var params=this.params;return params.type?values.push(params.type):params.parentId&&values.push(params.parentId),params.IsAiring&&values.push("IsAiring"),params.IsMovie&&values.push("IsMovie"),params.IsKids&&values.push("IsKids"),params.IsSports&&values.push("IsSports"),params.IsNews&&values.push("IsNews"),params.IsSeries&&values.push("IsSeries"),params.IsFavorite&&values.push("IsFavorite"),params.genreId&&values.push("Genre"),params.gameGenreId&&values.push("GameGenre"),params.musicGenreId&&values.push("MusicGenre"),params.studioId&&values.push("Studio"),params.personId&&values.push("Person"),params.parentId&&values.push("Folder"),values.join("-")},ItemsView}); \ No newline at end of file +define(["globalize","listView","layoutManager","userSettings","focusManager","cardBuilder","loading","connectionManager","alphaNumericShortcuts","scroller","playbackManager","alphaPicker","emby-itemscontainer","emby-scroller"],function(globalize,listView,layoutManager,userSettings,focusManager,cardBuilder,loading,connectionManager,AlphaNumericShortcuts,scroller,playbackManager,alphaPicker){"use strict";function getInitialLiveTvQuery(instance,params){var query={UserId:connectionManager.getApiClient(params.serverId).getCurrentUserId(),StartIndex:0,Fields:"ChannelInfo,PrimaryImageAspectRatio",Limit:300};return"Recordings"===params.type?query.IsInProgress=!1:query.HasAired=!1,params.genreId&&(query.GenreIds=params.genreId),"true"===params.IsMovie?query.IsMovie=!0:"false"===params.IsMovie&&(query.IsMovie=!1),"true"===params.IsSeries?query.IsSeries=!0:"false"===params.IsSeries&&(query.IsSeries=!1),"true"===params.IsNews?query.IsNews=!0:"false"===params.IsNews&&(query.IsNews=!1),"true"===params.IsSports?query.IsSports=!0:"false"===params.IsSports&&(query.IsSports=!1),"true"===params.IsKids?query.IsKids=!0:"false"===params.IsKids&&(query.IsKids=!1),"true"===params.IsAiring?query.IsAiring=!0:"false"===params.IsAiring&&(query.IsAiring=!1),modifyQueryWithFilters(instance,query)}function modifyQueryWithFilters(instance,query){var sortValues=instance.getSortValues();query.SortBy||(query.SortBy=sortValues.sortBy,query.SortOrder=sortValues.sortOrder),query.Fields=query.Fields?query.Fields+",PrimaryImageAspectRatio":"PrimaryImageAspectRatio",query.ImageTypeLimit=1;var hasFilters,queryFilters=[],filters=instance.getFilters();return filters.IsPlayed&&(queryFilters.push("IsPlayed"),hasFilters=!0),filters.IsUnplayed&&(queryFilters.push("IsUnplayed"),hasFilters=!0),filters.IsFavorite&&(queryFilters.push("IsFavorite"),hasFilters=!0),filters.IsResumable&&(queryFilters.push("IsResumable"),hasFilters=!0),filters.VideoTypes&&(hasFilters=!0,query.VideoTypes=filters.VideoTypes),filters.GenreIds&&(hasFilters=!0,query.GenreIds=filters.GenreIds),filters.IsHD&&(query.IsHD=!0,hasFilters=!0),filters.IsSD&&(query.IsHD=!1,hasFilters=!0),filters.Is3D&&(query.Is3D=!0,hasFilters=!0),filters.HasSubtitles&&(query.HasSubtitles=!0,hasFilters=!0),filters.HasTrailer&&(query.HasTrailer=!0,hasFilters=!0),filters.HasSpecialFeature&&(query.HasSpecialFeature=!0,hasFilters=!0),filters.HasThemeSong&&(query.HasThemeSong=!0,hasFilters=!0),filters.HasThemeVideo&&(query.HasThemeVideo=!0,hasFilters=!0),query.Filters=queryFilters.length?queryFilters.join(","):null,instance.setFilterStatus(hasFilters),instance.alphaPicker&&(query.NameStartsWithOrGreater=instance.alphaPicker.value()),query}function updateSortText(instance){var btnSortText=instance.btnSortText;if(btnSortText){for(var options=instance.getSortMenuOptions(),values=instance.getSortValues(),sortBy=values.sortBy,i=0,length=options.length;i40?(alphaPicker.classList.remove("hide"),layoutManager.tv?instance.itemsContainer.parentNode.classList.add("padded-left-withalphapicker"):instance.itemsContainer.parentNode.classList.add("padded-right-withalphapicker")):(alphaPicker.classList.add("hide"),instance.itemsContainer.parentNode.classList.remove("padded-left-withalphapicker"),instance.itemsContainer.parentNode.classList.remove("padded-right-withalphapicker"))}}}function getItems(instance,params,item,sortBy,startIndex,limit){var apiClient=connectionManager.getApiClient(params.serverId);if(instance.queryRecursive=!1,"Recordings"===params.type)return apiClient.getLiveTvRecordings(getInitialLiveTvQuery(instance,params));if("Programs"===params.type)return"true"===params.IsAiring?apiClient.getLiveTvRecommendedPrograms(getInitialLiveTvQuery(instance,params)):apiClient.getLiveTvPrograms(getInitialLiveTvQuery(instance,params));if("nextup"===params.type)return apiClient.getNextUpEpisodes(modifyQueryWithFilters(instance,{Limit:limit,Fields:"PrimaryImageAspectRatio,SeriesInfo,DateCreated,BasicSyncInfo",UserId:apiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1,SortBy:sortBy}));if(!item)return instance.queryRecursive=!0,apiClient.getItems(apiClient.getCurrentUserId(),modifyQueryWithFilters(instance,{StartIndex:startIndex,Limit:limit,Fields:"PrimaryImageAspectRatio,SortName",ImageTypeLimit:1,IncludeItemTypes:params.type,Recursive:!0,IsFavorite:"true"===params.IsFavorite||null,ArtistIds:params.artistId||null,SortBy:sortBy}));if("Genre"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type||"Studio"===item.Type||"Person"===item.Type){instance.queryRecursive=!0;var query={StartIndex:startIndex,Limit:limit,Fields:"PrimaryImageAspectRatio,SortName",Recursive:!0,parentId:params.parentId,SortBy:sortBy};return"Studio"===item.Type?query.StudioIds=item.Id:"Genre"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type?query.GenreIds=item.Id:"Person"===item.Type&&(query.PersonIds=item.Id),"MusicGenre"===item.Type?query.IncludeItemTypes="MusicAlbum":"GameGenre"===item.Type?query.IncludeItemTypes="Game":"movies"===item.CollectionType?query.IncludeItemTypes="Movie":"tvshows"===item.CollectionType?query.IncludeItemTypes="Series":"Genre"===item.Type?query.IncludeItemTypes="Movie,Series,Video":"Person"===item.Type&&(query.IncludeItemTypes=params.type),apiClient.getItems(apiClient.getCurrentUserId(),modifyQueryWithFilters(instance,query))}return apiClient.getItems(apiClient.getCurrentUserId(),modifyQueryWithFilters(instance,{StartIndex:startIndex,Limit:limit,Fields:"PrimaryImageAspectRatio,SortName",ImageTypeLimit:1,ParentId:item.Id,SortBy:sortBy}))}function getItem(params){if("Recordings"===params.type)return Promise.resolve(null);if("Programs"===params.type)return Promise.resolve(null);if("nextup"===params.type)return Promise.resolve(null);var apiClient=connectionManager.getApiClient(params.serverId),itemId=params.genreId||params.gameGenreId||params.musicGenreId||params.studioId||params.personId||params.parentId;return itemId?apiClient.getItem(apiClient.getCurrentUserId(),itemId):Promise.resolve(null)}function showViewSettingsMenu(){var instance=this;require(["viewSettings"],function(ViewSettings){(new ViewSettings).show({settingsKey:instance.getSettingsKey(),settings:instance.getViewSettings(),visibleSettings:instance.getVisibleViewSettings()}).then(function(){updateItemsContainerForViewType(instance),instance.itemsContainer.refreshItems()})})}function showFilterMenu(){var instance=this;require(["filterMenu"],function(FilterMenu){(new FilterMenu).show({settingsKey:instance.getSettingsKey(),settings:instance.getFilters(),visibleSettings:instance.getVisibleFilters(),onChange:instance.itemsContainer.refreshItems.bind(instance.itemsContainer),parentId:instance.params.parentId,itemTypes:instance.getItemTypes(),serverId:instance.params.serverId,filterMenuOptions:instance.getFilterMenuOptions()}).then(function(){instance.itemsContainer.refreshItems()})})}function showSortMenu(){var instance=this;require(["sortMenu"],function(SortMenu){(new SortMenu).show({settingsKey:instance.getSettingsKey(),settings:instance.getSortValues(),onChange:instance.itemsContainer.refreshItems.bind(instance.itemsContainer),serverId:instance.params.serverId,sortOptions:instance.getSortMenuOptions()}).then(function(){updateSortText(instance),updateAlphaPickerState(instance),instance.itemsContainer.refreshItems()})})}function onNewItemClick(){var instance=this;require(["playlistEditor"],function(playlistEditor){(new playlistEditor).show({items:[],serverId:instance.params.serverId})})}function hideOrShowAll(elems,hide){for(var i=0,length=elems.length;i!
'),btnFilter.classList.add("btnFilterWithBubble"),bubble=btnFilter.querySelector(".filterButtonBubble")}hasFilters?bubble.classList.remove("hide"):bubble.classList.add("hide")}},ItemsView.prototype.getFilterMenuOptions=function(){var params=this.params;return{IsAiring:params.IsAiring,IsMovie:params.IsMovie,IsSports:params.IsSports,IsKids:params.IsKids,IsNews:params.IsNews,IsSeries:params.IsSeries,Recursive:this.queryRecursive}},ItemsView.prototype.getVisibleViewSettings=function(){var item=(this.params,this.currentItem),fields=["showTitle"];return(!item||"PhotoAlbum"!==item.Type&&"ChannelFolderItem"!==item.Type)&&fields.push("imageType"),fields.push("viewType"),fields},ItemsView.prototype.getViewSettings=function(){var basekey=this.getSettingsKey(),params=this.params,item=this.currentItem,showTitle=userSettings.get(basekey+"-showTitle");"true"===showTitle?showTitle=!0:"false"===showTitle?showTitle=!1:"Programs"===params.type||"Recordings"===params.type||"nextup"===params.type||"Audio"===params.type||"MusicAlbum"===params.type||"MusicArtist"===params.type?showTitle=!0:item&&"PhotoAlbum"!==item.Type&&(showTitle=!0);var imageType=userSettings.get(basekey+"-imageType");return imageType||"nextup"===params.type&&(imageType="thumb"),{showTitle:showTitle,showYear:"false"!==userSettings.get(basekey+"-showYear"),imageType:imageType||"primary",viewType:userSettings.get(basekey+"-viewType")||"images"}},ItemsView.prototype.getItemTypes=function(){var params=this.params;return"nextup"===params.type?["Episode"]:"Programs"===params.type?["Program"]:[]},ItemsView.prototype.getSettingsKey=function(){var values=[];values.push("items");var params=this.params;return params.type?values.push(params.type):params.parentId&&values.push(params.parentId),params.IsAiring&&values.push("IsAiring"),params.IsMovie&&values.push("IsMovie"),params.IsKids&&values.push("IsKids"),params.IsSports&&values.push("IsSports"),params.IsNews&&values.push("IsNews"),params.IsSeries&&values.push("IsSeries"),params.IsFavorite&&values.push("IsFavorite"),params.genreId&&values.push("Genre"),params.gameGenreId&&values.push("GameGenre"),params.musicGenreId&&values.push("MusicGenre"),params.studioId&&values.push("Studio"),params.personId&&values.push("Person"),params.parentId&&values.push("Folder"),values.join("-")},ItemsView}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/livetv.html b/MediaBrowser.WebDashboard/dashboard-ui/livetv.html index 235f2f6cfd..c8d91308a2 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/livetv.html +++ b/MediaBrowser.WebDashboard/dashboard-ui/livetv.html @@ -88,12 +88,6 @@

${HeaderLatestRecordings}

-
-
-

${HeaderAllRecordings}

-
-
-
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/scripts/librarymenu.js b/MediaBrowser.WebDashboard/dashboard-ui/scripts/librarymenu.js index 18bebf8278..45090b2a42 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/scripts/librarymenu.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/scripts/librarymenu.js @@ -1 +1 @@ -define(["layoutManager","inputManager","connectionManager","events","viewManager","libraryBrowser","appRouter","apphost","playbackManager","browser","globalize","paper-icon-button-light","material-icons","scrollStyles","flexStyles"],function(layoutManager,inputManager,connectionManager,events,viewManager,libraryBrowser,appRouter,appHost,playbackManager,browser,globalize){"use strict";function getCurrentApiClient(){return currentUser&¤tUser.localUser?connectionManager.getApiClient(currentUser.localUser.ServerId):connectionManager.currentApiClient()}function lazyLoadViewMenuBarImages(){require(["imageLoader"],function(imageLoader){imageLoader.lazyChildren(skinHeader)})}function onBackClick(){appRouter.back()}function updateUserInHeader(user){var hasImage;if(user&&user.name){if(user.imageUrl){var url=user.imageUrl;user.supportsImageParams&&(url+="&height="+Math.round(26*Math.max(window.devicePixelRatio||1,2))),updateHeaderUserButton(url),hasImage=!0}headerUserButton.classList.remove("hide")}else headerUserButton.classList.add("hide");hasImage||updateHeaderUserButton(null),user&&user.localUser?(headerHomeButton&&headerHomeButton.classList.remove("hide"),headerSearchButton&&headerSearchButton.classList.remove("hide"),headerSettingsButton&&(user.localUser.Policy.IsAdministrator?headerSettingsButton.classList.remove("hide"):headerSettingsButton.classList.add("hide")),headerCastButton.classList.remove("hide")):(headerHomeButton.classList.add("hide"),headerCastButton.classList.add("hide"),headerSearchButton&&headerSearchButton.classList.add("hide"),headerSettingsButton&&headerSettingsButton.classList.add("hide")),requiresUserRefresh=!1}function updateHeaderUserButton(src){src?(headerUserButton.classList.add("headerUserButtonRound"),headerUserButton.innerHTML=''):(headerUserButton.classList.remove("headerUserButtonRound"),headerUserButton.innerHTML='')}function showSearch(){inputManager.trigger("search")}function onHeaderUserButtonClick(e){Dashboard.showUserFlyout(e.target)}function onHeaderHomeButtonClick(){Dashboard.navigate("home.html")}function bindMenuEvents(){(mainDrawerButton=document.querySelector(".mainDrawerButton"))&&mainDrawerButton.addEventListener("click",toggleMainDrawer);var headerBackButton=document.querySelector(".headerBackButton");headerBackButton&&headerBackButton.addEventListener("click",onBackClick),headerSearchButton&&headerSearchButton.addEventListener("click",showSearch),headerUserButton.addEventListener("click",onHeaderUserButtonClick),headerHomeButton.addEventListener("click",onHeaderHomeButtonClick),initHeadRoom(skinHeader),skinHeader.querySelector(".btnNotifications").addEventListener("click",function(){Dashboard.navigate("notifications.html")}),headerCastButton.addEventListener("click",onCastButtonClicked)}function onCastButtonClicked(){var btn=this;require(["playerSelectionMenu"],function(playerSelectionMenu){playerSelectionMenu.show(btn)})}function getItemHref(item,context){return appRouter.getRouteUrl(item,{context:context})}function toggleMainDrawer(){navDrawerInstance.isVisible?closeMainDrawer():openMainDrawer()}function openMainDrawer(){navDrawerInstance.open(),lastOpenTime=(new Date).getTime()}function onMainDrawerOpened(){layoutManager.mobile&&document.body.classList.add("bodyWithPopupOpen")}function closeMainDrawer(){navDrawerInstance.close()}function onMainDrawerSelect(e){navDrawerInstance.isVisible?onMainDrawerOpened():document.body.classList.remove("bodyWithPopupOpen")}function refreshLibraryInfoInDrawer(user,drawer){var html="";html+='
',html+=''+globalize.translate("ButtonHome")+"",html+='
',html+='

',html+=globalize.translate("sharedcomponents#HeaderMyDownloads"),html+="

",html+=''+globalize.translate("sharedcomponents#Browse")+"",html+=''+globalize.translate("sharedcomponents#Manage")+"",html+="
",html+='
',html+="
";var localUser=user.localUser;localUser&&localUser.Policy.IsAdministrator&&(html+='
',html+='

',html+=globalize.translate("HeaderAdmin"),html+="

",html+=''+globalize.translate("ButtonManageServer")+"",html+=''+globalize.translate("MetadataManager")+"",html+="
"),html+='
',user.localUser&&(html+=''+globalize.translate("ButtonSettings")+""),html+=''+globalize.translate("sharedcomponents#Sync")+"",Dashboard.isConnectMode()&&(html+=''+globalize.translate("ButtonSelectServer")+""),!user.localUser||user.localUser.EnableAutoLogin&&!user.connectUser||(html+=''+globalize.translate("ButtonSignOut")+""),html+="
",navDrawerScrollContainer.innerHTML=html;var lnkManageServer=navDrawerScrollContainer.querySelector(".lnkManageServer");lnkManageServer&&lnkManageServer.addEventListener("click",onManageServerClicked)}function refreshDashboardInfoInDrawer(apiClient){currentDrawerType="admin",loadNavDrawer(),navDrawerScrollContainer.querySelector(".adminDrawerLogo")?updateDashboardMenuSelectedItem():createDashboardMenu(apiClient)}function isUrlInCurrentView(url){return-1!==window.location.href.toString().toLowerCase().indexOf(url.toLowerCase())}function updateDashboardMenuSelectedItem(){for(var links=navDrawerScrollContainer.querySelectorAll(".navMenuOption"),currentViewId=viewManager.currentView().id,i=0,length=links.length;i0),selected){link.classList.add("navMenuOption-selected");var title="";link=link.querySelector("span")||link;title+=(link.innerText||link.textContent).trim(),LibraryMenu.setTitle(title)}else link.classList.remove("navMenuOption-selected")}}function createToolsMenuList(pluginItems){var links=[{name:globalize.translate("TabServer")},{name:globalize.translate("TabDashboard"),href:"dashboard.html",pageIds:["dashboardPage","serverActivityPage"],icon:"dashboard"},{name:globalize.translate("TabSettings"),href:"dashboardgeneral.html",pageIds:["dashboardGeneralPage"],icon:"settings"},{name:globalize.translate("TabUsers"),href:"userprofiles.html",pageIds:["userProfilesPage","newUserPage","editUserPage","userLibraryAccessPage","userParentalControlPage","userPasswordPage"],icon:"people"},{name:"Emby Premiere",href:"supporterkey.html",pageIds:["supporterKeyPage"],icon:"star"},{name:globalize.translate("TabLibrary"),href:"library.html",pageIds:["mediaLibraryPage","librarySettingsPage","libraryDisplayPage","metadataImagesConfigurationPage","metadataNfoPage"],icon:"folder",color:"#38c"},{name:globalize.translate("TabPlayback"),icon:"play_circle_filled",color:"#E5342E",href:"playbackconfiguration.html",pageIds:["playbackConfigurationPage","streamingSettingsPage"]},{name:globalize.translate("TabTranscoding"),icon:"transform",href:"encodingsettings.html",pageIds:["encodingSettingsPage"]}];return addPluginPagesToMainMenu(links,pluginItems,"server"),links.push({divider:!0,name:globalize.translate("TabDevices")}),links.push({name:globalize.translate("TabDevices"),href:"devices.html",pageIds:["devicesPage","devicePage"],icon:"tablet"}),links.push({name:globalize.translate("HeaderDownloadSync"),icon:"file_download",href:"syncactivity.html",pageIds:["syncActivityPage","syncJobPage","syncSettingsPage"],color:"#009688"}),links.push({name:globalize.translate("TabCameraUpload"),href:"devicesupload.html",pageIds:["devicesUploadPage"],icon:"photo_camera"}),links.push({name:globalize.translate("DLNA"),href:"dlnasettings.html",pageIds:["dlnaSettingsPage","dlnaProfilesPage","dlnaProfilePage"],icon:""}),links.push({divider:!0,name:globalize.translate("TabLiveTV")}),links.push({name:globalize.translate("TabLiveTV"),href:"livetvstatus.html",pageIds:["liveTvStatusPage","liveTvTunerPage"],icon:""}),links.push({name:globalize.translate("DVR"),href:"livetvsettings.html",pageIds:["liveTvSettingsPage"],icon:"dvr"}),links.push({divider:!0,name:globalize.translate("TabExpert")}),links.push({name:globalize.translate("TabAdvanced"),icon:"settings",href:"dashboardhosting.html",color:"#F16834",pageIds:["dashboardHostingPage","serverSecurityPage"]}),links.push({name:globalize.translate("TabLogs"),href:"log.html",pageIds:["logPage"],icon:"folder_open"}),links.push({name:globalize.translate("TabNotifications"),icon:"notifications",color:"brown",href:"notificationsettings.html",pageIds:["notificationSettingsPage","notificationSettingPage"]}),links.push({name:globalize.translate("TabPlugins"),icon:"add_shopping_cart",color:"#9D22B1",href:"plugins.html",pageIds:["pluginsPage","pluginCatalogPage"]}),links.push({name:globalize.translate("TabScheduledTasks"),href:"scheduledtasks.html",pageIds:["scheduledTasksPage","scheduledTaskPage"],icon:"schedule"}),links.push({name:globalize.translate("MetadataManager"),href:"edititemmetadata.html",pageIds:[],icon:"mode_edit"}),addPluginPagesToMainMenu(links,pluginItems),links}function addPluginPagesToMainMenu(links,pluginItems,section){for(var i=0,length=pluginItems.length;i",item.icon&&(menuHtml+=''+item.icon+""),menuHtml+="",menuHtml+=item.name,menuHtml+="",menuHtml+=""}function getToolsMenuHtml(apiClient){return getToolsMenuLinks(apiClient).then(function(items){var i,length,item,menuHtml="";for(menuHtml+='
',i=0,length=items.length;i',menuHtml+=item.name,menuHtml+="");return menuHtml+="
"})}function createDashboardMenu(apiClient){return getToolsMenuHtml(apiClient).then(function(toolsMenuHtml){var html="";html+='",html+=toolsMenuHtml,html=html.split("href=").join('onclick="return LibraryMenu.onLinkClicked(event, this);" href='),navDrawerScrollContainer.innerHTML=html,updateDashboardMenuSelectedItem()})}function onSidebarLinkClick(){var section=this.getElementsByClassName("sectionName")[0],text=section?section.innerHTML:this.innerHTML;LibraryMenu.setTitle(text)}function getUserViews(apiClient,userId){return apiClient.getUserViews({},userId).then(function(result){for(var items=result.Items,list=[],i=0,length=items.length;i',html+=globalize.translate("HeaderMedia"),html+="",html+=items.map(function(i){var icon="folder",itemId=i.Id;return"channels"==i.CollectionType?itemId="channels":"livetv"==i.CollectionType&&(itemId="livetv"),"photos"==i.CollectionType?(icon="photo_library","#009688"):"music"==i.CollectionType||"musicvideos"==i.CollectionType?(icon="library_music","#FB8521"):"books"==i.CollectionType?(icon="library_books","#1AA1E1"):"playlists"==i.CollectionType?(icon="view_list","#795548"):"games"==i.CollectionType?(icon="games","#F44336"):"movies"==i.CollectionType?(icon="video_library","#CE5043"):"channels"==i.CollectionType||"Channel"==i.Type?(icon="videocam","#E91E63"):"tvshows"==i.CollectionType?(icon="tv","#4CAF50"):"livetv"==i.CollectionType&&(icon="live_tv","#293AAE"),icon=i.icon||icon,''+icon+''+i.Name+""}).join(""),libraryMenuOptions.innerHTML=html;for(var elem=libraryMenuOptions,sidebarLinks=elem.querySelectorAll(".navMenuOption"),i=0,length=sidebarLinks.length;i200&&setTimeout(function(){closeMainDrawer(),setTimeout(function(){action?action():Dashboard.navigate(link.href)},getNavigateDelay())},50),event.stopPropagation(),event.preventDefault(),!1)},onLogoutClicked:function(){return(new Date).getTime()-lastOpenTime>200&&(closeMainDrawer(),setTimeout(function(){Dashboard.logout()},getNavigateDelay())),!1},onHardwareMenuButtonClick:function(){toggleMainDrawer()},onSettingsClicked:function(event){return 1!=event.which||(Dashboard.navigate("dashboard.html"),!1)},setTabs:function(type,selectedIndex,builder){require(["mainTabsManager"],function(mainTabsManager){type?mainTabsManager.setTabs(viewManager.currentView(),selectedIndex,builder,function(){return[]}):mainTabsManager.setTabs(null)})},setDefaultTitle:function(){pageTitleElement||(pageTitleElement=document.querySelector(".pageTitle")),pageTitleElement&&(pageTitleElement.classList.add("pageTitleWithLogo"),pageTitleElement.classList.add("pageTitleWithDefaultLogo"),pageTitleElement.style.backgroundImage=null,pageTitleElement.innerHTML=""),document.title="Emby"},setTitle:function(title){if(null==title)return void LibraryMenu.setDefaultTitle();"-"===title&&(title="");var html=title;pageTitleElement||(pageTitleElement=document.querySelector(".pageTitle")),pageTitleElement&&(pageTitleElement.classList.remove("pageTitleWithLogo"),pageTitleElement.classList.remove("pageTitleWithDefaultLogo"),pageTitleElement.style.backgroundImage=null,pageTitleElement.innerHTML=html||""),document.title=title||"Emby"},setTransparentMenu:function(transparent){transparent?skinHeader.classList.add("semiTransparent"):skinHeader.classList.remove("semiTransparent")}};var currentPageType;return pageClassOn("pagebeforeshow","page",function(e){this.classList.contains("withTabs")||LibraryMenu.setTabs(null)}),pageClassOn("pageshow","page",function(e){var page=this,isDashboardPage=page.classList.contains("type-interior"),isLibraryPage=!isDashboardPage&&page.classList.contains("libraryPage"),apiClient=getCurrentApiClient();isDashboardPage?(mainDrawerButton&&mainDrawerButton.classList.remove("hide"),refreshDashboardInfoInDrawer(apiClient)):(mainDrawerButton&&(enableLibraryNavDrawer?mainDrawerButton.classList.remove("hide"):mainDrawerButton.classList.add("hide")),"library"!==currentDrawerType&&refreshLibraryDrawer()),updateMenuForPageType(isDashboardPage,isLibraryPage),e.detail.isRestored||window.scrollTo(0,0),updateTitle(page),updateBackButton(page),updateLibraryNavLinks(page)}),function(){var html="";html+='
',html+='
',html+='",html+='',html+='',html+='

',html+="
",html+='
',html+='',html+='',html+='',html+='',html+='',layoutManager.mobile||(html+=''),html+="
",html+="
",html+='
',html+="
",skinHeader.classList.add("skinHeader-withBackground"),skinHeader.innerHTML=html,headerHomeButton=skinHeader.querySelector(".headerHomeButton"),headerUserButton=skinHeader.querySelector(".headerUserButton"),headerSettingsButton=skinHeader.querySelector(".headerSettingsButton"),headerCastButton=skinHeader.querySelector(".headerCastButton"),headerSearchButton=skinHeader.querySelector(".headerSearchButton"),browser.chrome||skinHeader.classList.add("skinHeader-blurred"),lazyLoadViewMenuBarImages(),bindMenuEvents()}(),events.on(connectionManager,"localusersignedin",function(e,user){currentDrawerType=null,currentUser={localUser:user},loadNavDrawer(),connectionManager.user(connectionManager.getApiClient(user.ServerId)).then(function(user){currentUser=user,updateUserInHeader(user)})}),events.on(connectionManager,"localusersignedout",function(){currentUser={},updateUserInHeader()}),events.on(playbackManager,"playerchange",updateCastIcon),loadNavDrawer(),LibraryMenu}); \ No newline at end of file +define(["dom","layoutManager","inputManager","connectionManager","events","viewManager","libraryBrowser","appRouter","apphost","playbackManager","browser","globalize","paper-icon-button-light","material-icons","scrollStyles","flexStyles"],function(dom,layoutManager,inputManager,connectionManager,events,viewManager,libraryBrowser,appRouter,appHost,playbackManager,browser,globalize){"use strict";function getCurrentApiClient(){return currentUser&¤tUser.localUser?connectionManager.getApiClient(currentUser.localUser.ServerId):connectionManager.currentApiClient()}function lazyLoadViewMenuBarImages(){require(["imageLoader"],function(imageLoader){imageLoader.lazyChildren(skinHeader)})}function onBackClick(){appRouter.back()}function updateUserInHeader(user){var hasImage;if(user&&user.name){if(user.imageUrl){var url=user.imageUrl;user.supportsImageParams&&(url+="&height="+Math.round(26*Math.max(window.devicePixelRatio||1,2))),updateHeaderUserButton(url),hasImage=!0}headerUserButton.classList.remove("hide")}else headerUserButton.classList.add("hide");hasImage||updateHeaderUserButton(null),user&&user.localUser?(headerHomeButton&&headerHomeButton.classList.remove("hide"),headerSearchButton&&headerSearchButton.classList.remove("hide"),headerSettingsButton&&(user.localUser.Policy.IsAdministrator?headerSettingsButton.classList.remove("hide"):headerSettingsButton.classList.add("hide")),headerCastButton.classList.remove("hide")):(headerHomeButton.classList.add("hide"),headerCastButton.classList.add("hide"),headerSearchButton&&headerSearchButton.classList.add("hide"),headerSettingsButton&&headerSettingsButton.classList.add("hide")),requiresUserRefresh=!1}function updateHeaderUserButton(src){src?(headerUserButton.classList.add("headerUserButtonRound"),headerUserButton.innerHTML=''):(headerUserButton.classList.remove("headerUserButtonRound"),headerUserButton.innerHTML='')}function showSearch(){inputManager.trigger("search")}function onHeaderUserButtonClick(e){Dashboard.navigate("mypreferencesmenu.html")}function onSettingsClick(e){Dashboard.navigate("mypreferencesmenu.html")}function onHeaderHomeButtonClick(){Dashboard.navigate("home.html")}function bindMenuEvents(){(mainDrawerButton=document.querySelector(".mainDrawerButton"))&&mainDrawerButton.addEventListener("click",toggleMainDrawer);var headerBackButton=skinHeader.querySelector(".headerBackButton");headerBackButton&&headerBackButton.addEventListener("click",onBackClick),headerSearchButton&&headerSearchButton.addEventListener("click",showSearch),headerUserButton.addEventListener("click",onHeaderUserButtonClick),headerHomeButton.addEventListener("click",onHeaderHomeButtonClick),initHeadRoom(skinHeader),skinHeader.querySelector(".btnNotifications").addEventListener("click",function(){Dashboard.navigate("notifications.html")}),headerCastButton.addEventListener("click",onCastButtonClicked),headerSettingsButton&&headerSettingsButton.addEventListener("click",onSettingsClick)}function onCastButtonClicked(){var btn=this;require(["playerSelectionMenu"],function(playerSelectionMenu){playerSelectionMenu.show(btn)})}function getItemHref(item,context){return appRouter.getRouteUrl(item,{context:context})}function toggleMainDrawer(){navDrawerInstance.isVisible?closeMainDrawer():openMainDrawer()}function openMainDrawer(){navDrawerInstance.open(),lastOpenTime=(new Date).getTime()}function onMainDrawerOpened(){layoutManager.mobile&&document.body.classList.add("bodyWithPopupOpen")}function closeMainDrawer(){navDrawerInstance.close()}function onMainDrawerSelect(e){navDrawerInstance.isVisible?onMainDrawerOpened():document.body.classList.remove("bodyWithPopupOpen")}function refreshLibraryInfoInDrawer(user,drawer){var html="";html+='
',html+=''+globalize.translate("ButtonHome")+"",html+='
',html+='

',html+=globalize.translate("sharedcomponents#HeaderMyDownloads"),html+="

",html+=''+globalize.translate("sharedcomponents#Browse")+"",html+=''+globalize.translate("sharedcomponents#Manage")+"",html+="
",html+='
',html+="
";var localUser=user.localUser;localUser&&localUser.Policy.IsAdministrator&&(html+='
',html+='

',html+=globalize.translate("HeaderAdmin"),html+="

",html+=''+globalize.translate("ButtonManageServer")+"",html+=''+globalize.translate("MetadataManager")+"",html+="
"),html+='
',user.localUser&&(html+=''+globalize.translate("ButtonSettings")+""),html+=''+globalize.translate("sharedcomponents#Sync")+"",Dashboard.isConnectMode()&&(html+=''+globalize.translate("ButtonSelectServer")+""),!user.localUser||user.localUser.EnableAutoLogin&&!user.connectUser||(html+=''+globalize.translate("ButtonSignOut")+""),html+="
",navDrawerScrollContainer.innerHTML=html;var btnLogout=navDrawerScrollContainer.querySelector(".btnLogout");btnLogout&&btnLogout.addEventListener("click",onLogoutClick)}function refreshDashboardInfoInDrawer(apiClient){currentDrawerType="admin",loadNavDrawer(),navDrawerScrollContainer.querySelector(".adminDrawerLogo")?updateDashboardMenuSelectedItem():createDashboardMenu(apiClient)}function isUrlInCurrentView(url){return-1!==window.location.href.toString().toLowerCase().indexOf(url.toLowerCase())}function updateDashboardMenuSelectedItem(){for(var links=navDrawerScrollContainer.querySelectorAll(".navMenuOption"),currentViewId=viewManager.currentView().id,i=0,length=links.length;i0),selected){link.classList.add("navMenuOption-selected");var title="";link=link.querySelector("span")||link;title+=(link.innerText||link.textContent).trim(),LibraryMenu.setTitle(title)}else link.classList.remove("navMenuOption-selected")}}function createToolsMenuList(pluginItems){var links=[{name:globalize.translate("TabServer")},{name:globalize.translate("TabDashboard"),href:"dashboard.html",pageIds:["dashboardPage","serverActivityPage"],icon:"dashboard"},{name:globalize.translate("TabSettings"),href:"dashboardgeneral.html",pageIds:["dashboardGeneralPage"],icon:"settings"},{name:globalize.translate("TabUsers"),href:"userprofiles.html",pageIds:["userProfilesPage","newUserPage","editUserPage","userLibraryAccessPage","userParentalControlPage","userPasswordPage"],icon:"people"},{name:"Emby Premiere",href:"supporterkey.html",pageIds:["supporterKeyPage"],icon:"star"},{name:globalize.translate("TabLibrary"),href:"library.html",pageIds:["mediaLibraryPage","librarySettingsPage","libraryDisplayPage","metadataImagesConfigurationPage","metadataNfoPage"],icon:"folder",color:"#38c"},{name:globalize.translate("TabPlayback"),icon:"play_circle_filled",color:"#E5342E",href:"playbackconfiguration.html",pageIds:["playbackConfigurationPage","streamingSettingsPage"]},{name:globalize.translate("TabTranscoding"),icon:"transform",href:"encodingsettings.html",pageIds:["encodingSettingsPage"]}];return addPluginPagesToMainMenu(links,pluginItems,"server"),links.push({divider:!0,name:globalize.translate("TabDevices")}),links.push({name:globalize.translate("TabDevices"),href:"devices.html",pageIds:["devicesPage","devicePage"],icon:"tablet"}),links.push({name:globalize.translate("HeaderDownloadSync"),icon:"file_download",href:"syncactivity.html",pageIds:["syncActivityPage","syncJobPage","syncSettingsPage"],color:"#009688"}),links.push({name:globalize.translate("TabCameraUpload"),href:"devicesupload.html",pageIds:["devicesUploadPage"],icon:"photo_camera"}),links.push({name:globalize.translate("DLNA"),href:"dlnasettings.html",pageIds:["dlnaSettingsPage","dlnaProfilesPage","dlnaProfilePage"],icon:""}),links.push({divider:!0,name:globalize.translate("TabLiveTV")}),links.push({name:globalize.translate("TabLiveTV"),href:"livetvstatus.html",pageIds:["liveTvStatusPage","liveTvTunerPage"],icon:""}),links.push({name:globalize.translate("DVR"),href:"livetvsettings.html",pageIds:["liveTvSettingsPage"],icon:"dvr"}),links.push({divider:!0,name:globalize.translate("TabExpert")}),links.push({name:globalize.translate("TabAdvanced"),icon:"settings",href:"dashboardhosting.html",color:"#F16834",pageIds:["dashboardHostingPage","serverSecurityPage"]}),links.push({name:globalize.translate("TabLogs"),href:"log.html",pageIds:["logPage"],icon:"folder_open"}),links.push({name:globalize.translate("TabNotifications"),icon:"notifications",color:"brown",href:"notificationsettings.html",pageIds:["notificationSettingsPage","notificationSettingPage"]}),links.push({name:globalize.translate("TabPlugins"),icon:"add_shopping_cart",color:"#9D22B1",href:"plugins.html",pageIds:["pluginsPage","pluginCatalogPage"]}),links.push({name:globalize.translate("TabScheduledTasks"),href:"scheduledtasks.html",pageIds:["scheduledTasksPage","scheduledTaskPage"],icon:"schedule"}),links.push({name:globalize.translate("MetadataManager"),href:"edititemmetadata.html",pageIds:[],icon:"mode_edit"}),addPluginPagesToMainMenu(links,pluginItems),links}function addPluginPagesToMainMenu(links,pluginItems,section){for(var i=0,length=pluginItems.length;i",item.icon&&(menuHtml+=''+item.icon+""),menuHtml+="",menuHtml+=item.name,menuHtml+="",menuHtml+=""}function getToolsMenuHtml(apiClient){return getToolsMenuLinks(apiClient).then(function(items){var i,length,item,menuHtml="";for(menuHtml+='
',i=0,length=items.length;i',menuHtml+=item.name,menuHtml+="");return menuHtml+="
"})}function createDashboardMenu(apiClient){return getToolsMenuHtml(apiClient).then(function(toolsMenuHtml){var html="";html+='",html+=toolsMenuHtml,navDrawerScrollContainer.innerHTML=html,updateDashboardMenuSelectedItem()})}function onSidebarLinkClick(){var section=this.getElementsByClassName("sectionName")[0],text=section?section.innerHTML:this.innerHTML;LibraryMenu.setTitle(text)}function getUserViews(apiClient,userId){return apiClient.getUserViews({},userId).then(function(result){for(var items=result.Items,list=[],i=0,length=items.length;i',html+=globalize.translate("HeaderMedia"),html+="",html+=items.map(function(i){var icon="folder",itemId=i.Id;"channels"==i.CollectionType?itemId="channels":"livetv"==i.CollectionType&&(itemId="livetv"),"photos"==i.CollectionType?icon="photo_library":"music"==i.CollectionType||"musicvideos"==i.CollectionType?icon="library_music":"books"==i.CollectionType?icon="library_books":"playlists"==i.CollectionType?icon="view_list":"games"==i.CollectionType?icon="games":"movies"==i.CollectionType?icon="video_library":"channels"==i.CollectionType||"Channel"==i.Type?icon="videocam":"tvshows"==i.CollectionType?icon="tv":"livetv"==i.CollectionType&&(icon="live_tv"),icon=i.icon||icon;i.onclick&&i.onclick;return''+icon+''+i.Name+""}).join(""),libraryMenuOptions.innerHTML=html;for(var elem=libraryMenuOptions,sidebarLinks=elem.querySelectorAll(".navMenuOption"),i=0,length=sidebarLinks.length;i",html+='',html+='',html+='

',html+="
",html+='
',html+='',html+='',html+='',html+='',html+='',layoutManager.mobile||(html+=''),html+="
",html+="
",html+='
',html+="
",skinHeader.classList.add("skinHeader-withBackground"),skinHeader.innerHTML=html,headerHomeButton=skinHeader.querySelector(".headerHomeButton"),headerUserButton=skinHeader.querySelector(".headerUserButton"),headerSettingsButton=skinHeader.querySelector(".headerSettingsButton"),headerCastButton=skinHeader.querySelector(".headerCastButton"),headerSearchButton=skinHeader.querySelector(".headerSearchButton"),browser.chrome||skinHeader.classList.add("skinHeader-blurred"),lazyLoadViewMenuBarImages(),bindMenuEvents()}(),events.on(connectionManager,"localusersignedin",function(e,user){currentDrawerType=null,currentUser={localUser:user},loadNavDrawer(),connectionManager.user(connectionManager.getApiClient(user.ServerId)).then(function(user){currentUser=user,updateUserInHeader(user)})}),events.on(connectionManager,"localusersignedout",function(){currentUser={},updateUserInHeader()}),events.on(playbackManager,"playerchange",updateCastIcon),loadNavDrawer(),LibraryMenu}); \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/dashboard-ui/scripts/site.js b/MediaBrowser.WebDashboard/dashboard-ui/scripts/site.js index eec0248173..58cf40afee 100644 --- a/MediaBrowser.WebDashboard/dashboard-ui/scripts/site.js +++ b/MediaBrowser.WebDashboard/dashboard-ui/scripts/site.js @@ -1,2 +1,2 @@ -function getWindowLocationSearch(win){"use strict";var search=(win||window).location.search;if(!search){var index=window.location.href.indexOf("?");-1!=index&&(search=window.location.href.substring(index))}return search||""}function getParameterByName(name,url){"use strict";name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+name+"=([^&#]*)",regex=new RegExp(regexS,"i"),results=regex.exec(url||getWindowLocationSearch());return null==results?"":decodeURIComponent(results[1].replace(/\+/g," "))}function pageClassOn(eventName,className,fn){"use strict";document.addEventListener(eventName,function(e){var target=e.target;target.classList.contains(className)&&fn.call(target,e)})}function pageIdOn(eventName,id,fn){"use strict";document.addEventListener(eventName,function(e){var target=e.target;target.id===id&&fn.call(target,e)})}var Dashboard={isConnectMode:function(){if(AppInfo.isNativeApp)return!0;var url=window.location.href.toLowerCase();return-1!=url.indexOf("mediabrowser.tv")||-1!=url.indexOf("emby.media")},allowPluginPages:function(pluginId){var allowedPluginConfigs=["b0daa30f-2e09-4083-a6ce-459d9fecdd80","de228f12-e43e-4bd9-9fc0-2830819c3b92","899c12c7-5b40-4c4e-9afd-afd74a685eb1","14f5f69e-4c8d-491b-8917-8e90e8317530","02528C96-F727-44D7-BE87-9EEF040758C3","dc372f99-4e0e-4c6b-8c18-2b887ca4530c","830fc68f-b964-4d2f-b139-48e22cd143c","b9f0c474-e9a8-4292-ae41-eb3c1542f4cd","7cfbb821-e8fd-40ab-b64e-a7749386a6b2","4C2FDA1C-FD5E-433A-AD2B-718E0B73E9A9","cd5a19be-7676-48ef-b64f-a17c98f2b889","b2ff6a63-303a-4a84-b937-6e12f87e3eb9","0277E613-3EC0-4360-A3DE-F8AF0AABB5E9","9464BD84-D30D-4404-B2AD-DFF4E12D5FC5","9574ac10-bf23-49bc-949f-924f23cfa48f","66fd72a4-7e8e-4f22-8d1c-022ce4b9b0d5","4DCB591C-0FA2-4C5D-A7E5-DABE37164C8B","8e791e2a-058a-4b12-8493-8bf69d92d685","577f89eb-58a7-4013-be06-9a970ddb1377","6153FDF0-40CC-4457-8730-3B4A19512BAE","de228f12-e43e-4bd9-9fc0-2830819c3b92","6C3B6965-C257-47C2-AA02-64457AE21D91","2FE79C34-C9DC-4D94-9DF2-2F3F36764414","0417264b-5a93-4ad0-a1f0-b87569b7cf80","e711475e-efad-431b-8527-033ba9873a34","AB95885A-1D0E-445E-BDBF-80C1912C98C5","F015EA06-B413-47F1-BF15-F049A799658B","986a7283-205a-4436-862d-23135c067f8a","8abc6789-fde2-4705-8592-4028806fa343","2850d40d-9c66-4525-aa46-968e8ef04e97"].map(function(i){return i.toLowerCase()});return!(AppInfo.isNativeApp&&-1===allowedPluginConfigs.indexOf((pluginId||"").toLowerCase()))},getCurrentUser:function(){return window.ApiClient.getCurrentUser(!1)},serverAddress:function(){if(Dashboard.isConnectMode()){var apiClient=window.ApiClient;return apiClient?apiClient.serverAddress():null}var urlLower=window.location.href.toLowerCase(),index=urlLower.lastIndexOf("/web");if(-1!=index)return urlLower.substring(0,index);var loc=window.location,address=loc.protocol+"//"+loc.hostname;return loc.port&&(address+=":"+loc.port),address},getCurrentUserId:function(){var apiClient=window.ApiClient;return apiClient?apiClient.getCurrentUserId():null},onServerChanged:function(userId,accessToken,apiClient){apiClient=apiClient||window.ApiClient,window.ApiClient=apiClient},logout:function(logoutWithServer){function onLogoutDone(){var loginPage;Dashboard.isConnectMode()?(loginPage="connectlogin.html",window.ApiClient=null):loginPage="login.html",Dashboard.navigate(loginPage)}!1===logoutWithServer?onLogoutDone():ConnectionManager.logout().then(onLogoutDone)},getConfigurationPageUrl:function(name){return Dashboard.isConnectMode()?"configurationpageext?name="+encodeURIComponent(name):"configurationpage?name="+encodeURIComponent(name)},getConfigurationResourceUrl:function(name){return Dashboard.isConnectMode()?ApiClient.getUrl("web/ConfigurationPage",{name:name}):Dashboard.getConfigurationPageUrl(name)},navigate:function(url,preserveQueryString){if(!url)throw new Error("url cannot be null or empty");var queryString=getWindowLocationSearch();return preserveQueryString&&queryString&&(url+=queryString),new Promise(function(resolve,reject){require(["appRouter"],function(appRouter){return appRouter.show(url).then(resolve,reject)})})},processPluginConfigurationUpdateResult:function(){require(["loading","toast"],function(loading,toast){loading.hide(),toast(Globalize.translate("MessageSettingsSaved"))})},processServerConfigurationUpdateResult:function(result){require(["loading","toast"],function(loading,toast){loading.hide(),toast(Globalize.translate("MessageSettingsSaved"))})},processErrorResponse:function(response){require(["loading"],function(loading){loading.hide()});var status=""+response.status;response.statusText&&(status=response.statusText),Dashboard.alert({title:status,message:response.headers?response.headers.get("X-Application-Error-Code"):null})},alert:function(options){if("string"==typeof options)return void require(["toast"],function(toast){toast({text:options})});require(["alert"],function(alert){alert({title:options.title||Globalize.translate("HeaderAlert"),text:options.message}).then(options.callback||function(){})})},restartServer:function(){var apiClient=window.ApiClient;apiClient&&require(["serverRestartDialog","events"],function(ServerRestartDialog,events){var dialog=new ServerRestartDialog({apiClient:apiClient});events.on(dialog,"restarted",function(){Dashboard.isConnectMode()?apiClient.ensureWebSocket():window.location.reload(!0)}),dialog.show()})},showUserFlyout:function(){Dashboard.navigate("mypreferencesmenu.html")},capabilities:function(appHost){var caps={PlayableMediaTypes:["Audio","Video"],SupportedCommands:["MoveUp","MoveDown","MoveLeft","MoveRight","PageUp","PageDown","PreviousLetter","NextLetter","ToggleOsd","ToggleContextMenu","Select","Back","SendKey","SendString","GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","ChannelUp","ChannelDown","PlayMediaSource","PlayTrailers"],SupportsPersistentIdentifier:"cordova"===self.appMode||"android"===self.appMode,SupportsMediaControl:!0};caps.SupportsSync=appHost.supports("sync"),caps.SupportsContentUploading=appHost.supports("cameraupload");appHost.getPushTokenInfo();return caps=Object.assign(caps,appHost.getPushTokenInfo())}},AppInfo={};!function(){"use strict";function initializeApiClient(apiClient){"cordova"!==self.appMode&&"android"!==self.appMode||(apiClient.getAvailablePlugins=function(){return Promise.resolve([])})}function onApiClientCreated(e,newApiClient){initializeApiClient(newApiClient),window.$&&($.ajax=newApiClient.ajax)}function defineConnectionManager(connectionManager){window.ConnectionManager=connectionManager,define("connectionManager",[],function(){return connectionManager})}function bindConnectionManagerEvents(connectionManager,events,userSettings){window.Events=events,events.on(ConnectionManager,"apiclientcreated",onApiClientCreated),connectionManager.currentApiClient=function(){if(!localApiClient){var server=connectionManager.getLastUsedServer();server&&(localApiClient=connectionManager.getApiClient(server.Id))}return localApiClient},connectionManager.onLocalUserSignedIn=function(user){return localApiClient=connectionManager.getApiClient(user.ServerId),window.ApiClient=localApiClient,userSettings.setUserInfo(user.Id,localApiClient)},events.on(connectionManager,"localusersignedout",function(){userSettings.setUserInfo(null,null)})}function createConnectionManager(){return new Promise(function(resolve,reject){require(["connectionManagerFactory","apphost","credentialprovider","events","userSettings"],function(ConnectionManager,apphost,credentialProvider,events,userSettings){var credentialProviderInstance=new credentialProvider,promises=[apphost.getSyncProfile(),apphost.init()];Promise.all(promises).then(function(responses){var deviceProfile=responses[0],capabilities=Dashboard.capabilities(apphost);capabilities.DeviceProfile=deviceProfile;var connectionManager=new ConnectionManager(credentialProviderInstance,apphost.appName(),apphost.appVersion(),apphost.deviceName(),apphost.deviceId(),capabilities,window.devicePixelRatio);if(defineConnectionManager(connectionManager),bindConnectionManagerEvents(connectionManager,events,userSettings),!Dashboard.isConnectMode())return console.log("loading ApiClient singleton"),getRequirePromise(["apiclient"]).then(function(apiClientFactory){console.log("creating ApiClient singleton");var apiClient=new apiClientFactory(Dashboard.serverAddress(),apphost.appName(),apphost.appVersion(),apphost.deviceName(),apphost.deviceId(),window.devicePixelRatio);apiClient.enableAutomaticNetworking=!1,connectionManager.addApiClient(apiClient),window.ApiClient=apiClient,localApiClient=apiClient,console.log("loaded ApiClient singleton"),resolve()});resolve()})})})}function returnFirstDependency(obj){return obj}function getSettingsBuilder(UserSettings,layoutManager,browser){return UserSettings.prototype.enableThemeVideos=function(val){return null!=val?this.set("enableThemeVideos",val.toString(),!1):(val=this.get("enableThemeVideos",!1),val?"false"!==val:!layoutManager.mobile&&!browser.slow)},UserSettings}function getBowerPath(){return"bower_components"}function getPlaybackManager(playbackManager){return window.addEventListener("beforeunload",function(e){try{playbackManager.onAppClose()}catch(err){console.log("error in onAppClose: "+err)}}),playbackManager}function getLayoutManager(layoutManager,appHost){return appHost.getDefaultLayout&&(layoutManager.defaultLayout=appHost.getDefaultLayout()),layoutManager.init(),layoutManager}function getAppStorage(basePath){try{return localStorage.setItem("_test","0"),localStorage.removeItem("_test"),basePath+"/appstorage-localstorage"}catch(e){return basePath+"/appstorage-memory"}}function createWindowHeadroom(Headroom){var headroom=new Headroom([],{});return headroom.init(),headroom}function getCastSenderApiLoader(){var ccLoaded=!1;return{load:function(){return ccLoaded?Promise.resolve():new Promise(function(resolve,reject){var fileref=document.createElement("script");fileref.setAttribute("type","text/javascript"),fileref.onload=function(){ccLoaded=!0,resolve()},fileref.setAttribute("src","https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"),document.querySelector("head").appendChild(fileref)})}}}function getDummyCastSenderApiLoader(){return{load:function(){return window.chrome=window.chrome||{},Promise.resolve()}}}function createSharedAppFooter(appFooter){return new appFooter({})}function onRequireJsError(requireType,requireModules){console.log("RequireJS error: "+(requireType||"unknown")+". Failed modules: "+(requireModules||[]).join(","))}function defineResizeObserver(){self.ResizeObserver?define("ResizeObserver",[],function(){return self.ResizeObserver}):define("ResizeObserver",["bower_components/emby-webcomponents/resize-observer-polyfill/ResizeObserver"],returnFirstDependency)}function initRequireWithBrowser(browser){var bowerPath=getBowerPath(),apiClientBowerPath=bowerPath+"/emby-apiclient",embyWebComponentsBowerPath=bowerPath+"/emby-webcomponents";"android"===self.appMode?define("iapManager",["cordova/iap"],returnFirstDependency):"cordova"===self.appMode?define("iapManager",["cordova/iap"],returnFirstDependency):define("iapManager",["components/iap"],returnFirstDependency),"android"===self.appMode?(define("filesystem",["cordova/filesystem"],returnFirstDependency),define("cameraRoll",["cordova/cameraroll"],returnFirstDependency)):(define("filesystem",[embyWebComponentsBowerPath+"/filesystem"],returnFirstDependency),define("cameraRoll",[apiClientBowerPath+"/cameraroll"],returnFirstDependency)),window.IntersectionObserver&&!browser.edge?define("lazyLoader",[embyWebComponentsBowerPath+"/lazyloader/lazyloader-intersectionobserver"],returnFirstDependency):define("lazyLoader",[embyWebComponentsBowerPath+"/lazyloader/lazyloader-scroll"],returnFirstDependency),"android"===self.appMode?define("shell",["cordova/shell"],returnFirstDependency):define("shell",[embyWebComponentsBowerPath+"/shell"],returnFirstDependency),"cordova"===self.appMode||"android"===self.appMode?(define("apiclientcore",["bower_components/emby-apiclient/apiclient"],returnFirstDependency),define("apiclient",["bower_components/emby-apiclient/apiclientex"],returnFirstDependency)):(self.appMode,define("apiclient",["bower_components/emby-apiclient/apiclient"],returnFirstDependency)),"cordova"===self.appMode||"android"===self.appMode?define("wakeOnLan",["cordova/wakeonlan"],returnFirstDependency):define("wakeOnLan",["bower_components/emby-apiclient/wakeonlan"],returnFirstDependency),define("actionsheet",["webActionSheet"],returnFirstDependency),"registerElement"in document?define("registerElement",[]):browser.msie?define("registerElement",[bowerPath+"/webcomponentsjs/webcomponents-lite.min.js"],returnFirstDependency):define("registerElement",[bowerPath+"/document-register-element/build/document-register-element"],returnFirstDependency),"android"===self.appMode?define("serverdiscovery",["cordova/serverdiscovery"],returnFirstDependency):"cordova"===self.appMode?define("serverdiscovery",["cordova/serverdiscovery"],returnFirstDependency):define("serverdiscovery",[apiClientBowerPath+"/serverdiscovery"],returnFirstDependency),"cordova"===self.appMode&&browser.iOSVersion&&browser.iOSVersion<11?define("imageFetcher",["cordova/imagestore"],returnFirstDependency):define("imageFetcher",[embyWebComponentsBowerPath+"/images/basicimagefetcher"],returnFirstDependency);var preferNativeAlerts=browser.tv;preferNativeAlerts&&window.alert?define("alert",[embyWebComponentsBowerPath+"/alert/nativealert"],returnFirstDependency):define("alert",[embyWebComponentsBowerPath+"/alert/alert"],returnFirstDependency),defineResizeObserver(),define("dialog",[embyWebComponentsBowerPath+"/dialog/dialog"],returnFirstDependency),preferNativeAlerts&&window.confirm?define("confirm",[embyWebComponentsBowerPath+"/confirm/nativeconfirm"],returnFirstDependency):define("confirm",[embyWebComponentsBowerPath+"/confirm/confirm"],returnFirstDependency),(preferNativeAlerts||browser.xboxOne)&&window.confirm?define("prompt",[embyWebComponentsBowerPath+"/prompt/nativeprompt"],returnFirstDependency):define("prompt",[embyWebComponentsBowerPath+"/prompt/prompt"],returnFirstDependency),browser.tizen||browser.operaTv||browser.chromecast||browser.orsay||browser.web0s||browser.ps4?define("loading",[embyWebComponentsBowerPath+"/loading/loading-legacy"],returnFirstDependency):define("loading",[embyWebComponentsBowerPath+"/loading/loading-lite"],returnFirstDependency),define("multi-download",[embyWebComponentsBowerPath+"/multidownload"],returnFirstDependency),"android"===self.appMode?define("fileDownloader",["cordova/filedownloader"],returnFirstDependency):define("fileDownloader",[embyWebComponentsBowerPath+"/filedownloader"],returnFirstDependency),define("localassetmanager",[apiClientBowerPath+"/localassetmanager"],returnFirstDependency),"cordova"===self.appMode||"android"===self.appMode?define("castSenderApiLoader",[],getDummyCastSenderApiLoader):define("castSenderApiLoader",[],getCastSenderApiLoader),self.Windows?(define("bgtaskregister",["environments/windows-uwp/bgtaskregister"],returnFirstDependency),define("transfermanager",["environments/windows-uwp/transfermanager"],returnFirstDependency),define("filerepository",["environments/windows-uwp/filerepository"],returnFirstDependency)):"cordova"===self.appMode?(define("filerepository",["cordova/filerepository"],returnFirstDependency),define("transfermanager",["filerepository"],returnFirstDependency)):"android"===self.appMode?(define("transfermanager",["cordova/transfermanager"],returnFirstDependency),define("filerepository",["cordova/filerepository"],returnFirstDependency)):(define("transfermanager",[apiClientBowerPath+"/sync/transfermanager"],returnFirstDependency),define("filerepository",[apiClientBowerPath+"/sync/filerepository"],returnFirstDependency)),"android"===self.appMode?define("localsync",["cordova/localsync"],returnFirstDependency):define("localsync",[apiClientBowerPath+"/sync/localsync"],returnFirstDependency)}function getRequirePromise(deps){return new Promise(function(resolve,reject){require(deps,resolve)})}function init(){"android"===self.appMode&&define("nativedirectorychooser",["cordova/nativedirectorychooser"],returnFirstDependency),define("livetvcss",["css!css/livetv.css"],returnFirstDependency),define("detailtablecss",["css!css/detailtable.css"],returnFirstDependency),define("buttonenabled",["legacy/buttonenabled"],returnFirstDependency);var list=[];window.fetch||list.push("fetch"),"function"!=typeof Object.assign&&list.push("objectassign"),Array.prototype.filter||list.push("arraypolyfills"),Function.prototype.bind||list.push("functionbind"),window.requestAnimationFrame||list.push("raf"),require(list,function(){createConnectionManager().then(function(){console.log("initAfterDependencies promises resolved"),require(["globalize"],function(globalize){window.Globalize=globalize,Promise.all([loadCoreDictionary(globalize),loadSharedComponentsDictionary(globalize)]).then(onGlobalizeInit)})})})}function loadSharedComponentsDictionary(globalize){var languages=["ar","be-by","bg-bg","ca","cs","da","de","el","en-gb","en-us","es-ar","es-mx","es","fi","fr","gsw","he","hr","hu","id","it","kk","ko","lt-lt","ms","nb","nl","pl","pt-br","pt-pt","ro","ru","sk","sl-si","sv","tr","uk","vi","zh-cn","zh-hk","zh-tw"],translations=languages.map(function(i){return{lang:i,path:"bower_components/emby-webcomponents/strings/"+i+".json"}});globalize.loadStrings({name:"sharedcomponents",translations:translations})}function loadCoreDictionary(globalize){var languages=["ar","be-BY","bg-BG","ca","cs","da","de","el","en-GB","en-US","es","es-AR","es-MX","fa","fi","fr","fr-CA","gsw","he","hi-IN","hr","hu","id","it","kk","ko","lt-LT","ms","nb","nl","pl","pt-BR","pt-PT","ro","ru","sk","sl-SI","sv","tr","uk","vi","zh-CN","zh-HK","zh-TW"],translations=languages.map(function(i){return{lang:i,path:"strings/"+i+".json"}});return globalize.defaultModule("core"),globalize.loadStrings({name:"core",translations:translations})}function onGlobalizeInit(){document.title=Globalize.translateDocument(document.title,"core");var deps=["apphost"];browserInfo.tv&&!browserInfo.android?(console.log("Using system fonts with explicit sizes"),deps.push("systemFontsSizedCss")):(console.log("Using default fonts"),deps.push("systemFontsCss")),deps.push("css!css/librarybrowser"),require(deps,function(appHost){loadPlugins([],appHost,browserInfo).then(onAppReady)})}function defineRoute(newRoute,dictionary){var baseRoute=Emby.Page.baseUrl(),path=newRoute.path;path=path.replace(baseRoute,""),console.log("Defining route: "+path),newRoute.dictionary=newRoute.dictionary||dictionary||"core",Emby.Page.addRoute(path,newRoute)}function defineCoreRoutes(appHost){console.log("Defining core routes"),defineRoute({path:"/addplugin.html",dependencies:[],autoFocus:!1,roles:"admin",controller:"scripts/addpluginpage"}),defineRoute({path:"/appservices.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/autoorganizelog.html",dependencies:[],roles:"admin"}),defineRoute({path:"/channelsettings.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/connectlogin.html",dependencies:["emby-button","emby-input"],autoFocus:!1,anonymous:!0,startup:!0,controller:"scripts/connectlogin"}),defineRoute({path:"/dashboard.html",dependencies:[],autoFocus:!1,roles:"admin",controller:"scripts/dashboardpage"}),defineRoute({path:"/dashboardgeneral.html",controller:"dashboard/dashboardgeneral",autoFocus:!1,roles:"admin"}),defineRoute({path:"/dashboardhosting.html",dependencies:["emby-input","emby-button"],autoFocus:!1,roles:"admin",controller:"dashboard/dashboardhosting"}),defineRoute({path:"/device.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/devices.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/devicesupload.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/dlnaprofile.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/dlnaprofiles.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/dlnaserversettings.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/dlnasettings.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/edititemmetadata.html",dependencies:[],controller:"scripts/edititemmetadata",autoFocus:!1}),defineRoute({path:"/encodingsettings.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/forgotpassword.html",dependencies:["emby-input","emby-button"],anonymous:!0,startup:!0,controller:"scripts/forgotpassword"}),defineRoute({path:"/forgotpasswordpin.html",dependencies:["emby-input","emby-button"],autoFocus:!1,anonymous:!0,startup:!0,controller:"scripts/forgotpasswordpin"}),defineRoute({path:"/home.html",dependencies:[],autoFocus:!1,controller:"home/home",transition:"fade",type:"home"}),defineRoute({path:"/list.html",dependencies:[],autoFocus:!1,controller:"list/list",transition:"fade"}),defineRoute({path:"/index.html",dependencies:[],autoFocus:!1,isDefaultRoute:!0}),defineRoute({path:"/itemdetails.html",dependencies:["emby-button","scripts/livetvcomponents","paper-icon-button-light","emby-itemscontainer"],controller:"scripts/itemdetailpage",autoFocus:!1,transition:"fade"}),defineRoute({path:"/library.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/librarydisplay.html",dependencies:[],autoFocus:!1,roles:"admin",controller:"dashboard/librarydisplay"}),defineRoute({path:"/librarysettings.html",dependencies:["emby-collapse","emby-input","emby-button","emby-select"],autoFocus:!1,roles:"admin",controller:"dashboard/librarysettings"}),defineRoute({path:"/livetv.html",dependencies:["emby-button","livetvcss"],controller:"scripts/livetvsuggested",autoFocus:!1,transition:"fade"}),defineRoute({path:"/livetvguideprovider.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/livetvseriestimer.html",dependencies:["emby-checkbox","emby-input","emby-button","emby-collapse","scripts/livetvcomponents","scripts/livetvseriestimer","livetvcss"],autoFocus:!1,controller:"scripts/livetvseriestimer"}),defineRoute({path:"/livetvsettings.html",dependencies:[],autoFocus:!1}),defineRoute({path:"/livetvstatus.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/livetvtuner.html",dependencies:[],autoFocus:!1,roles:"admin",controller:"dashboard/livetvtuner"}),defineRoute({path:"/log.html",dependencies:["emby-checkbox"],roles:"admin",controller:"dashboard/logpage"}),defineRoute({path:"/login.html",dependencies:["emby-button","emby-input"],autoFocus:!1,anonymous:!0,startup:!0,controller:"scripts/loginpage"}),defineRoute({path:"/metadataadvanced.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/metadataimages.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/metadatanfo.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/movies.html",dependencies:["emby-button"],autoFocus:!1,controller:"scripts/moviesrecommended",transition:"fade"}),defineRoute({path:"/music.html",dependencies:[],controller:"scripts/musicrecommended",autoFocus:!1,transition:"fade"}),defineRoute({path:"/mypreferencesdisplay.html",dependencies:["emby-checkbox","emby-button","emby-select"],autoFocus:!1,transition:"fade",controller:"scripts/mypreferencesdisplay"}),defineRoute({path:"/mypreferenceshome.html",dependencies:[],autoFocus:!1,transition:"fade",controller:"scripts/mypreferenceshome"}),defineRoute({path:"/mypreferencessubtitles.html",dependencies:[],autoFocus:!1,transition:"fade",controller:"scripts/mypreferencessubtitles"}),defineRoute({path:"/mypreferenceslanguages.html",dependencies:["emby-button","emby-checkbox","emby-select"],autoFocus:!1,transition:"fade",controller:"scripts/mypreferenceslanguages"}),defineRoute({path:"/mypreferencesmenu.html",dependencies:["emby-button"],autoFocus:!1,transition:"fade",controller:"scripts/mypreferencescommon"}),defineRoute({path:"/myprofile.html",dependencies:["emby-button","emby-collapse","emby-checkbox","emby-input"],autoFocus:!1,transition:"fade",controller:"scripts/myprofile"}),defineRoute({path:"/offline/offline.html",transition:"fade",controller:"offline/offline",dependencies:[],anonymous:!0,startup:!1}),defineRoute({path:"/managedownloads.html",transition:"fade",controller:"scripts/managedownloads",dependencies:[]}),defineRoute({path:"/mysync.html",dependencies:[],autoFocus:!1,transition:"fade",controller:"scripts/mysync"}),defineRoute({path:"/camerauploadsettings.html",dependencies:[],autoFocus:!1,transition:"fade",controller:"scripts/camerauploadsettings"}),defineRoute({path:"/mysyncjob.html",dependencies:[],autoFocus:!1,transition:"fade",controller:"scripts/syncjob"}),defineRoute({path:"/mysyncsettings.html",dependencies:["emby-checkbox","emby-input","emby-button","paper-icon-button-light"],autoFocus:!1,transition:"fade",controller:"scripts/mysyncsettings"}),defineRoute({path:"/notifications.html",dependencies:[],autoFocus:!1,controller:"scripts/notifications"}),defineRoute({path:"/notificationsetting.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/notificationsettings.html",controller:"scripts/notificationsettings",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/nowplaying.html",dependencies:["paper-icon-button-light","emby-slider","emby-button","emby-input","emby-itemscontainer"],controller:"scripts/nowplayingpage",autoFocus:!1,transition:"fade",fullscreen:!0,supportsThemeMedia:!0,enableMediaControl:!1}),defineRoute({path:"/playbackconfiguration.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/plugincatalog.html",dependencies:[],autoFocus:!1,roles:"admin",controller:"scripts/plugincatalogpage"}),defineRoute({path:"/plugins.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/scheduledtask.html",dependencies:[],autoFocus:!1,roles:"admin",controller:"scripts/scheduledtaskpage"}),defineRoute({path:"/scheduledtasks.html",dependencies:[],autoFocus:!1,roles:"admin",controller:"scripts/scheduledtaskspage"}),defineRoute({path:"/search.html",dependencies:[],controller:"scripts/searchpage"}),defineRoute({path:"/selectserver.html",dependencies:["listViewStyle","emby-button"],autoFocus:!1,anonymous:!0,startup:!0,controller:"scripts/selectserver"}),defineRoute({path:"/serveractivity.html",dependencies:[],autoFocus:!1,roles:"admin",controller:"dashboard/serveractivity"}),defineRoute({path:"/serversecurity.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/streamingsettings.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/support.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/supporterkey.html",dependencies:[],controller:"scripts/supporterkeypage",autoFocus:!1,roles:"admin"}),defineRoute({path:"/syncactivity.html",dependencies:[],autoFocus:!1,controller:"scripts/syncactivity"}),defineRoute({path:"/syncsettings.html",dependencies:[],autoFocus:!1}),defineRoute({path:"/tv.html",dependencies:["paper-icon-button-light","emby-button"],autoFocus:!1,controller:"scripts/tvrecommended",transition:"fade"}),defineRoute({path:"/useredit.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/userlibraryaccess.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/usernew.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/userparentalcontrol.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/userpassword.html",dependencies:["emby-input","emby-button","emby-checkbox"],autoFocus:!1,controller:"scripts/userpasswordpage"}),defineRoute({path:"/userprofiles.html",dependencies:[],autoFocus:!1,roles:"admin"}),defineRoute({path:"/wizardagreement.html",dependencies:["dashboardcss"],autoFocus:!1,anonymous:!0,controller:"scripts/wizardagreement"}),defineRoute({path:"/wizardremoteaccess.html",dependencies:["dashboardcss"],autoFocus:!1,anonymous:!0,controller:"dashboard/wizardremoteaccess"}),defineRoute({path:"/wizardcomponents.html",dependencies:["dashboardcss","emby-button","emby-input","emby-select"],autoFocus:!1,anonymous:!0,controller:"dashboard/wizardcomponents"}),defineRoute({path:"/wizardfinish.html",dependencies:["emby-button","dashboardcss"],autoFocus:!1,anonymous:!0,controller:"dashboard/wizardfinishpage"}),defineRoute({path:"/wizardlibrary.html",dependencies:["dashboardcss"],autoFocus:!1,anonymous:!0}),defineRoute({path:"/wizardsettings.html",dependencies:["dashboardcss"],autoFocus:!1,anonymous:!0,controller:"dashboard/wizardsettings"}),defineRoute({path:"/wizardstart.html",dependencies:["dashboardcss"],autoFocus:!1,anonymous:!0,controller:"dashboard/wizardstart"}),defineRoute({path:"/wizarduser.html",dependencies:["dashboardcss","emby-input"],controller:"scripts/wizarduserpage",autoFocus:!1,anonymous:!0}),defineRoute({path:"/videoosd.html",dependencies:[],transition:"fade",controller:"scripts/videoosd",autoFocus:!1,type:"video-osd",supportsThemeMedia:!0,fullscreen:!0,enableMediaControl:!1}),defineRoute(Dashboard.isConnectMode()?{path:"/configurationpageext",dependencies:[],autoFocus:!1,enableCache:!1,enableContentQueryString:!0,roles:"admin",contentPath:getPluginPageContentPath}:{path:"/configurationpage",dependencies:[],autoFocus:!1,enableCache:!1,enableContentQueryString:!0,roles:"admin"}),defineRoute({path:"/",isDefaultRoute:!0,autoFocus:!1,dependencies:[]})}function getPluginPageContentPath(){return window.ApiClient?ApiClient.getUrl("web/ConfigurationPage"):null}function loadPlugins(externalPlugins,appHost,browser,shell){console.log("Loading installed plugins");var list=["bower_components/emby-webcomponents/playback/playbackvalidation","bower_components/emby-webcomponents/playback/playaccessvalidation","bower_components/emby-webcomponents/playback/experimentalwarnings"];"android"===self.appMode?self.MainActivity&&MainActivity.enableVlcPlayer()&&list.push("cordova/vlcplayer"):"cordova"===self.appMode&&(list.push("cordova/audioplayer"),(browser.iOSVersion||0)>=11&&list.push("cordova/mpvplayer")),list.push("bower_components/emby-webcomponents/htmlaudioplayer/plugin"),"cordova"===self.appMode&&list.push("cordova/chromecast"),"android"===self.appMode&&list.push("cordova/externalplayer"),list.push("bower_components/emby-webcomponents/htmlvideoplayer/plugin"),list.push("bower_components/emby-webcomponents/photoplayer/plugin"),appHost.supports("remotecontrol")&&(list.push("bower_components/emby-webcomponents/sessionplayer"),(browser.chrome||browser.opera)&&list.push("bower_components/emby-webcomponents/chromecast/chromecastplayer")),list.push("bower_components/emby-webcomponents/youtubeplayer/plugin");for(var i=0,length=externalPlugins.length;i=11&&list.push("cordova/mpvplayer")),list.push("bower_components/emby-webcomponents/htmlaudioplayer/plugin"),"cordova"===self.appMode&&list.push("cordova/chromecast"),"android"===self.appMode&&list.push("cordova/externalplayer"),list.push("bower_components/emby-webcomponents/htmlvideoplayer/plugin"),list.push("bower_components/emby-webcomponents/photoplayer/plugin"),appHost.supports("remotecontrol")&&(list.push("bower_components/emby-webcomponents/sessionplayer"),(browser.chrome||browser.opera)&&list.push("bower_components/emby-webcomponents/chromecast/chromecastplayer")),list.push("bower_components/emby-webcomponents/youtubeplayer/plugin");for(var i=0,length=externalPlugins.length;i Emby Premiere en het zal automatisch worden ontgrendeld.", "TabSuggestions": "Suggesties", @@ -160,7 +160,7 @@ "OptionProducers": "Producenten", "HeaderResume": "Hervatten", "HeaderContinueWatching": "Kijken hervatten", - "HeaderNextUp": "Volgend", + "HeaderNextUp": "Volgende", "NoNextUpItemsMessage": "Niets gevonden. Start met kijken!", "HeaderLatestEpisodes": "Nieuwste Afleveringen", "HeaderPersonTypes": "Persoon Types:", @@ -296,7 +296,7 @@ "LabelRunServerAtStartupHelp": "Dit zal het Emby systeemvakicoon starten bij het opstarten van Windows. Als je een Windows service hebt opgezet, laat dit dan uitgevinkt en configureer de service om te starten bij het opstarten.", "ButtonSelectDirectory": "Selecteer map", "LabelCachePath": "Cache pad:", - "DefaultMetadataLangaugeDescription": "Dit zijn uw standaardinstellingen en kunnen per-bibliotheek worden aangepast.", + "DefaultMetadataLangaugeDescription": "Dit zijn uw standaardinstellingen en kunnen per bibliotheek worden aangepast.", "LabelCachePathHelp": "Geef een aangepaste lokatie voor cache bestanden zoals afbeeldingen. Laat leeg om de standaard lokatie te gebruiken.", "LabelRecordingPath": "Standaard opname pad:", "LabelMovieRecordingPath": "Filmopname pad (optioneel):", @@ -725,11 +725,11 @@ "LabelProtocolInfoHelp": "De waarde die wordt gebruikt bij het reageren op GetProtocolInfo verzoeken van het apparaat.", "TabNfoSettings": "Nfo Instellingen", "HeaderKodiMetadataHelp": "Om nfo-metadata in of uit te schakelen, gaat u naar de Emby bibliotheekinstellingen en vervolgens naar de metadata-downloaders sectie.", - "LabelKodiMetadataUser": "Nfo voor gebruiker kijjk gegevens opslaan:", + "LabelKodiMetadataUser": "Kijkgegevens in nfo opslaan voor:", "LabelKodiMetadataUserHelp": "Schakel dit in om kijk gegevens op te slaan in NFO-bestanden om in andere toepassingen te gebruiken.", - "LabelKodiMetadataDateFormat": "Uitgave datum formaat:", + "LabelKodiMetadataDateFormat": "Releasedatum formaat:", "LabelKodiMetadataDateFormatHelp": "Alle datums in NFO's zullen gelezen en geschreven worden met dit formaat.", - "LabelKodiMetadataSaveImagePaths": "Bewaar afbeeldingspaden in NFO-bestanden", + "LabelKodiMetadataSaveImagePaths": "Afbeeldingspaden opslaan in NFO-bestanden", "LabelKodiMetadataSaveImagePathsHelp": "Dit wordt aanbevolen als u bestandsnamen heeft die niet voldoen aan Kodi richtlijnen.", "LabelKodiMetadataEnablePathSubstitution": "Pad vervanging inschakelen", "LabelKodiMetadataEnablePathSubstitutionHelp": "Stelt pad vervanging in voor afbeeldingspaden en maakt gebruik van de Pad Vervangen instellingen van de server.", @@ -1751,7 +1751,7 @@ "ScanLibrary": "Scan bibliotheek", "EnableStreamLooping": "Livestreams automatisch herhalen", "EnableStreamLoopingHelp": "Schakel dit in als de livestreams slechts enkele seconden aan gegevens bevatten en continu moeten worden aangevraagd. Schakel dit niet in indien het niet nodig is.", - "HttpsRequiresCert": "Om https in te schakelen voor externe verbindingen, is een vertrouwd SSL-certificaat vereist, zoals Lets Encrypt.", + "HttpsRequiresCert": "Om beveiligde verbindingen in te schakelen, is een vertrouwd SSL-certificaat vereist (zoals Let's Encrypt). Geef een certificaat op of schakel beveiligde verbindingen uit.", "HeaderLatestDownloadedVideos": "Laatst gedownloade video's.", "ServerRestartNeededAfterPluginInstall": "Emby server zal heropgestart moeten worden na het installeren van een plugin.", "PluginInstalledMessage": "Het installeren van de plugin is gelukt. Emby Server zal heropgestart moeten worden om de wijzigingen door te voeren.", diff --git a/SharedVersion.cs b/SharedVersion.cs index e60cd9c242..54d3c0e92e 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.4.1.16")] +[assembly: AssemblyVersion("3.4.1.17")] diff --git a/ThirdParty/emby/Emby.Server.Connect.dll b/ThirdParty/emby/Emby.Server.Connect.dll index f58173ce61..28170e317a 100644 Binary files a/ThirdParty/emby/Emby.Server.Connect.dll and b/ThirdParty/emby/Emby.Server.Connect.dll differ diff --git a/ThirdParty/emby/Emby.Server.MediaEncoding.dll b/ThirdParty/emby/Emby.Server.MediaEncoding.dll index 52d22bce5d..8f7def8f16 100644 Binary files a/ThirdParty/emby/Emby.Server.MediaEncoding.dll and b/ThirdParty/emby/Emby.Server.MediaEncoding.dll differ diff --git a/ThirdParty/emby/Emby.Server.Sync.dll b/ThirdParty/emby/Emby.Server.Sync.dll index fac722acc9..a11117c896 100644 Binary files a/ThirdParty/emby/Emby.Server.Sync.dll and b/ThirdParty/emby/Emby.Server.Sync.dll differ