update video osd

This commit is contained in:
Luke Pulverenti 2017-06-09 15:23:13 -04:00
parent 7d91afc39c
commit b6740d9781
12 changed files with 21 additions and 16 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["browser","dom","layoutManager","css!./emby-button","registerElement"],function(browser,dom,layoutManager){"use strict";function enableAnimation(){return!browser.tv}function animateButtonInternal(e,btn){for(var div=document.createElement("div"),i=0,length=btn.classList.length;i<length;i++)div.classList.add(btn.classList[i]+"-ripple-effect");var offsetX=e.offsetX||0,offsetY=e.offsetY||0;offsetX>0&&offsetY>0&&(div.style.left=offsetX+"px",div.style.top=offsetY+"px"),btn.appendChild(div);var callback=function(){var parentNode=div.parentNode;parentNode&&parentNode.removeChild(div)};div.addEventListener(dom.whichAnimationEvent(),callback,!1),div.addEventListener(dom.whichAnimationCancelEvent(),callback,!1)}function animateButton(e,btn){requestAnimationFrame(function(){animateButtonInternal(e,btn)})}function onKeyDown(e){13===e.keyCode&&animateButton(e,this)}function onClick(e){animateButton(e,this)}var EmbyButtonPrototype=Object.create(HTMLButtonElement.prototype);EmbyButtonPrototype.createdCallback=function(){this.classList.contains("paper-icon-button-light")||(this.classList.add("paper-icon-button-light"),layoutManager.tv&&this.classList.add("icon-button-focusscale"),enableAnimation()&&(dom.addEventListener(this,"keydown",onKeyDown,{passive:!0}),dom.addEventListener(this,"click",onClick,{passive:!0})))},document.registerElement("paper-icon-button-light",{prototype:EmbyButtonPrototype,extends:"button"})});
define(["browser","dom","layoutManager","css!./emby-button","registerElement"],function(browser,dom,layoutManager){"use strict";function enableAnimation(){return!browser.tv}function onTransitionEnd(){var div=this,parentNode=div.parentNode;if(parentNode)try{parentNode.removeChild(div)}catch(err){}}function animateButtonInternal(e,btn){for(var div=document.createElement("div"),i=0,length=btn.classList.length;i<length;i++)div.classList.add(btn.classList[i]+"-ripple-effect");var offsetX=e.offsetX||0,offsetY=e.offsetY||0;offsetX>0&&offsetY>0&&(div.style.left=offsetX+"px",div.style.top=offsetY+"px"),btn.appendChild(div),div.addEventListener(dom.whichAnimationEvent(),onTransitionEnd,!1),div.addEventListener(dom.whichAnimationCancelEvent(),onTransitionEnd,!1),setTimeout(onTransitionEnd.bind(div),200)}function animateButton(e,btn){requestAnimationFrame(function(){animateButtonInternal(e,btn)})}function onKeyDown(e){13===e.keyCode&&animateButton(e,this)}function onClick(e){animateButton(e,this)}var EmbyButtonPrototype=Object.create(HTMLButtonElement.prototype);EmbyButtonPrototype.createdCallback=function(){this.classList.contains("paper-icon-button-light")||(this.classList.add("paper-icon-button-light"),layoutManager.tv&&this.classList.add("icon-button-focusscale"),enableAnimation()&&(dom.addEventListener(this,"keydown",onKeyDown,{passive:!0}),dom.addEventListener(this,"click",onClick,{passive:!0})))},document.registerElement("paper-icon-button-light",{prototype:EmbyButtonPrototype,extends:"button"})});

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 @@
.osdPoster img,.pageContainer,.videoOsdBottom{bottom:0;left:0;right:0}.osdHeader{padding-bottom:3vh;-webkit-transition:-webkit-transform .3s ease-out,opacity .3s ease-out;-o-transition:transform .3s ease-out,opacity .3s ease-out;transition:transform .3s ease-out,opacity .3s ease-out;will-change:transform;position:relative;z-index:1;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));backdrop-filter:none!important}.osdHeader .headerButton:not(.headerBackButton):not(.libraryMenuButtonText){display:none}.osdHeader-hidden{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);opacity:0}.chapterThumbContainer{-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;position:relative}.chapterThumb{background-position:center center;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;border:0;height:20vh;min-width:20vh}@media all and (orientation:portrait){.chapterThumb{height:30vw;min-width:30vw}}@media all and (max-height:50em) and (orientation:landscape){.chapterThumb{height:30vh;min-width:30vh}}.chapterThumbTextContainer{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.7);padding:.25em .5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chapterThumbText{padding:.25em 0;margin:0;opacity:1}.chapterThumbText-dim{opacity:.6}.videoOsdBottom{position:fixed;background-color:rgba(0,0,0,.7);color:#fff;padding:1%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;will-change:transform;-webkit-transition:-webkit-transform .3s ease-out,opacity .3s ease-out;-o-transition:transform .3s ease-out,opacity .3s ease-out;transition:transform .3s ease-out,opacity .3s ease-out}.videoOsdBottom-hidden{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);opacity:0}.osdControls{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.videoOsdBottom .buttons{padding:.25em 0 0;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}.osdVolumeSliderContainer{width:6.5em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.osdMediaInfo,.volumeButtons{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.volumeButtons{margin:0 .5em 0 auto;display:flex;-webkit-align-items:center;align-items:center}.osdTimeText{margin-left:1em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mouseIdle .videoOsdBottom .volumeButtons{display:none}.osdPoster{width:10%;position:relative;margin-right:.5em}.osdPoster img{position:absolute;height:auto;width:100%;-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;border:1px solid #222;user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-drag:none;-webkit-user-select:none;-ms-user-select:none}.osdTitle,.osdTitleSmall{margin:0 1em 0 0;color:#fff!important}.osdMediaInfo{color:#eee;display:flex;-webkit-align-items:center;align-items:center}.osdSecondaryMediaInfo{padding-left:.6em}.osdTextContainer{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-bottom:.7em;padding-left:.5em}.osdMainTextContainer{-webkit-box-align:baseline;-webkit-align-items:baseline;align-items:baseline}.pageContainer{top:0;position:fixed}@media all and (max-width:30em){.btnFastForward,.btnRewind,.osdMediaInfo,.osdPoster{display:none!important}}@media all and (max-width:33.75em){.videoOsdBottom .paper-icon-button-light{margin:0}}@media all and (max-width:37.5em){.videoOsdBottom .volumeButtons{display:none!important}}@media all and (max-width:75em){.videoOsdBottom .endsAtText{display:none!important}}
.osdPoster img,.pageContainer,.videoOsdBottom{bottom:0;left:0;right:0}.osdHeader{padding-bottom:3vh;-webkit-transition:-webkit-transform .3s ease-out,opacity .3s ease-out;-o-transition:transform .3s ease-out,opacity .3s ease-out;transition:transform .3s ease-out,opacity .3s ease-out;will-change:transform;position:relative;z-index:1;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));backdrop-filter:none!important}.osdHeader .headerButton:not(.headerBackButton):not(.libraryMenuButtonText){display:none}.osdHeader-hidden{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);opacity:0}.chapterThumbContainer{-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;position:relative}.chapterThumb{background-position:center center;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;border:0;height:20vh;min-width:20vh}@media all and (orientation:portrait){.chapterThumb{height:30vw;min-width:30vw}}@media all and (max-height:50em) and (orientation:landscape){.chapterThumb{height:30vh;min-width:30vh}}.chapterThumbTextContainer{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.7);padding:.25em .5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chapterThumbText{padding:.25em 0;margin:0;opacity:1}.chapterThumbText-dim{opacity:.6}.videoOsdBottom{position:fixed;background-color:rgba(0,0,0,.7);padding:1%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;will-change:transform;-webkit-transition:-webkit-transform .3s ease-out,opacity .3s ease-out;-o-transition:transform .3s ease-out,opacity .3s ease-out;transition:transform .3s ease-out,opacity .3s ease-out;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.3)),to(rgba(0,0,0,1)));background:-webkit-linear-gradient(rgba(0,0,0,.3),rgba(0,0,0,1));background:-o-linear-gradient(rgba(0,0,0,.3),rgba(0,0,0,1));background:linear-gradient(rgba(0,0,0,.3),rgba(0,0,0,1));color:#fff}.videoOsdBottom-hidden{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);opacity:0}.osdControls{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.videoOsdBottom .buttons{padding:.25em 0 0;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}.osdVolumeSliderContainer{width:6.5em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.osdMediaInfo,.volumeButtons{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.volumeButtons{margin:0 .5em 0 auto;display:flex;-webkit-align-items:center;align-items:center}.osdTimeText{margin-left:1em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mouseIdle .videoOsdBottom .volumeButtons{display:none}.osdPoster{width:10%;position:relative;margin-right:.5em}.osdPoster img{position:absolute;height:auto;width:100%;-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;border:1px solid #222;user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-drag:none;-webkit-user-select:none;-ms-user-select:none}.osdTitle,.osdTitleSmall{margin:0 1em 0 0}.osdMediaInfo{display:flex;-webkit-align-items:center;align-items:center}.osdSecondaryMediaInfo{padding-left:.6em}.osdTextContainer{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-bottom:.7em;padding-left:.5em}.osdMainTextContainer{-webkit-box-align:baseline;-webkit-align-items:baseline;align-items:baseline}.pageContainer{top:0;position:fixed}@media all and (max-width:30em){.btnFastForward,.btnRewind,.osdMediaInfo,.osdPoster{display:none!important}}@media all and (max-width:33.75em){.videoOsdBottom .paper-icon-button-light{margin:0}}@media all and (max-width:37.5em){.videoOsdBottom .volumeButtons{display:none!important}}@media all and (max-width:75em){.videoOsdBottom .endsAtText{display:none!important}}

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

@ -18,8 +18,12 @@
<div class="osdTextContainer osdSecondaryMediaInfo">
</div>
<div class="sliderContainer" style="margin: .5em .5em .25em;">
<input type="range" step=".01" min="0" max="100" value="0" is="emby-slider" class="osdPositionSlider"/>
<div class="flex flex-direction-row align-items-center">
<div class="osdTextContainer startTimeText" style="margin: 0 .25em 0 0;"></div>
<div class="sliderContainer flex-grow" style="margin: .5em .5em .25em;">
<input type="range" step=".01" min="0" max="100" value="0" is="emby-slider" class="osdPositionSlider" />
</div>
<div class="osdTextContainer endTimeText" style="margin: 0 0 0 .25em;"></div>
</div>
<div class="buttons">
@ -73,7 +77,7 @@
<i class="xlargePaperIconButton md-icon">&#xE050;</i>
</button>
<div class="sliderContainer osdVolumeSliderContainer">
<input is="emby-slider" type="range" step="1" min="0" max="100" value="0" class="osdVolumeSlider"/>
<input is="emby-slider" type="range" step="1" min="0" max="100" value="0" class="osdVolumeSlider" />
</div>
</div>
</div>