add automatic direct play to transcoding fallback

This commit is contained in:
Luke Pulverenti 2017-02-20 02:07:47 -05:00
parent 61fe362f2d
commit 3a67a4edc2
18 changed files with 20 additions and 18 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.emby-tab-button,.emby-tabs-slider{position:relative}.emby-tab-button{background:0 0;-webkit-box-shadow:none;box-shadow:none;border:2px solid transparent;border-width:0 0 2px;cursor:pointer;outline:0!important;width:auto;font-family:inherit;font-size:inherit;color:#aaa;display:inline-block;vertical-align:middle;-webkit-flex-shrink:0;flex-shrink:0;margin:0;padding:1em .9em;height:auto;min-width:initial;line-height:initial;-webkit-border-radius:0!important;border-radius:0!important;overflow:hidden}.emby-tab-button-active{color:#52B54B;border-color:#52B54B}.emby-tabs-selection-bar{position:absolute;left:0;bottom:0;height:2px;z-index:1000;background:#52B54B;width:0}.emby-tab-button-selection-bar{position:absolute;left:0;border:0;bottom:1px;height:2px;right:0;-webkit-border-radius:0;border-radius:0;z-index:1000}.emby-tab-button-selection-bar-active{background:#52B54B}.emby-tab-button-ripple-effect{background:#141414!important}
.emby-tab-button,.emby-tabs-slider{position:relative}.emby-tab-button{background:0 0;-webkit-box-shadow:none;box-shadow:none;border:2px solid transparent;border-width:0 0 2px;cursor:pointer;outline:0!important;width:auto;font-family:inherit;font-size:inherit;display:inline-block;vertical-align:middle;-webkit-flex-shrink:0;flex-shrink:0;margin:0;padding:1em .9em;height:auto;min-width:initial;line-height:initial;-webkit-border-radius:0!important;border-radius:0!important;overflow:hidden;color:#999}.emby-tab-button.emby-button-tv{padding-top:.4em;padding-bottom:.4em}.emby-tab-button-active{color:#52B54B;border-color:#52B54B}.emby-tab-button-active.emby-button-tv{border-color:transparent;color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B;border-color:#52B54B}.emby-tabs-selection-bar{position:absolute;left:0;bottom:0;height:2px;z-index:1000;background:#52B54B;width:0}.emby-tab-button-selection-bar{position:absolute;left:0;border:0;bottom:1px;height:2px;right:0;-webkit-border-radius:0;border-radius:0;z-index:1000}.emby-tab-button-selection-bar-active{background:#52B54B}.emby-tab-button-ripple-effect{background:#141414!important}.tabContent:not(.is-active){display:none}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.volumeOsd{position:fixed;top:8%;right:3%;z-index:100000;background:#222;background:rgba(0,0,0,.8);padding:1em;color:#fff;backdrop-filter:blur(5px);-webkit-border-radius:.25em;border-radius:.25em;-webkit-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.volumeOsd-hidden{opacity:0}.volumeOsdIcon{font-size:300%;display:block;margin:.25em .7em}.volumeOsdProgressOuter{margin:1.5em .25em 1em;height:.35em;background:#222;-webkit-border-radius:.25em;border-radius:.25em}.volumeOsdProgressInner{width:40%;background:#52B54B;height:100%;-webkit-border-radius:.25em;border-radius:.25em}

View File

@ -0,0 +1 @@
define(["events","playbackManager","dom","browser","css!./volumeosd","material-icons"],function(events,playbackManager,dom,browser){"use strict";function getOsdElementHtml(){var html="";return html+='<i class="md-icon volumeOsdIcon">&#xE050;</i>',html+='<div class="volumeOsdProgressOuter"><div class="volumeOsdProgressInner"></div></div>'}function ensureOsdElement(){var elem=osdElement;elem||(enableAnimation=browser.supportsCssAnimation(),elem=document.createElement("div"),elem.classList.add("hide"),elem.classList.add("volumeOsd"),elem.classList.add("volumeOsd-hidden"),elem.innerHTML=getOsdElementHtml(),iconElement=elem.querySelector("i"),progressElement=elem.querySelector(".volumeOsdProgressInner"),document.body.appendChild(elem),osdElement=elem)}function onHideComplete(){this.classList.add("hide")}function showOsd(){clearHideTimeout();var elem=osdElement;dom.removeEventListener(elem,dom.whichTransitionEvent(),onHideComplete,{once:!0}),elem.classList.remove("hide"),void elem.offsetWidth,requestAnimationFrame(function(){elem.classList.remove("volumeOsd-hidden"),hideTimeout=setTimeout(hideOsd,3e3)})}function clearHideTimeout(){hideTimeout&&(clearTimeout(hideTimeout),hideTimeout=null)}function hideOsd(){clearHideTimeout();var elem=osdElement;elem&&(enableAnimation?(void elem.offsetWidth,requestAnimationFrame(function(){elem.classList.add("volumeOsd-hidden"),dom.addEventListener(elem,dom.whichTransitionEvent(),onHideComplete,{once:!0})})):onHideComplete.call(elem))}function updatePlayerVolumeState(isMuted,volume){iconElement&&(iconElement.innerHTML=isMuted?"&#xE04F;":"&#xE050;"),progressElement&&(progressElement.style.width=(volume||0)+"%")}function releaseCurrentPlayer(){var player=currentPlayer;player&&(events.off(player,"volumechange",onVolumeChanged),events.off(player,"playbackstop",hideOsd),currentPlayer=null)}function onVolumeChanged(e){var player=this;ensureOsdElement(),updatePlayerVolumeState(player.isMuted(),player.getVolume()),showOsd()}function bindToPlayer(player){player!==currentPlayer&&(releaseCurrentPlayer(),currentPlayer=player,player&&(hideOsd(),events.on(player,"volumechange",onVolumeChanged),events.on(player,"playbackstop",hideOsd)))}var currentPlayer,osdElement,iconElement,progressElement,enableAnimation,hideTimeout;events.on(playbackManager,"playerchange",function(){bindToPlayer(playbackManager.getCurrentPlayer())}),bindToPlayer(playbackManager.getCurrentPlayer())});

View File

@ -1 +1 @@
define(["appSettings","events","browser"],function(appsettings,events,browser){"use strict";function UserSettings(){function onSaveTimeout(){saveTimeout=null,currentApiClient.updateDisplayPreferences("usersettings",displayPrefs,currentUserId,"emby")}function saveServerPreferences(){saveTimeout&&clearTimeout(saveTimeout),saveTimeout=setTimeout(onSaveTimeout,50)}var currentUserId,currentApiClient,displayPrefs,saveTimeout,self=this;self.setUserInfo=function(userId,apiClient){return saveTimeout&&clearTimeout(saveTimeout),currentUserId=userId,currentApiClient=apiClient,userId?apiClient.getDisplayPreferences("usersettings",userId,"emby").then(function(result){result.CustomPrefs=result.CustomPrefs||{},displayPrefs=result}):(displayPrefs=null,Promise.resolve())},self.getData=function(){return displayPrefs},self.importFrom=function(instance){displayPrefs=instance.getData()},self.set=function(name,value,enableOnServer){var userId=currentUserId;if(!userId)throw new Error("userId cannot be null");var currentValue=self.get(name);appsettings.set(name,value,userId),enableOnServer!==!1&&displayPrefs&&(displayPrefs.CustomPrefs[name]=null==value?value:value.toString(),saveServerPreferences()),currentValue!==value&&events.trigger(self,"change",[name])},self.get=function(name,enableOnServer){var userId=currentUserId;if(!userId)throw new Error("userId cannot be null");return enableOnServer!==!1&&displayPrefs?displayPrefs.CustomPrefs[name]:appsettings.get(name,userId)},self.serverConfig=function(config){var apiClient=currentApiClient;return config?apiClient.updateUserConfiguration(currentUserId,config):apiClient.getUser(currentUserId).then(function(user){return user.Configuration})},self.loadQuerySettings=function(){}}function getSavedQueryKey(context){return"query-"+context}return UserSettings.prototype.enableCinemaMode=function(val){return null!=val&&this.set("enableCinemaMode",val.toString(),!1),val=this.get("enableCinemaMode",!1),!val||"false"!==val},UserSettings.prototype.enableThemeSongs=function(val){return null!=val&&this.set("enableThemeSongs",val.toString(),!1),val=this.get("enableThemeSongs",!1),"false"!==val},UserSettings.prototype.enableThemeVideos=function(val){return null!=val&&this.set("enableThemeVideos",val.toString(),!1),val=this.get("enableThemeVideos",!1),val?"false"!==val:!browser.slow},UserSettings.prototype.language=function(val){return null!=val&&this.set("language",val.toString(),!1),this.get("language",!1)},UserSettings.prototype.skipBackLength=function(val){return null!=val&&this.set("skipBackLength",val.toString()),parseInt(this.get("skipBackLength")||"15000")},UserSettings.prototype.skipForwardLength=function(val){return null!=val&&this.set("skipForwardLength",val.toString()),parseInt(this.get("skipForwardLength")||"15000")},UserSettings.prototype.loadQuerySettings=function(query,context){var key=getSavedQueryKey(context),values=this.get(key);if(values)return values=JSON.parse(values),Object.assign(query,values)},UserSettings.prototype.saveQuerySettings=function(query,context){var key=getSavedQueryKey(context),values={};query.SortBy&&(values.SortBy=query.SortBy),query.SortOrder&&(values.SortOrder=query.SortOrder),this.set(key,JSON.stringify(values))},UserSettings});
define(["appSettings","events","browser"],function(appsettings,events,browser){"use strict";function UserSettings(){function onSaveTimeout(){saveTimeout=null,currentApiClient.updateDisplayPreferences("usersettings",displayPrefs,currentUserId,"emby")}function saveServerPreferences(){saveTimeout&&clearTimeout(saveTimeout),saveTimeout=setTimeout(onSaveTimeout,50)}var currentUserId,currentApiClient,displayPrefs,saveTimeout,self=this;self.setUserInfo=function(userId,apiClient){return saveTimeout&&clearTimeout(saveTimeout),currentUserId=userId,currentApiClient=apiClient,userId?apiClient.getDisplayPreferences("usersettings",userId,"emby").then(function(result){result.CustomPrefs=result.CustomPrefs||{},displayPrefs=result}):(displayPrefs=null,Promise.resolve())},self.getData=function(){return displayPrefs},self.importFrom=function(instance){displayPrefs=instance.getData()},self.set=function(name,value,enableOnServer){var userId=currentUserId;if(!userId)throw new Error("userId cannot be null");var currentValue=self.get(name);appsettings.set(name,value,userId),enableOnServer!==!1&&displayPrefs&&(displayPrefs.CustomPrefs[name]=null==value?value:value.toString(),saveServerPreferences()),currentValue!==value&&events.trigger(self,"change",[name])},self.get=function(name,enableOnServer){var userId=currentUserId;return userId?enableOnServer!==!1&&displayPrefs?displayPrefs.CustomPrefs[name]:appsettings.get(name,userId):null},self.serverConfig=function(config){var apiClient=currentApiClient;return config?apiClient.updateUserConfiguration(currentUserId,config):apiClient.getUser(currentUserId).then(function(user){return user.Configuration})},self.loadQuerySettings=function(){}}function getSavedQueryKey(context){return"query-"+context}return UserSettings.prototype.enableCinemaMode=function(val){return null!=val&&this.set("enableCinemaMode",val.toString(),!1),val=this.get("enableCinemaMode",!1),!val||"false"!==val},UserSettings.prototype.enableThemeSongs=function(val){return null!=val&&this.set("enableThemeSongs",val.toString(),!1),val=this.get("enableThemeSongs",!1),"false"!==val},UserSettings.prototype.enableThemeVideos=function(val){return null!=val&&this.set("enableThemeVideos",val.toString(),!1),val=this.get("enableThemeVideos",!1),val?"false"!==val:!browser.slow},UserSettings.prototype.language=function(val){return null!=val&&this.set("language",val.toString(),!1),this.get("language",!1)},UserSettings.prototype.skipBackLength=function(val){return null!=val&&this.set("skipBackLength",val.toString()),parseInt(this.get("skipBackLength")||"15000")},UserSettings.prototype.skipForwardLength=function(val){return null!=val&&this.set("skipForwardLength",val.toString()),parseInt(this.get("skipForwardLength")||"15000")},UserSettings.prototype.loadQuerySettings=function(query,context){var key=getSavedQueryKey(context),values=this.get(key);if(values)return values=JSON.parse(values),Object.assign(query,values)},UserSettings.prototype.saveQuerySettings=function(query,context){var key=getSavedQueryKey(context),values={};query.SortBy&&(values.SortBy=query.SortBy),query.SortOrder&&(values.SortOrder=query.SortOrder),this.set(key,JSON.stringify(values))},UserSettings});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["globalize","shell"],function(globalize,shell){"use strict";function getProductInfo(feature){return null}function showExternalPremiereInfo(){shell.openUrl("https://emby.media/premiere")}function beginPurchase(feature,email){return showExternalPremiereInfo(),Promise.reject()}function restorePurchase(id){return Promise.reject()}function getSubscriptionOptions(){var options=[];return options.push({id:"embypremiere",title:globalize.translate("sharedcomponents#HeaderBecomeProjectSupporter"),requiresEmail:!1}),Promise.resolve(options)}function isUnlockedByDefault(feature,options){return"playback"===feature||"livetv"===feature?Promise.resolve():Promise.reject()}function getAdminFeatureName(feature){return feature}function getRestoreButtonText(){return globalize.translate("sharedcomponents#ButtonAlreadyPaid")}function getPeriodicMessageIntervalMs(feature){return"playback"===feature?864e5:0}return{getProductInfo:getProductInfo,beginPurchase:beginPurchase,restorePurchase:restorePurchase,getSubscriptionOptions:getSubscriptionOptions,isUnlockedByDefault:isUnlockedByDefault,getAdminFeatureName:getAdminFeatureName,getRestoreButtonText:getRestoreButtonText,getPeriodicMessageIntervalMs:getPeriodicMessageIntervalMs}});
define(["globalize","shell","browser"],function(globalize,shell,browser){"use strict";function getProductInfo(feature){return null}function showExternalPremiereInfo(){shell.openUrl("https://emby.media/premiere")}function beginPurchase(feature,email){return showExternalPremiereInfo(),Promise.reject()}function restorePurchase(id){return Promise.reject()}function getSubscriptionOptions(){var options=[];return options.push({id:"embypremiere",title:globalize.translate("sharedcomponents#HeaderBecomeProjectSupporter"),requiresEmail:!1}),Promise.resolve(options)}function isUnlockedByDefault(feature,options){return"playback"===feature||"livetv"===feature?Promise.resolve():Promise.reject()}function getAdminFeatureName(feature){return feature}function getRestoreButtonText(){return globalize.translate("sharedcomponents#ButtonAlreadyPaid")}function getPeriodicMessageIntervalMs(feature){return"playback"===feature?browser.tv||browser.mobile?864e5:2592e5:0}return{getProductInfo:getProductInfo,beginPurchase:beginPurchase,restorePurchase:restorePurchase,getSubscriptionOptions:getSubscriptionOptions,isUnlockedByDefault:isUnlockedByDefault,getAdminFeatureName:getAdminFeatureName,getRestoreButtonText:getRestoreButtonText,getPeriodicMessageIntervalMs:getPeriodicMessageIntervalMs}});

File diff suppressed because one or more lines are too long