diff --git a/videoosd/videoosd.css b/videoosd/videoosd.css index 8d587d8..eb94b1c 100644 --- a/videoosd/videoosd.css +++ b/videoosd/videoosd.css @@ -1 +1,1363 @@ -:root{--videoosd-tabs-height:20em}@supports selector(:hover) and (--videoosd-tabs-height:clamp(10vh,20em,60vh)){:root{--videoosd-tabs-height:clamp(10vh, 20em, 60vh)}}.layout-tv:root{--videoosd-tabs-height:38vh}.videoOsdHeader{will-change:opacity;transition:opacity .4s ease-out;text-shadow:none!important}.videoOsdHeader:not(.videoosd-header-safe){padding-left:0;padding-right:0}.videoOsdHeader-locked{display:none!important}.videoOsdHeader-hidden{opacity:0}.videoOsdHeader .headerButton:not(.headerBackButton):not(.headerCastButton){display:none}.chapterThumbImageContainer{background-position:center center;background-size:contain;background-repeat:no-repeat;width:24vw;height:13.5vw;width:clamp(20vmax,22em,35vmin);height:calc(clamp(20vmax,22em,35vmin) * 9 / 16);aspect-ratio:16/9;background-color:#000;box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4)!important;margin-top:-2em}.chapterThumbImageContainer-fourthree{height:calc(clamp(20vmax,22em,35vmin) * 3 / 4);aspect-ratio:4/3}.chapterThumbTextContainer{position:absolute;bottom:0;left:0;right:0;inset-inline-start:0;inset-inline-end:0;text-shadow:#000 0 0 .5em;font-weight:500;padding-bottom:.25em;text-align:center}.chapterThumbTextContainer-noimg{position:static;padding:.5em 0}.chapterThumbText{padding:0 1em;margin:0}@supports (aspect-ratio:16 / 9){.chapterThumbImageContainer{width:clamp(20vmax,22em,35vmin);height:auto!important}}.chapterThumbImageContainer-tv{width:29vw;height:16.3125vw}.chapterThumbImageContainer-tv.chapterThumbImageContainer-fourthree{width:24vw;height:18vw;aspect-ratio:4/3}.chapterThumbImageContainer-noimg{width:auto;height:auto;min-width:min(10vw,8em);max-width:min(30vw,30em)}.videoOsdBottom{position:fixed;bottom:0;left:0;right:0;inset-inline-start:0;inset-inline-end:0;padding:1.25em 3%;padding-top:1.25em;padding-bottom:min(1.25em,1vh);padding-left:min(5ch,2%);padding-right:min(5ch,2%);display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:flex-end;justify-content:flex-end}@supports (height:calc(3.125em + 2 * max(3em,4em))){.videoOsdBottom-safe{padding-left:calc(min(5ch,2%) + env(safe-area-inset-left,0));padding-right:calc(min(5ch,2%) + env(safe-area-inset-right,0))}}.videoOsdBottom-safe{position:static;overflow:hidden;padding-bottom:min(1.75em,1.75vh);-webkit-flex-grow:1;flex-grow:1}@supports (height:calc(3.125em + 2 * max(3em,4em))){.videoOsdBottom-safe{padding-bottom:calc(min(1.75em,1.75vh) + env(safe-area-inset-bottom,0))}}.videoOsdBottom-maincontrols{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-shrink:0;flex-shrink:0;max-height:100%;position:relative;padding:0 1.2em;-webkit-align-content:flex-end;align-content:flex-end}.videoOsdPositionContainer,.videoosd-tabcontainers,.videoOsdBottom-contentbuttons,.videoOsdBottom-buttons{-webkit-flex-basis:100%;flex-basis:100%;-webkit-flex-shrink:0;flex-shrink:0}.videoOsdBottom-contentbuttons{-webkit-order:4;order:4}.videoosd-bottom-with-opentab{padding-bottom:min(2em,1.25vh);will-change:initial!important}@supports (height:calc(3.125em + 2 * max(3em,4em))){.videoosd-bottom-with-opentab.videoOsdBottom-safe{padding-bottom:calc(min(2em,1.25vh) + env(safe-area-inset-bottom,0))}}.videoOsdBottom-video{will-change:opacity;transition:opacity .4s ease-out;background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.8))}.osdPosterContainer{max-height:100%;max-height:calc(100% - 19em);overflow:hidden;-webkit-justify-content:center;justify-content:center;-webkit-flex-basis:100%;flex-basis:100%}.osdPosterContainer.itemsContainer-tv{max-height:calc(100% - 12em)}.osdRemoteControlImageCard{width:100%;max-width:30vh;margin:0 auto}.osdRemoteControlImageCardBox{margin:.2em!important}.osdRemoteControlImageCardContent{border-radius:.6em!important;box-shadow:0 .06933em .06933em 0 rgba(0,0,0,.14),0 .13866em .06933em -.06933em rgba(0,0,0,.12),0 .06933em .208em 0 rgba(0,0,0,.2)!important}@supports (aspect-ratio:1){.osdRemoteControlImageCard{width:auto!important;max-width:100%;padding-bottom:0!important;aspect-ratio:1;overflow:hidden;height:90vw;max-height:100%}.osdRemoteControlImageCard.backdropCard{aspect-ratio:16/9;height:calc(90vw * (9 / 16))}.osdRemoteControlImageCard.fourThreeCard{aspect-ratio:4/3;height:calc(90vw * (3 / 4))}.osdRemoteControlImageCard.portraitCard{aspect-ratio:2/3;height:calc(90vw * (3 / 2))}}.osdContentSection-split{-webkit-flex-grow:1;flex-grow:1;overflow:hidden}@media all and (orientation:landscape){@supports (aspect-ratio:1){.osdRemoteControlImageCard{height:35vw}.osdRemoteControlImageCard.backdropCard{height:calc(35vw * (9 / 16))}.osdRemoteControlImageCard.fourThreeCard{height:calc(35vw * (3 / 4))}.osdRemoteControlImageCard.portraitCard{height:calc(35vw * (3 / 2))}}.osdContentSection-split{-webkit-flex-shrink:0;flex-shrink:0;width:55%;width:min(60%,75em);max-height:95%;box-sizing:border-box;-webkit-padding-start:4ch;padding-inline-start:4ch}}@media all and (min-width:140em){.osdContentSection-split{-webkit-padding-start:0!important;padding-inline-start:0!important}}.osdContentSection-tv-split{-webkit-padding-start:3ch!important;padding-inline-start:3ch!important;-webkit-padding-start:3ch!important;padding-inline-start:3ch!important;position:absolute;top:5em;bottom:8em;right:0;inset-inline-start:initial;inset-inline-end:0;width:67%;z-index:1}.videoOsdText{-webkit-flex-direction:column-reverse;flex-direction:column-reverse;margin-bottom:.75em;-webkit-flex-basis:50%;flex-basis:50%;-webkit-order:0;order:0}.videoOsdPositionContainer{box-sizing:border-box;font-weight:500;-webkit-order:2;order:2}.videoOsdPositionContainer-autosmall{margin-top:.5em}.videoOsdPositionContainer-vertical{-webkit-flex-wrap:wrap;flex-wrap:wrap;position:relative;z-index:1}.videoOsdPositionSliderContainer{-webkit-order:1;order:1;-webkit-flex-basis:100%;flex-basis:100%;margin:.1em 0 .3em!important}.videoOsdPositionText{-webkit-order:2;order:2;-webkit-flex-basis:35%;flex-basis:35%}.videoOsd-audioInfo{-webkit-order:3;order:3;-webkit-flex-basis:30%;flex-basis:30%;-webkit-justify-content:center;justify-content:center;font-size:92%}.videoOsdDurationText{-webkit-order:4;order:4;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-flex-basis:35%;flex-basis:35%;-webkit-flex-grow:1;flex-grow:1}.videoOsdPositionText:not(.videoOsd-customFont-x0){font-size:92%}.videoOsdDurationText:not(.videoOsd-customFont-x0){font-size:92%}.osd-endsat{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center}.osd-endsat-dot{margin:0 1ch;font-size:84%}@media not all and (min-width:28em){.osd-endsat{display:none!important}}.videoOsdText-remotecontrol{margin:1.05em 0 .75em;padding:0;-webkit-flex-direction:column;flex-direction:column;text-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-basis:100%;flex-basis:100%}.videoOsdText-remotecontrol-tv{margin:.25em 0 0}.videoOsdText-remotecontrol-tv h3{font-size:inherit}.videoOsdBottom-tvnowplaying.videoOsdBottom-split .osdPosterContainer,.videoOsdBottom-tvnowplaying.videoOsdBottom-split .videoOsdText{-webkit-margin-start:-30vw;margin-inline-start:-30vw}@media not all and (orientation:landscape){.osdPosterContainer{max-height:60%;-webkit-flex-grow:1;flex-grow:1;overflow:hidden;-webkit-justify-content:center;justify-content:center}.videoOsdBottom-safe.videoOsdBottom-split .osdPosterContainer,.videoOsdBottom-safe.videoOsdBottom-split .videoOsdText-remotecontrol{display:none!important}.videoOsdBottom-maincontrols{-webkit-align-content:flex-end;align-content:flex-end}.videoOsdBottom-safe.videoOsdBottom-split .videoOsdBottom-maincontrols{padding-top:.75em}}@media all and (min-width:50em){.videoOsd-customFont-x2{font-size:1.1em}}@media all and (orientation:landscape){.videoOsdBottomMaincontrols-autoexpand{-webkit-flex-shrink:initial;flex-shrink:initial;-webkit-flex-grow:1;flex-grow:1;-webkit-align-content:flex-start;align-content:flex-start}}.videoOsdSecondaryText{-webkit-align-items:baseline;align-items:baseline}.videoOsdSecondaryText-withparentname{margin-bottom:.25em;font-weight:500}.videoOsdSecondaryText-tv{margin-bottom:.25em}.videoOsdSecondaryText-remotecontrol{-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;margin-bottom:0}.videoOsdSecondaryMediaInfo-remotecontrol{font-size:92%;font-weight:500;margin-top:1em;margin-bottom:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:0;margin-inline-end:0}.osdTextActionButton{color:inherit!important;font-weight:inherit!important}.videoOsdTitle,.videoOsdParentTitle,.videoOsdThirdTitle{font-weight:600}.videoOsdThirdTitle{margin:0}.videoOsdBottom-hidden:not(.videoOsdBottom-tvnowplaying){opacity:0}@-webkit-keyframes osd-animate-text{0%{-webkit-transform:scale(1.1);transform:scale(1.1);opacity:0}100%{-webkit-transform:none;transform:none;opacity:initial}}@keyframes osd-animate-text{0%{-webkit-transform:scale(1.1);transform:scale(1.1);opacity:0}100%{-webkit-transform:none;transform:none;opacity:initial}}.videoOsdBottom-tvnowplaying:not(.videoOsdBottom-art) .osdPosterContainer,.videoOsdBottom-tvnowplaying:not(.videoOsdBottom-art) .videoOsdText,.videoOsdBottom-tvnowplaying:not(.videoOsdBottom-art) .osdContentSection:not(.osdPlayQueue){display:none!important}.osdIconButton-icon,.osdContentSectionToggleButtonIcon{padding:.08em!important}.osdIconButton,.osdContentSectionToggleButton{padding:.5em!important}.videoOsd-nobuttonmargin .osdIconButton,.videoOsd-nobuttonmargin .osdContentSectionToggleButton{margin:0 .3ch}.videoOsdBottom-buttons{-webkit-margin-start:-1em;margin-inline-start:-1em;-webkit-order:3;order:3}.videoOsdBottom-buttons-remotecontrol{margin:0;-webkit-flex-direction:row;flex-direction:row;padding:0;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.videoOsdBottom-buttons-remotecontrol-tv{-webkit-flex-basis:50%;flex-basis:50%;-webkit-flex-grow:1;flex-grow:1}.videoOsdBottom-buttons-topright{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:-.75em;margin-inline-end:-.75em;-webkit-flex-basis:content;flex-basis:content;-webkit-order:1;order:1;-webkit-align-items:flex-end;align-items:flex-end;margin-bottom:.25em}.videoOsdBottom-buttons-topright-remotecontrol{-webkit-justify-content:center;justify-content:center;width:100%;-webkit-margin-start:initial;margin-inline-start:initial;-webkit-flex-basis:100%;flex-basis:100%;margin:0;-webkit-order:4;order:4}.videoOsdBottom-buttons-topright-remotecontrol-tv{margin-bottom:.5em;-webkit-flex-basis:100%;flex-basis:100%}.osdVolumeDisplayIcon-left{-webkit-margin-end:.25em;margin-inline-end:.25em;-webkit-margin-start:1.6em;margin-inline-start:1.6em}.osdVolumeDisplayIcon-right{-webkit-margin-start:.25em;margin-inline-start:.25em;-webkit-margin-end:1.6em;margin-inline-end:1.6em}.btnMuteOSD-remotecontrol{-webkit-margin-start:0!important;margin-inline-start:0!important;display:none}.videoOsdVolumeControls{-webkit-justify-content:center;justify-content:center}.videoOsdVolumeControls:not(.videoOsdVolumeControls-showhover){-webkit-order:2;order:2;-webkit-flex-basis:100%;flex-basis:100%;padding:0}@media all and (min-height:38em){.videoOsdVolumeControls:not(.videoOsdVolumeControls-showhover){padding:.25em 0}}@media all and (min-height:50em){.videoOsdVolumeControls:not(.videoOsdVolumeControls-showhover){padding:.5em 0}}.videoOsdPositionSlider{margin:-1.605em 0}.videoOsdPositionContainer-limitwidth{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;width:100%;box-sizing:border-box;max-width:50em}.videoOsdVolumeSliderWrapper{max-width:44em}.videoOsdVolumeControls-showhover>.videoOsdVolumeSliderWrapper{position:absolute;top:-2.75em;left:-3.5em;inset-inline-start:-3.5em;inset-inline-end:initial;display:none;width:8.5em;z-index:99999999;background:#262626;padding:1.25em 1.25em;border-radius:.3em;max-width:initial}.videoOsdVolumeControls-showhover:hover>.videoOsdVolumeSliderWrapper{display:-webkit-flex;display:flex}.videoOsdVolumeControls-showhover>.osdVolumeDisplayIcon{display:none}@media not all and (pointer:fine){.videoOsdVolumeControls-hidetouch{display:none!important}}@media not all and (min-width:50em){.videoOsdVolumeControls-hidetouch{display:none!important}}.volumeButtons{margin-top:0;margin-bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:.5em;margin-inline-end:.5em;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.videoOsdParentTitle{margin:0}.videoOsdTitle{margin-top:0;margin-bottom:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:1em;margin-inline-end:1em}.videoOsdSecondaryText-remotecontrol .videoOsdTitle{-webkit-margin-end:0;margin-inline-end:0}.osdTitle-remotecontrol{margin:0}@media not all and (pointer:fine){.videoOsd-centerButtons-autolayout{position:fixed;top:45%;left:0;right:0;inset-inline-start:0;inset-inline-end:0;-webkit-justify-content:center;justify-content:center;display:-webkit-flex;display:flex;-webkit-align-self:center;align-self:center;margin-top:-2em;font-size:130%;font-size:3.5vmax}@media all and (orientation:portrait){.videoOsd-centerButtons-autolayout{top:50%}}.videoOsd-btnPause-autolayout{-webkit-margin-start:10%;margin-inline-start:10%;-webkit-margin-end:10%;margin-inline-end:10%}}.videoOsd-forwardIcon-flipped{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.btnOsdRewindIcon,.btnOsdFastForwardIcon{will-change:animate}.videoOsdParentTitleContainer{position:relative}.btnOsdMore-title{margin-top:0;margin-bottom:0;-webkit-margin-start:0.5em;margin-inline-start:.5em;-webkit-margin-end:0;margin-inline-end:0;padding:.16em;position:absolute;right:-2.5em;inset-inline-start:initial;inset-inline-end:-2.5em}@media all and (pointer:fine){.btnOsdMore-title{display:none!important}}@media not all and (pointer:fine){.btnOsdMore-bottom-autohide{display:none!important}}.videoosd-tabsslider{-webkit-column-gap:.25ch;column-gap:.25ch;-webkit-align-items:center;align-items:center;padding:0 0 .5em}.videoosd-tab-button{padding:.25em 0!important;border-radius:100em;-webkit-margin-end:2em;margin-inline-end:2em;overflow:visible}.videoosd-tab-button::before{left:-1em!important;right:-1em!important}.videoosd-tab-button.emby-tab-button-active::before{position:absolute;top:0;left:-1em;right:-1em;bottom:0;content:" ";z-index:-1;border-radius:inherit}.videoosd-tabcontainers{height:38vh;height:var(--videoosd-tabs-height);transition:height .4s ease-out;overflow:hidden;border-radius:.6em;contain:strict;margin:0 -1em;-webkit-flex-shrink:0;flex-shrink:0;-webkit-order:6;order:6}.videoOsdBottom-tabs{-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-order:5;order:5}.videoOsdBottom-tabs-remotecontrol{-webkit-justify-content:center;justify-content:center;margin-top:1em;-webkit-flex-basis:100%;flex-basis:100%}.videoOsdTabs-margintop .videoosd-tabsslider{margin-top:.5em}.videoosd-tabcontainers-hidden{height:0}.videoosd-tab{overflow:hidden}.videoosd-tab:not(.videoosd-activetab){display:none}.videoosd-tabsslider:focus-within .emby-tab-button-active:not(:focus){background:0 0;color:inherit}.videoosd-tabsslider:focus-within .emby-tab-button-active:not(:focus)::before{background:0 0}.videoosd-bottom-with-opentab .videoOsd-hideWithOpenTab{display:none!important}.videoosd-bottom-locked .videoOsd-hideWhenLocked{display:none!important}@media not all and (min-height:24em),not all and (min-width:28em){.videoOsdBottom-tabs,.videoosd-tabcontainers{display:none!important}}.videoosd-tabBackground{background:rgba(60,60,60,.8)}@supports (backdrop-filter:blur(1em)) or (-webkit-backdrop-filter:blur(1em)){.videoosd-tabBackground-backdropfilter{background:rgba(56,56,56,.76);-webkit-backdrop-filter:saturate(1.8) blur(4em);backdrop-filter:saturate(1.8) blur(4em)}}.btnCloseTabContent{margin:0!important;position:relative;top:-.15em;padding:.25em!important}.btnCloseTabContent.icon-button-focusscale{padding:0!important}.videoosd-poster{width:9em;width:calc((var(--videoosd-tabs-height) - 2em) * (2 / 3));max-width:20vw;overflow:hidden;-webkit-margin-end:1.25em;margin-inline-end:1.25em}.osdInfoImageCard{width:100%!important}.osdInfoImageCardBox{margin:0!important}.videoosd-info{overflow:hidden}.videoosd-info-overview{overflow:hidden;text-overflow:ellipsis;margin-top:.25em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}@supports selector(:hover) and (display:revert) and (column-gap:1em){.videoosd-info-mediainfoContainer{-webkit-column-gap:1em;column-gap:1em}}.videoOsd-itemstab-card.squareCard{width:20vw;max-width:34vw}.videoOsd-itemstab-card.fourThreeCard{width:12vw;max-width:44vw}.videoOsd-itemstab-card.backdropCard{width:19vw;max-width:44vw}.videoOsd-itemstab-card.portraitCard{width:8vw;max-width:30vw}.videoOsd-itemstab-card-twoline.backdropCard{width:calc((var(--videoosd-tabs-height) - 3.75em) * (16 / 9))}.videoOsd-itemstab-card-twoline.fourThreeCard{width:calc((var(--videoosd-tabs-height) - 3.5em) * (4 / 3))}.videoOsd-itemstab-card-twoline.portraitCard{width:calc((var(--videoosd-tabs-height) - 2.25em) * (2 / 3))}.videoOsd-itemstab-card-twoline.squareCard{width:calc((var(--videoosd-tabs-height) - 3em))}.videoOsd-itemstab-card-threeline.backdropCard{width:calc((var(--videoosd-tabs-height) - 5.75em) * (16 / 9))}.videoOsd-itemstab-card-threeline.fourThreeCard{width:calc((var(--videoosd-tabs-height) - 4.75em) * (4 / 3))}.videoOsd-itemstab-card-threeline.portraitCard{width:calc((var(--videoosd-tabs-height) - 3.75em) * (2 / 3))}.videoOsd-itemstab-card-threeline.squareCard{width:calc((var(--videoosd-tabs-height) - 4.25em))}.videoOsd-cardImageContainer-sideFooter{width:4.4em;height:4.4em}.videoOsd-itemstab-card .cardText{font-weight:500;font-size:92%}.videoosd-itemstab .scrollbuttoncontainer{background:0 0!important;overflow:visible}.videoosd-itemstab .emby-scrollbuttons-scrollbutton{background:#fff!important;color:#000!important;border-radius:100em;padding:.2em;box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4)!important;margin:0 .5em}.videoosd-itemstab .scrollbuttoncontainer:hover>.emby-scrollbuttons-scrollbutton{-webkit-transform:scale(1.1,1.1);transform:scale(1.1,1.1)}.videoosd-guidetab .guideSettingsContainer,.videoosd-guidetab .btnGuideViewSettings{display:none!important}.videoosd-guidetab .programCellInner{background:rgba(0,0,0,.5)}.videoosd-guidetab .channelCellInner{background:#242424}.videoosd-guidetab .firstChannelCell-withscroll{background:#242424!important}.videoosd-padded-left{-webkit-padding-start:3.8%;padding-inline-start:3.8%;-webkit-padding-start:min(3.8%,3.6em);padding-inline-start:min(3.8%,3.6em)}.videoosd-padded-right{-webkit-padding-end:3.8%;padding-inline-end:3.8%;-webkit-padding-end:min(3.8%,3.6em);padding-inline-end:min(3.8%,3.6em)}@media all and (max-height:30em) and (orientation:landscape){.videoOsdPositionContainer-autosmall,.videoosd-tabcontainers-autosmall,.videoOsdBottom-contentbuttons,.videoOsdBottom-buttons-remotecontrol{margin:0 auto}.videoOsdText-autosmall{margin:0!important;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-basis:55%!important;flex-basis:55%!important;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:center;justify-content:center;max-height:40%;text-align:start}.osdPosterContainer-autoexpand{-webkit-flex-shrink:0;flex-shrink:0;margin:0 auto;-webkit-flex-basis:45%!important;flex-basis:45%!important;max-height:40%!important}.osdTextActionButton{text-align:start}.osdRemoteControlImageCard-automargin{margin-top:0!important;margin-bottom:0!important;-webkit-margin-start:auto!important;margin-inline-start:auto!important;-webkit-margin-end:1em!important;margin-inline-end:1em!important}.videoOsdSecondaryText-remotecontrol{-webkit-align-items:initial;align-items:initial}}.videoOsdBottom-contentbuttons-tv{-webkit-flex-basis:50%;flex-basis:50%;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-margin-end:-.75em;margin-inline-end:-.75em}@media not all and (min-height:30em){.videoOsdVolumeControls{display:none!important}}.videoOsdVolumeSliderWrapper-customfont{font-size:1rem}@media all and (min-width:42em),(orientation:portrait){.videoOsd-customFont-remotecontrol-buttons{font-size:1.1em}}@media all and (orientation:landscape){.videoOsd-customFont-remotecontrol{font-size:1.1em}.videoOsdBottom-split:not(.videoOsdBottom-tvnowplaying){-webkit-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-justify-content:initial;justify-content:initial}@media all and (min-height:67em){.videoOsdBottom-split:not(.videoOsdBottom-tvnowplaying){margin-top:1.5em}}}@media all and (min-width:54em){.videoOsd-customFont-remotecontrol-buttons{font-size:1.2em}}@media all and (min-width:80em){.videoOsd-customFont-remotecontrol{font-size:1.2em}}.nowplaying-backdropcontainer-blur{-webkit-filter:blur(2vh) brightness(.3);filter:blur(2vh) brightness(.3)}.nowplaying-backdropcontainer-blur-high{-webkit-filter:blur(9vh) brightness(.6);filter:blur(9vh) brightness(.6)}.nowplaying-backdropcontainer-blur-extrasaturation{-webkit-filter:saturate(2) blur(2vh) brightness(.4);filter:saturate(2) blur(2vh) brightness(.4)}.nowplaying-backdropcontainer-blur-extrasaturation.nowplaying-backdropcontainer-blur-high{-webkit-filter:saturate(2) blur(9vh) brightness(.7);filter:saturate(2) blur(9vh) brightness(.7)}.nowplaying-backgroundcontainer-blur{background-color:rgba(0,0,0,0)!important;background-image:none!important}@supports (backdrop-filter:blur(1em)) or (-webkit-backdrop-filter:blur(1em)){.nowplaying-backdropcontainer-blur-backdropfilter{-webkit-filter:none!important;filter:none!important}.nowplaying-backgroundcontainer-blur-backdropfilter{background-color:rgba(0,0,0,0)!important;-webkit-backdrop-filter:saturate(1.4) blur(10vmax) brightness(.7);backdrop-filter:saturate(1.4) blur(10vmax) brightness(.7)}}.nowplaying-backgroundcontainer-brighter{background-color:rgba(0,0,0,.65)!important}.doc-nowplaying-blur{background-position:center;background-size:cover;background-repeat:no-repeat;background-color:#444!important}.videoOsd-ratingInfo{position:fixed;top:3vh;left:0;inset-inline-start:0;inset-inline-end:initial;margin-top:0;margin-bottom:0;-webkit-margin-start:4%;margin-inline-start:4%;-webkit-margin-end:0;margin-inline-end:0;overflow:hidden}.videoOsd-ratingText::before{content:" ";background:#52b54b;width:.53ch;position:absolute;top:0;bottom:0;left:0;inset-inline-start:0;inset-inline-end:initial;border-radius:.3em}.videoOsd-ratingText{margin:0;padding-top:.4em;padding-bottom:.4em;-webkit-padding-start:.9em;padding-inline-start:.9em;-webkit-padding-end:0;padding-inline-end:0;position:relative;font-weight:500;-webkit-animation:osd-rating-animate 4s ease-out forwards;animation:osd-rating-animate 4s ease-out forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-delay:3s;animation-delay:3s;-webkit-transform-origin:bottom center;transform-origin:bottom center;opacity:0}.videoOsd-ratingDescription{font-weight:400;margin-top:.1em}@-webkit-keyframes osd-rating-animate{0%{-webkit-transform:translateY(100%);transform:translateY(100%);opacity:0}15%{-webkit-transform:none;transform:none;opacity:1}85%{-webkit-transform:none;transform:none;opacity:1}100%{-webkit-transform:translateY(-100%);transform:translateY(-100%);opacity:0}}@keyframes osd-rating-animate{0%{-webkit-transform:translateY(100%);transform:translateY(100%);opacity:0}15%{-webkit-transform:none;transform:none;opacity:1}85%{-webkit-transform:none;transform:none;opacity:1}100%{-webkit-transform:translateY(-100%);transform:translateY(-100%);opacity:0}}.osd-transport-animationtext{position:fixed;opacity:0;top:45%;height:2em;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;text-shadow:#000 0 0 .5em;margin:-1.5em 0 0 0;font-weight:500;pointer-events:none;touch-action:none}@media all and (orientation:portrait){.osd-transport-animationtext{top:55%;margin:-1em 0 0 0}}.osd-rew-animationtext{left:2.5%;inset-inline-start:2.5%;inset-inline-end:initial;-webkit-transform:translateX(100%);transform:translateX(100%)}[dir=rtl] .osd-rew-animationtext{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.osd-ff-animationtext{-webkit-transform:translateX(-100%);transform:translateX(-100%);right:2.5%;inset-inline-start:initial;inset-inline-end:2.5%}[dir=rtl] .osd-ff-animationtext{-webkit-transform:translateX(100%);transform:translateX(100%)}.osd-raisedbutton{box-shadow:0 .06933em .06933em 0 rgba(0,0,0,.14),0 .13866em .06933em -.06933em rgba(0,0,0,.12),0 .06933em .208em 0 rgba(0,0,0,.2);padding:.54em 2ch!important}.btnPlayNextFromUpNext{padding:0!important;overflow:hidden}.btnPlayNextFromUpNext-inner{padding:.54em 2ch!important;position:relative}.btnPlayNextFromUpNext-progress{position:absolute;top:0;left:0;bottom:0;width:100%;transition:-webkit-transform .3s linear;transition:transform .3s linear;-webkit-transform-origin:center left;transform-origin:center left;-webkit-transform:scaleX(0);transform:scaleX(0);background:rgba(255,255,255,.3)}[dir=rtl] .btnPlayNextFromUpNext-progress{-webkit-transform-origin:center right;transform-origin:center right}.btnPlayNextFromUpNext:focus-visible .btnPlayNextFromUpNext-progress{background:rgba(0,0,0,.3)}.btnPlayNextFromUpNext.emby-button-tv:focus .btnPlayNextFromUpNext-progress{background:rgba(0,0,0,.3)}.upNextContainer,.skipIntroContainer{position:fixed;bottom:12em;bottom:min(12em,38vh);right:2.5%;right:calc(min(5ch,2%) + .7em);inset-inline-start:initial;inset-inline-end:2.5%;inset-inline-end:calc(min(5ch,2%) + .7em);margin-top:0!important;margin-bottom:0!important;-webkit-margin-start:0!important;margin-inline-start:0!important;-webkit-margin-end:0!important;margin-inline-end:0!important;z-index:1;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.videoosd-withupnext{display:none!important}.brightnessSliderContainer{position:fixed;top:7.5em;top:max(7.5em,15%);bottom:15em;bottom:min(15em,45vh);right:3%;inset-inline-start:initial;inset-inline-end:3%;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;z-index:1}@media all and (pointer:fine){.brightnessSliderContainer{display:none!important}}@media all and (orientation:portrait){.brightnessSliderContainer{display:none!important}}.videoOsdBrightnessIcon{font-size:200%;margin-bottom:.25em;-webkit-flex-shrink:0;flex-shrink:0}.videoOsdUnlockControls{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;padding:1em 1ch 2em;-webkit-flex-basis:100%;flex-basis:100%}.videoOsd-btnToggleLock-bg{background:#fff;color:#000}@media all and (pointer:fine){.videoOsd-btnLock{display:none!important}} \ No newline at end of file +:root { + --videoosd-tabs-height: 20em; +} +@supports selector(:hover) and (--videoosd-tabs-height: clamp(10vh, 20em, 60vh)) { + :root { + --videoosd-tabs-height: clamp(10vh, 20em, 60vh); + } +} +.layout-tv:root { + --videoosd-tabs-height: 38vh; +} +.videoOsdHeader { + will-change: opacity; + transition: opacity 0.4s ease-out; + text-shadow: none !important; +} +.videoOsdHeader:not(.videoosd-header-safe) { + padding-left: 0; + padding-right: 0; +} +.videoOsdHeader-locked { + display: none !important; +} +.videoOsdHeader-hidden { + opacity: 0; +} +.videoOsdHeader .headerButton:not(.headerBackButton):not(.headerCastButton) { + display: none; +} +.chapterThumbImageContainer { + background-position: center center; + background-size: contain; + background-repeat: no-repeat; + width: 24vw; + height: 13.5vw; + width: clamp(20vmax, 22em, 35vmin); + height: calc(clamp(20vmax, 22em, 35vmin) * 9 / 16); + aspect-ratio: 16/9; + background-color: #000; + box-shadow: + 0 4px 5px 0 rgba(0, 0, 0, 0.14), + 0 1px 10px 0 rgba(0, 0, 0, 0.12), + 0 2px 4px -1px rgba(0, 0, 0, 0.4) !important; + margin-top: -2em; +} +.chapterThumbImageContainer-fourthree { + height: calc(clamp(20vmax, 22em, 35vmin) * 3 / 4); + aspect-ratio: 4/3; +} +.chapterThumbTextContainer { + position: absolute; + bottom: 0; + left: 0; + right: 0; + inset-inline-start: 0; + inset-inline-end: 0; + text-shadow: #000 0 0 0.5em; + font-weight: 500; + padding-bottom: 0.25em; + text-align: center; +} +.chapterThumbTextContainer-noimg { + position: static; + padding: 0.5em 0; +} +.chapterThumbText { + padding: 0 1em; + margin: 0; +} +@supports (aspect-ratio: 16 / 9) { + .chapterThumbImageContainer { + width: clamp(20vmax, 22em, 35vmin); + height: auto !important; + } +} +.chapterThumbImageContainer-tv { + width: 29vw; + height: 16.3125vw; +} +.chapterThumbImageContainer-tv.chapterThumbImageContainer-fourthree { + width: 24vw; + height: 18vw; + aspect-ratio: 4/3; +} +.chapterThumbImageContainer-noimg { + width: auto; + height: auto; + min-width: min(10vw, 8em); + max-width: min(30vw, 30em); +} +.videoOsdBottom { + position: fixed; + bottom: 0; + left: 0; + right: 0; + inset-inline-start: 0; + inset-inline-end: 0; + padding: 1.25em 3%; + padding-top: 1.25em; + padding-bottom: min(1.25em, 1vh); + padding-left: min(5ch, 2%); + padding-right: min(5ch, 2%); + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + flex-direction: column; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} +@supports (height: calc(3.125em + 2 * max(3em, 4em))) { + .videoOsdBottom-safe { + padding-left: calc(min(5ch, 2%) + env(safe-area-inset-left, 0)); + padding-right: calc(min(5ch, 2%) + env(safe-area-inset-right, 0)); + } +} +.videoOsdBottom-safe { + position: static; + overflow: hidden; + padding-bottom: min(1.75em, 1.75vh); + -webkit-flex-grow: 1; + flex-grow: 1; +} +@supports (height: calc(3.125em + 2 * max(3em, 4em))) { + .videoOsdBottom-safe { + padding-bottom: calc(min(1.75em, 1.75vh) + env(safe-area-inset-bottom, 0)); + } +} +.videoOsdBottom-maincontrols { + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-flex-shrink: 0; + flex-shrink: 0; + max-height: 100%; + position: relative; + padding: 0 1.2em; + -webkit-align-content: flex-end; + align-content: flex-end; +} +.videoOsdPositionContainer, +.videoosd-tabcontainers, +.videoOsdBottom-contentbuttons, +.videoOsdBottom-buttons { + -webkit-flex-basis: 100%; + flex-basis: 100%; + -webkit-flex-shrink: 0; + flex-shrink: 0; +} +.videoOsdBottom-contentbuttons { + -webkit-order: 4; + order: 4; +} +.videoosd-bottom-with-opentab { + padding-bottom: min(2em, 1.25vh); + will-change: initial !important; +} +@supports (height: calc(3.125em + 2 * max(3em, 4em))) { + .videoosd-bottom-with-opentab.videoOsdBottom-safe { + padding-bottom: calc(min(2em, 1.25vh) + env(safe-area-inset-bottom, 0)); + } +} +.videoOsdBottom-video { + will-change: opacity; + transition: opacity 0.4s ease-out; + background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8)); +} +.osdPosterContainer { + max-height: 100%; + max-height: calc(100% - 19em); + overflow: hidden; + -webkit-justify-content: center; + justify-content: center; + -webkit-flex-basis: 100%; + flex-basis: 100%; +} +.osdPosterContainer.itemsContainer-tv { + max-height: calc(100% - 12em); +} +.osdRemoteControlImageCard { + width: 100%; + max-width: 30vh; + margin: 0 auto; +} +.osdRemoteControlImageCardBox { + margin: 0.2em !important; +} +.osdRemoteControlImageCardContent { + border-radius: 0.6em !important; + box-shadow: + 0 0.06933em 0.06933em 0 rgba(0, 0, 0, 0.14), + 0 0.13866em 0.06933em -0.06933em rgba(0, 0, 0, 0.12), + 0 0.06933em 0.208em 0 rgba(0, 0, 0, 0.2) !important; +} +@supports (aspect-ratio: 1) { + .osdRemoteControlImageCard { + width: auto !important; + max-width: 100%; + padding-bottom: 0 !important; + aspect-ratio: 1; + overflow: hidden; + height: 90vw; + max-height: 100%; + } + .osdRemoteControlImageCard.backdropCard { + aspect-ratio: 16/9; + height: calc(90vw * (9 / 16)); + } + .osdRemoteControlImageCard.fourThreeCard { + aspect-ratio: 4/3; + height: calc(90vw * (3 / 4)); + } + .osdRemoteControlImageCard.portraitCard { + aspect-ratio: 2/3; + height: calc(90vw * (3 / 2)); + } +} +.osdContentSection-split { + -webkit-flex-grow: 1; + flex-grow: 1; + overflow: hidden; +} +@media all and (orientation: landscape) { + @supports (aspect-ratio: 1) { + .osdRemoteControlImageCard { + height: 35vw; + } + .osdRemoteControlImageCard.backdropCard { + height: calc(35vw * (9 / 16)); + } + .osdRemoteControlImageCard.fourThreeCard { + height: calc(35vw * (3 / 4)); + } + .osdRemoteControlImageCard.portraitCard { + height: calc(35vw * (3 / 2)); + } + } + .osdContentSection-split { + -webkit-flex-shrink: 0; + flex-shrink: 0; + width: 55%; + width: min(60%, 75em); + max-height: 95%; + box-sizing: border-box; + -webkit-padding-start: 4ch; + padding-inline-start: 4ch; + } +} +@media all and (min-width: 140em) { + .osdContentSection-split { + -webkit-padding-start: 0 !important; + padding-inline-start: 0 !important; + } +} +.osdContentSection-tv-split { + -webkit-padding-start: 3ch !important; + padding-inline-start: 3ch !important; + -webkit-padding-start: 3ch !important; + padding-inline-start: 3ch !important; + position: absolute; + top: 5em; + bottom: 8em; + right: 0; + inset-inline-start: initial; + inset-inline-end: 0; + width: 67%; + z-index: 1; +} +.videoOsdText { + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; + margin-bottom: 0.75em; + -webkit-flex-basis: 50%; + flex-basis: 50%; + -webkit-order: 0; + order: 0; +} +.videoOsdPositionContainer { + box-sizing: border-box; + font-weight: 500; + -webkit-order: 2; + order: 2; +} +.videoOsdPositionContainer-autosmall { + margin-top: 0.5em; +} +.videoOsdPositionContainer-vertical { + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + position: relative; + z-index: 1; +} +.videoOsdPositionSliderContainer { + -webkit-order: 1; + order: 1; + -webkit-flex-basis: 100%; + flex-basis: 100%; + margin: 0.1em 0 0.3em !important; +} +.videoOsdPositionText { + -webkit-order: 2; + order: 2; + -webkit-flex-basis: 35%; + flex-basis: 35%; +} +.videoOsd-audioInfo { + -webkit-order: 3; + order: 3; + -webkit-flex-basis: 30%; + flex-basis: 30%; + -webkit-justify-content: center; + justify-content: center; + font-size: 92%; +} +.videoOsdDurationText { + -webkit-order: 4; + order: 4; + -webkit-justify-content: flex-end; + justify-content: flex-end; + -webkit-flex-basis: 35%; + flex-basis: 35%; + -webkit-flex-grow: 1; + flex-grow: 1; +} +.videoOsdPositionText:not(.videoOsd-customFont-x0) { + font-size: 92%; +} +.videoOsdDurationText:not(.videoOsd-customFont-x0) { + font-size: 92%; +} +.osd-endsat { + display: -webkit-inline-flex; + display: inline-flex; + -webkit-align-items: center; + align-items: center; +} +.osd-endsat-dot { + margin: 0 1ch; + font-size: 84%; +} +@media not all and (min-width: 28em) { + .osd-endsat { + display: none !important; + } +} +.videoOsdText-remotecontrol { + margin: 1.05em 0 0.75em; + padding: 0; + -webkit-flex-direction: column; + flex-direction: column; + text-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-flex-basis: 100%; + flex-basis: 100%; +} +.videoOsdText-remotecontrol-tv { + margin: 0.25em 0 0; +} +.videoOsdText-remotecontrol-tv h3 { + font-size: inherit; +} +.videoOsdBottom-tvnowplaying.videoOsdBottom-split .osdPosterContainer, +.videoOsdBottom-tvnowplaying.videoOsdBottom-split .videoOsdText { + -webkit-margin-start: -30vw; + margin-inline-start: -30vw; +} +@media not all and (orientation: landscape) { + .osdPosterContainer { + max-height: 60%; + -webkit-flex-grow: 1; + flex-grow: 1; + overflow: hidden; + -webkit-justify-content: center; + justify-content: center; + } + .videoOsdBottom-safe.videoOsdBottom-split .osdPosterContainer, + .videoOsdBottom-safe.videoOsdBottom-split .videoOsdText-remotecontrol { + display: none !important; + } + .videoOsdBottom-maincontrols { + -webkit-align-content: flex-end; + align-content: flex-end; + } + .videoOsdBottom-safe.videoOsdBottom-split .videoOsdBottom-maincontrols { + padding-top: 0.75em; + } +} +@media all and (min-width: 50em) { + .videoOsd-customFont-x2 { + font-size: 1.1em; + } +} +@media all and (orientation: landscape) { + .videoOsdBottomMaincontrols-autoexpand { + -webkit-flex-shrink: initial; + flex-shrink: initial; + -webkit-flex-grow: 1; + flex-grow: 1; + -webkit-align-content: flex-start; + align-content: flex-start; + } +} +.videoOsdSecondaryText { + -webkit-align-items: baseline; + align-items: baseline; +} +.videoOsdSecondaryText-withparentname { + margin-bottom: 0.25em; + font-weight: 500; +} +.videoOsdSecondaryText-tv { + margin-bottom: 0.25em; +} +.videoOsdSecondaryText-remotecontrol { + -webkit-align-items: center; + align-items: center; + -webkit-flex-direction: column; + flex-direction: column; + margin-bottom: 0; +} +.videoOsdSecondaryMediaInfo-remotecontrol { + font-size: 92%; + font-weight: 500; + margin-top: 1em; + margin-bottom: 0; + -webkit-margin-start: 0; + margin-inline-start: 0; + -webkit-margin-end: 0; + margin-inline-end: 0; +} +.osdTextActionButton { + color: inherit !important; + font-weight: inherit !important; +} +.videoOsdTitle, +.videoOsdParentTitle, +.videoOsdThirdTitle { + font-weight: 600; +} +.videoOsdThirdTitle { + margin: 0; +} +.videoOsdBottom-hidden:not(.videoOsdBottom-tvnowplaying) { + opacity: 0; +} +@-webkit-keyframes osd-animate-text { + 0% { + -webkit-transform: scale(1.1); + transform: scale(1.1); + opacity: 0; + } + 100% { + -webkit-transform: none; + transform: none; + opacity: initial; + } +} +@keyframes osd-animate-text { + 0% { + -webkit-transform: scale(1.1); + transform: scale(1.1); + opacity: 0; + } + 100% { + -webkit-transform: none; + transform: none; + opacity: initial; + } +} +.videoOsdBottom-tvnowplaying:not(.videoOsdBottom-art) .osdPosterContainer, +.videoOsdBottom-tvnowplaying:not(.videoOsdBottom-art) .videoOsdText, +.videoOsdBottom-tvnowplaying:not(.videoOsdBottom-art) + .osdContentSection:not(.osdPlayQueue) { + display: none !important; +} +.osdIconButton-icon, +.osdContentSectionToggleButtonIcon { + padding: 0.08em !important; +} +.osdIconButton, +.osdContentSectionToggleButton { + padding: 0.5em !important; +} +.videoOsd-nobuttonmargin .osdIconButton, +.videoOsd-nobuttonmargin .osdContentSectionToggleButton { + margin: 0 0.3ch; +} +.videoOsdBottom-buttons { + -webkit-margin-start: -1em; + margin-inline-start: -1em; + -webkit-order: 3; + order: 3; +} +.videoOsdBottom-buttons-remotecontrol { + margin: 0; + -webkit-flex-direction: row; + flex-direction: row; + padding: 0; + -webkit-align-items: center; + align-items: center; + -webkit-justify-content: center; + justify-content: center; +} +.videoOsdBottom-buttons-remotecontrol-tv { + -webkit-flex-basis: 50%; + flex-basis: 50%; + -webkit-flex-grow: 1; + flex-grow: 1; +} +.videoOsdBottom-buttons-topright { + -webkit-margin-start: auto; + margin-inline-start: auto; + -webkit-margin-end: -0.75em; + margin-inline-end: -0.75em; + -webkit-flex-basis: content; + flex-basis: content; + -webkit-order: 1; + order: 1; + -webkit-align-items: flex-end; + align-items: flex-end; + margin-bottom: 0.25em; +} +.videoOsdBottom-buttons-topright-remotecontrol { + -webkit-justify-content: center; + justify-content: center; + width: 100%; + -webkit-margin-start: initial; + margin-inline-start: initial; + -webkit-flex-basis: 100%; + flex-basis: 100%; + margin: 0; + -webkit-order: 4; + order: 4; +} +.videoOsdBottom-buttons-topright-remotecontrol-tv { + margin-bottom: 0.5em; + -webkit-flex-basis: 100%; + flex-basis: 100%; +} +.osdVolumeDisplayIcon-left { + -webkit-margin-end: 0.25em; + margin-inline-end: 0.25em; + -webkit-margin-start: 1.6em; + margin-inline-start: 1.6em; +} +.osdVolumeDisplayIcon-right { + -webkit-margin-start: 0.25em; + margin-inline-start: 0.25em; + -webkit-margin-end: 1.6em; + margin-inline-end: 1.6em; +} +.btnMuteOSD-remotecontrol { + -webkit-margin-start: 0 !important; + margin-inline-start: 0 !important; + display: none; +} +.videoOsdVolumeControls { + -webkit-justify-content: center; + justify-content: center; +} +.videoOsdVolumeControls:not(.videoOsdVolumeControls-showhover) { + -webkit-order: 2; + order: 2; + -webkit-flex-basis: 100%; + flex-basis: 100%; + padding: 0; +} +@media all and (min-height: 38em) { + .videoOsdVolumeControls:not(.videoOsdVolumeControls-showhover) { + padding: 0.25em 0; + } +} +@media all and (min-height: 50em) { + .videoOsdVolumeControls:not(.videoOsdVolumeControls-showhover) { + padding: 0.5em 0; + } +} +.videoOsdPositionSlider { + margin: -1.605em 0; +} +.videoOsdPositionContainer-limitwidth { + -webkit-margin-start: auto; + margin-inline-start: auto; + -webkit-margin-end: auto; + margin-inline-end: auto; + width: 100%; + box-sizing: border-box; + max-width: 50em; +} +.videoOsdVolumeSliderWrapper { + max-width: 44em; +} +.videoOsdVolumeControls-showhover > .videoOsdVolumeSliderWrapper { + position: absolute; + top: -2.75em; + left: -3.5em; + inset-inline-start: -3.5em; + inset-inline-end: initial; + display: none; + width: 8.5em; + z-index: 99999999; + background: #262626; + padding: 1.25em 1.25em; + border-radius: 0.3em; + max-width: initial; +} +.videoOsdVolumeControls-showhover:hover > .videoOsdVolumeSliderWrapper { + display: -webkit-flex; + display: flex; +} +.videoOsdVolumeControls-showhover > .osdVolumeDisplayIcon { + display: none; +} +@media not all and (pointer: fine) { + .videoOsdVolumeControls-hidetouch { + display: none !important; + } +} +@media not all and (min-width: 50em) { + .videoOsdVolumeControls-hidetouch { + display: none !important; + } +} +.volumeButtons { + margin-top: 0; + margin-bottom: 0; + -webkit-margin-start: auto; + margin-inline-start: auto; + -webkit-margin-end: 0.5em; + margin-inline-end: 0.5em; + display: -webkit-flex; + display: flex; + -webkit-align-items: center; + align-items: center; +} +.videoOsdParentTitle { + margin: 0; +} +.videoOsdTitle { + margin-top: 0; + margin-bottom: 0; + -webkit-margin-start: 0; + margin-inline-start: 0; + -webkit-margin-end: 1em; + margin-inline-end: 1em; +} +.videoOsdSecondaryText-remotecontrol .videoOsdTitle { + -webkit-margin-end: 0; + margin-inline-end: 0; +} +.osdTitle-remotecontrol { + margin: 0; +} +@media not all and (pointer: fine) { + .videoOsd-centerButtons-autolayout { + position: fixed; + top: 45%; + left: 0; + right: 0; + inset-inline-start: 0; + inset-inline-end: 0; + -webkit-justify-content: center; + justify-content: center; + display: -webkit-flex; + display: flex; + -webkit-align-self: center; + align-self: center; + margin-top: -2em; + font-size: 130%; + font-size: 3.5vmax; + } + @media all and (orientation: portrait) { + .videoOsd-centerButtons-autolayout { + top: 50%; + } + } + .videoOsd-btnPause-autolayout { + -webkit-margin-start: 10%; + margin-inline-start: 10%; + -webkit-margin-end: 10%; + margin-inline-end: 10%; + } +} +.videoOsd-forwardIcon-flipped { + -webkit-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.btnOsdRewindIcon, +.btnOsdFastForwardIcon { + will-change: animate; +} +.videoOsdParentTitleContainer { + position: relative; +} +.btnOsdMore-title { + margin-top: 0; + margin-bottom: 0; + -webkit-margin-start: 0.5em; + margin-inline-start: 0.5em; + -webkit-margin-end: 0; + margin-inline-end: 0; + padding: 0.16em; + position: absolute; + right: -2.5em; + inset-inline-start: initial; + inset-inline-end: -2.5em; +} +@media all and (pointer: fine) { + .btnOsdMore-title { + display: none !important; + } +} +@media not all and (pointer: fine) { + .btnOsdMore-bottom-autohide { + display: none !important; + } +} +.videoosd-tabsslider { + -webkit-column-gap: 0.25ch; + column-gap: 0.25ch; + -webkit-align-items: center; + align-items: center; + padding: 0 0.5em; +} +.videoosd-tab-button { + padding: 0.25em 1em !important; + border-radius: 100em; + -webkit-margin-end: 2em; + margin-inline-end: 2em; + overflow: visible; +} +.videoosd-tab-button:hover { + background: hsla( + var(--theme-text-color-hue), + var(--theme-text-color-saturation), + var(--theme-text-color-lightness), + 0.2); +} +.videoosd-tab-button:active { + color: var(--theme-accent-text-color); +} +.videoosd-tab-button::before { + left: -1em !important; + right: -1em !important; +} +.videoosd-tab-button.emby-tab-button-active::before { + position: absolute; + top: 0; + left: -1em; + right: -1em; + bottom: 0; + content: " "; + z-index: -1; + border-radius: inherit; +} +.videoosd-tabcontainers { + height: 38vh; + height: var(--videoosd-tabs-height); + transition: height 0.4s ease-out; + overflow: hidden; + border-radius: 0.6em; + contain: strict; + margin: 0 -1em; + -webkit-flex-shrink: 0; + flex-shrink: 0; + -webkit-order: 6; + order: 6; +} +.videoOsdBottom-tabs { + -webkit-justify-content: flex-start; + justify-content: flex-start; + -webkit-order: 5; + order: 5; +} +.videoOsdBottom-tabs-remotecontrol { + -webkit-justify-content: center; + justify-content: center; + margin-top: 1em; + -webkit-flex-basis: 100%; + flex-basis: 100%; +} +.videoOsdTabs-margintop .videoosd-tabsslider { + margin-top: 0.5em; +} +.videoosd-tabcontainers-hidden { + height: 0; +} +.videoosd-tab { + overflow: hidden; +} +.videoosd-tab:not(.videoosd-activetab) { + display: none; +} +.videoosd-tabsslider:focus-within .emby-tab-button-active:not(:focus) { + background: 0 0; + color: inherit; +} +.videoosd-tabsslider:focus-within .emby-tab-button-active:not(:focus)::before { + background: 0 0; +} +.videoosd-bottom-with-opentab .videoOsd-hideWithOpenTab { + display: none !important; +} +.videoosd-bottom-locked .videoOsd-hideWhenLocked { + display: none !important; +} +@media not all and (min-height: 24em), not all and (min-width: 28em) { + .videoOsdBottom-tabs, + .videoosd-tabcontainers { + display: none !important; + } +} +.videoosd-tabBackground { + background: rgba(60, 60, 60, 0.8); +} +@supports (backdrop-filter: blur(1em)) or (-webkit-backdrop-filter: blur(1em)) { + .videoosd-tabBackground-backdropfilter { + background: rgba(56, 56, 56, 0.76); + -webkit-backdrop-filter: saturate(1.8) blur(4em); + backdrop-filter: saturate(1.8) blur(4em); + } +} +.btnCloseTabContent { + margin: 0 !important; + position: relative; + top: -0.15em; + padding: 0.25em !important; + background-color: black; + color: var(--theme-accent-text-color-darkbg); +} +.btnCloseTabContent.icon-button-focusscale { + padding: 0 !important; +} +.videoosd-poster { + width: 9em; + width: calc((var(--videoosd-tabs-height) - 2em) * (2 / 3)); + max-width: 20vw; + overflow: hidden; + -webkit-margin-end: 1.25em; + margin-inline-end: 1.25em; +} +.osdInfoImageCard { + width: 100% !important; +} +.osdInfoImageCardBox { + margin: 0 !important; +} +.videoosd-info { + overflow: hidden; +} +.videoosd-info-overview { + overflow: hidden; + text-overflow: ellipsis; + margin-top: 0.25em; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 4; +} +@supports selector(:hover) and (display: revert) and (column-gap: 1em) { + .videoosd-info-mediainfoContainer { + -webkit-column-gap: 1em; + column-gap: 1em; + } +} +.videoOsd-itemstab-card.squareCard { + width: 20vw; + max-width: 34vw; +} +.videoOsd-itemstab-card.fourThreeCard { + width: 12vw; + max-width: 44vw; +} +.videoOsd-itemstab-card.backdropCard { + width: 19vw; + max-width: 44vw; +} +.videoOsd-itemstab-card.portraitCard { + width: 8vw; + max-width: 30vw; +} +.videoOsd-itemstab-card-twoline.backdropCard { + width: calc((var(--videoosd-tabs-height) - 3.75em) * (16 / 9)); +} +.videoOsd-itemstab-card-twoline.fourThreeCard { + width: calc((var(--videoosd-tabs-height) - 3.5em) * (4 / 3)); +} +.videoOsd-itemstab-card-twoline.portraitCard { + width: calc((var(--videoosd-tabs-height) - 2.25em) * (2 / 3)); +} +.videoOsd-itemstab-card-twoline.squareCard { + width: calc((var(--videoosd-tabs-height) - 3em)); +} +.videoOsd-itemstab-card-threeline.backdropCard { + width: calc((var(--videoosd-tabs-height) - 5.75em) * (16 / 9)); +} +.videoOsd-itemstab-card-threeline.fourThreeCard { + width: calc((var(--videoosd-tabs-height) - 4.75em) * (4 / 3)); +} +.videoOsd-itemstab-card-threeline.portraitCard { + width: calc((var(--videoosd-tabs-height) - 3.75em) * (2 / 3)); +} +.videoOsd-itemstab-card-threeline.squareCard { + width: calc((var(--videoosd-tabs-height) - 4.25em)); +} +.videoOsd-cardImageContainer-sideFooter { + width: 4.4em; + height: 4.4em; +} +.videoOsd-itemstab-card .cardText { + font-weight: 500; + font-size: 92%; +} +.videoosd-itemstab .scrollbuttoncontainer { + background: 0 0 !important; + overflow: visible; +} +.videoosd-itemstab .emby-scrollbuttons-scrollbutton { + background: #fff !important; + color: #000 !important; + border-radius: 100em; + padding: 0.2em; + box-shadow: + 0 4px 5px 0 rgba(0, 0, 0, 0.14), + 0 1px 10px 0 rgba(0, 0, 0, 0.12), + 0 2px 4px -1px rgba(0, 0, 0, 0.4) !important; + margin: 0 0.5em; +} +.videoosd-itemstab + .scrollbuttoncontainer:hover + > .emby-scrollbuttons-scrollbutton { + -webkit-transform: scale(1.1, 1.1); + transform: scale(1.1, 1.1); +} +.videoosd-guidetab .guideSettingsContainer, +.videoosd-guidetab .btnGuideViewSettings { + display: none !important; +} +.videoosd-guidetab .programCellInner { + background: rgba(0, 0, 0, 0.5); +} +.videoosd-guidetab .channelCellInner { + background: #242424; +} +.videoosd-guidetab .firstChannelCell-withscroll { + background: #242424 !important; +} +.videoosd-padded-left { + -webkit-padding-start: 3.8%; + padding-inline-start: 3.8%; + -webkit-padding-start: min(3.8%, 3.6em); + padding-inline-start: min(3.8%, 3.6em); +} +.videoosd-padded-right { + -webkit-padding-end: 3.8%; + padding-inline-end: 3.8%; + -webkit-padding-end: min(3.8%, 3.6em); + padding-inline-end: min(3.8%, 3.6em); +} +@media all and (max-height: 30em) and (orientation: landscape) { + .videoOsdPositionContainer-autosmall, + .videoosd-tabcontainers-autosmall, + .videoOsdBottom-contentbuttons, + .videoOsdBottom-buttons-remotecontrol { + margin: 0 auto; + } + .videoOsdText-autosmall { + margin: 0 !important; + -webkit-flex-shrink: 0; + flex-shrink: 0; + -webkit-flex-basis: 55% !important; + flex-basis: 55% !important; + -webkit-align-items: flex-start; + align-items: flex-start; + -webkit-justify-content: center; + justify-content: center; + max-height: 40%; + text-align: start; + } + .osdPosterContainer-autoexpand { + -webkit-flex-shrink: 0; + flex-shrink: 0; + margin: 0 auto; + -webkit-flex-basis: 45% !important; + flex-basis: 45% !important; + max-height: 40% !important; + } + .osdTextActionButton { + text-align: start; + } + .osdRemoteControlImageCard-automargin { + margin-top: 0 !important; + margin-bottom: 0 !important; + -webkit-margin-start: auto !important; + margin-inline-start: auto !important; + -webkit-margin-end: 1em !important; + margin-inline-end: 1em !important; + } + .videoOsdSecondaryText-remotecontrol { + -webkit-align-items: initial; + align-items: initial; + } +} +.videoOsdBottom-contentbuttons-tv { + -webkit-flex-basis: 50%; + flex-basis: 50%; + -webkit-justify-content: flex-end; + justify-content: flex-end; + -webkit-margin-end: -0.75em; + margin-inline-end: -0.75em; +} +@media not all and (min-height: 30em) { + .videoOsdVolumeControls { + display: none !important; + } +} +.videoOsdVolumeSliderWrapper-customfont { + font-size: 1rem; +} +@media all and (min-width: 42em), (orientation: portrait) { + .videoOsd-customFont-remotecontrol-buttons { + font-size: 1.1em; + } +} +@media all and (orientation: landscape) { + .videoOsd-customFont-remotecontrol { + font-size: 1.1em; + } + .videoOsdBottom-split:not(.videoOsdBottom-tvnowplaying) { + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + -webkit-justify-content: initial; + justify-content: initial; + } + @media all and (min-height: 67em) { + .videoOsdBottom-split:not(.videoOsdBottom-tvnowplaying) { + margin-top: 1.5em; + } + } +} +@media all and (min-width: 54em) { + .videoOsd-customFont-remotecontrol-buttons { + font-size: 1.2em; + } +} +@media all and (min-width: 80em) { + .videoOsd-customFont-remotecontrol { + font-size: 1.2em; + } +} +.nowplaying-backdropcontainer-blur { + -webkit-filter: blur(2vh) brightness(0.3); + filter: blur(2vh) brightness(0.3); +} +.nowplaying-backdropcontainer-blur-high { + -webkit-filter: blur(9vh) brightness(0.6); + filter: blur(9vh) brightness(0.6); +} +.nowplaying-backdropcontainer-blur-extrasaturation { + -webkit-filter: saturate(2) blur(2vh) brightness(0.4); + filter: saturate(2) blur(2vh) brightness(0.4); +} +.nowplaying-backdropcontainer-blur-extrasaturation.nowplaying-backdropcontainer-blur-high { + -webkit-filter: saturate(2) blur(9vh) brightness(0.7); + filter: saturate(2) blur(9vh) brightness(0.7); +} +.nowplaying-backgroundcontainer-blur { + background-color: rgba(0, 0, 0, 0) !important; + background-image: none !important; +} +@supports (backdrop-filter: blur(1em)) or (-webkit-backdrop-filter: blur(1em)) { + .nowplaying-backdropcontainer-blur-backdropfilter { + -webkit-filter: none !important; + filter: none !important; + } + .nowplaying-backgroundcontainer-blur-backdropfilter { + background-color: rgba(0, 0, 0, 0) !important; + -webkit-backdrop-filter: saturate(1.4) blur(10vmax) brightness(0.7); + backdrop-filter: saturate(1.4) blur(10vmax) brightness(0.7); + } +} +.nowplaying-backgroundcontainer-brighter { + background-color: rgba(0, 0, 0, 0.65) !important; +} +.doc-nowplaying-blur { + background-position: center; + background-size: cover; + background-repeat: no-repeat; + background-color: #444 !important; +} +.videoOsd-ratingInfo { + position: fixed; + top: 3vh; + left: 0; + inset-inline-start: 0; + inset-inline-end: initial; + margin-top: 0; + margin-bottom: 0; + -webkit-margin-start: 4%; + margin-inline-start: 4%; + -webkit-margin-end: 0; + margin-inline-end: 0; + overflow: hidden; +} +.videoOsd-ratingText::before { + content: " "; + background: #52b54b; + width: 0.53ch; + position: absolute; + top: 0; + bottom: 0; + left: 0; + inset-inline-start: 0; + inset-inline-end: initial; + border-radius: 0.3em; +} +.videoOsd-ratingText { + margin: 0; + padding-top: 0.4em; + padding-bottom: 0.4em; + -webkit-padding-start: 0.9em; + padding-inline-start: 0.9em; + -webkit-padding-end: 0; + padding-inline-end: 0; + position: relative; + font-weight: 500; + -webkit-animation: osd-rating-animate 4s ease-out forwards; + animation: osd-rating-animate 4s ease-out forwards; + -webkit-animation-iteration-count: 1; + animation-iteration-count: 1; + -webkit-animation-delay: 3s; + animation-delay: 3s; + -webkit-transform-origin: bottom center; + transform-origin: bottom center; + opacity: 0; +} +.videoOsd-ratingDescription { + font-weight: 400; + margin-top: 0.1em; +} +@-webkit-keyframes osd-rating-animate { + 0% { + -webkit-transform: translateY(100%); + transform: translateY(100%); + opacity: 0; + } + 15% { + -webkit-transform: none; + transform: none; + opacity: 1; + } + 85% { + -webkit-transform: none; + transform: none; + opacity: 1; + } + 100% { + -webkit-transform: translateY(-100%); + transform: translateY(-100%); + opacity: 0; + } +} +@keyframes osd-rating-animate { + 0% { + -webkit-transform: translateY(100%); + transform: translateY(100%); + opacity: 0; + } + 15% { + -webkit-transform: none; + transform: none; + opacity: 1; + } + 85% { + -webkit-transform: none; + transform: none; + opacity: 1; + } + 100% { + -webkit-transform: translateY(-100%); + transform: translateY(-100%); + opacity: 0; + } +} +.osd-transport-animationtext { + position: fixed; + opacity: 0; + top: 45%; + height: 2em; + box-sizing: border-box; + display: -webkit-flex; + display: flex; + -webkit-align-items: center; + align-items: center; + -webkit-justify-content: center; + justify-content: center; + text-shadow: #000 0 0 0.5em; + margin: -1.5em 0 0 0; + font-weight: 500; + pointer-events: none; + touch-action: none; +} +@media all and (orientation: portrait) { + .osd-transport-animationtext { + top: 55%; + margin: -1em 0 0 0; + } +} +.osd-rew-animationtext { + left: 2.5%; + inset-inline-start: 2.5%; + inset-inline-end: initial; + -webkit-transform: translateX(100%); + transform: translateX(100%); +} +[dir="rtl"] .osd-rew-animationtext { + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} +.osd-ff-animationtext { + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + right: 2.5%; + inset-inline-start: initial; + inset-inline-end: 2.5%; +} +[dir="rtl"] .osd-ff-animationtext { + -webkit-transform: translateX(100%); + transform: translateX(100%); +} +.osd-raisedbutton { + box-shadow: + 0 0.06933em 0.06933em 0 rgba(0, 0, 0, 0.14), + 0 0.13866em 0.06933em -0.06933em rgba(0, 0, 0, 0.12), + 0 0.06933em 0.208em 0 rgba(0, 0, 0, 0.2); + padding: 0.54em 2ch !important; +} +.osd-raisedbutton:hover { + background: hsla( + var(--theme-text-color-hue), + var(--theme-text-color-saturation), + var(--theme-text-color-lightness), + 0.2); +} +.osd-raisedbutton:active { + color: var(--theme-accent-text-color); +} +.btnPlayNextFromUpNext { + padding: 0 !important; + overflow: hidden; +} +.btnPlayNextFromUpNext-inner { + padding: 0.54em 2ch !important; + position: relative; +} +.btnPlayNextFromUpNext-progress { + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 100%; + transition: -webkit-transform 0.3s linear; + transition: transform 0.3s linear; + -webkit-transform-origin: center left; + transform-origin: center left; + -webkit-transform: scaleX(0); + transform: scaleX(0); + background: rgba(255, 255, 255, 0.3); +} +[dir="rtl"] .btnPlayNextFromUpNext-progress { + -webkit-transform-origin: center right; + transform-origin: center right; +} +.btnPlayNextFromUpNext:focus-visible .btnPlayNextFromUpNext-progress { + background: rgba(0, 0, 0, 0.3); +} +.btnPlayNextFromUpNext.emby-button-tv:focus .btnPlayNextFromUpNext-progress { + background: rgba(0, 0, 0, 0.3); +} +.upNextContainer, +.skipIntroContainer { + position: fixed; + bottom: 12em; + bottom: min(12em, 38vh); + right: 2.5%; + right: calc(min(5ch, 2%) + 0.7em); + inset-inline-start: initial; + inset-inline-end: 2.5%; + inset-inline-end: calc(min(5ch, 2%) + 0.7em); + margin-top: 0 !important; + margin-bottom: 0 !important; + -webkit-margin-start: 0 !important; + margin-inline-start: 0 !important; + -webkit-margin-end: 0 !important; + margin-inline-end: 0 !important; + z-index: 1; + display: -webkit-flex; + display: flex; + -webkit-align-items: center; + align-items: center; +} +.videoosd-withupnext { + display: none !important; +} +.brightnessSliderContainer { + position: fixed; + top: 7.5em; + top: max(7.5em, 15%); + bottom: 15em; + bottom: min(15em, 45vh); + right: 3%; + inset-inline-start: initial; + inset-inline-end: 3%; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + flex-direction: column; + -webkit-justify-content: center; + justify-content: center; + -webkit-align-items: center; + align-items: center; + z-index: 1; +} +@media all and (pointer: fine) { + .brightnessSliderContainer { + display: none !important; + } +} +@media all and (orientation: portrait) { + .brightnessSliderContainer { + display: none !important; + } +} +.videoOsdBrightnessIcon { + font-size: 200%; + margin-bottom: 0.25em; + -webkit-flex-shrink: 0; + flex-shrink: 0; +} +.videoOsdUnlockControls { + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + flex-direction: column; + -webkit-align-items: center; + align-items: center; + -webkit-justify-content: center; + justify-content: center; + padding: 1em 1ch 2em; + -webkit-flex-basis: 100%; + flex-basis: 100%; +} +.videoOsd-btnToggleLock-bg { + background: #fff; + color: #000; +} +@media all and (pointer: fine) { + .videoOsd-btnLock { + display: none !important; + } +} diff --git a/videoosd/videoosd.html b/videoosd/videoosd.html index b0c0657..6ae3f42 100644 --- a/videoosd/videoosd.html +++ b/videoosd/videoosd.html @@ -197,7 +197,7 @@ - @@ -225,4 +225,4 @@ - \ No newline at end of file + diff --git a/videoosd/videoosd.js b/videoosd/videoosd.js index 8f04479..a222f1d 100644 --- a/videoosd/videoosd.js +++ b/videoosd/videoosd.js @@ -1 +1,3652 @@ -define(["exports","./../modules/common/playback/playbackmanager.js","./../modules/focusmanager.js","./../modules/cardbuilder/cardbuilder.js","./../modules/imageloader/imageloader.js","./../modules/dom.js","./../modules/browser.js","./../modules/common/globalize.js","./../modules/common/datetime.js","./../modules/layoutmanager.js","./../modules/common/itemmanager/itemmanager.js","./../modules/loading/loading.js","./../modules/emby-apiclient/events.js","./../modules/emby-apiclient/connectionmanager.js","./../modules/appheader/appheader.js","./../modules/mediainfo/mediainfo.js","./../modules/backdrop/backdrop.js","./playqueue.js","./tvplayqueue.js","./lyrics.js","./../modules/approuter.js","./../modules/itemcontextmenu.js","./../modules/shortcuts.js","./../modules/common/inputmanager.js","./../modules/common/usersettings/usersettings.js","./../modules/input/mouse.js","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/emby-elements/emby-button/paper-icon-button-light.js","./../modules/emby-elements/emby-tabs/emby-tabs.js","./../modules/emby-elements/emby-slider/emby-slider.js","./../modules/common/appsettings.js","./../modules/common/servicelocator.js","./../modules/input/keyboard.js","./../modules/viewmanager/baseview.js"],function(_exports,_playbackmanager,_focusmanager,_cardbuilder,_imageloader,_dom,_browser,_globalize,_datetime,_layoutmanager,_itemmanager,_loading,_events,_connectionmanager,_appheader,_mediainfo,_backdrop,_playqueue,_tvplayqueue,_lyrics,_approuter,_itemcontextmenu,_shortcuts,_inputmanager,_usersettings,_mouse,_embyScroller,_paperIconButtonLight,_embyTabs,_embySlider,_appsettings,_servicelocator,_keyboard,_baseview){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,require(["css!videoosd/videoosd.css"]);var useBackdropFilterForBlur=_dom.default.allowBackdropFilter(),headerElement=document.querySelector(".skinHeader"),backdropContainer=document.querySelector(".backdropContainer"),backgroundContainer=document.querySelector(".backgroundContainer");function showActionSheet(options){return Emby.importModule("./modules/actionsheet/actionsheet.js").then(function(ActionSheet){return ActionSheet.show(options)})}var deviceMemory,platform,cores,enableHighResBlur=!((cores=navigator.hardwareConcurrency||4)<6||(deviceMemory=navigator.deviceMemory||2)<2||(platform=(navigator.platform||"").toLowerCase(),"android"===globalThis.appMode&&(cores<4||deviceMemory<2||platform.includes("armv7"))));function isDisplayingLocalVideo(player,mediaType){return!(!player||!player.isLocalPlayer)&&("Video"===mediaType||!mediaType&&_playbackmanager.default.isPlayingMediaType(["Video"],player))}function getRewindIconLTR(){switch(_usersettings.default.skipBackLength()){case 5e3:return"";case 1e4:return"";case 3e4:return"";default:return""}}function getForwardIconLTR(){switch(_usersettings.default.skipForwardLength()){case 5e3:return"";case 1e4:return"";case 3e4:return"";default:return""}}function showMoreMenu(item,button){_connectionmanager.default.getApiClient(item.ServerId).getCurrentUser().then(function(user){return _itemcontextmenu.default.show(function(item,user,button){return{items:[item],open:!1,play:!1,playAllFromHere:!1,queueAllFromHere:!1,positionTo:button,cancelTimer:!1,record:!1,deleteItem:!1,shuffle:!1,instantMix:!1,user:user,share:!0,queue:!1,editSubtitles:!1,positionY:"above",transformOrigin:"center bottom",convert:!1,refreshMetadata:!1,identify:!1,autoTvLayout:!1}}(item,user,button))})}function focusMainOsdControls(instance){_focusmanager.default.focus(instance.nowPlayingPositionSlider)}function hideOrShowAll(instance,elems,hide,focusedElement){for(var wasFocused,i=0,length=elems.length;i'+text+""}function getSecondaryName(item,enableLinkButton){var title=_itemmanager.default.getDisplayName(item,{includeParentInfo:"Program"!==item.Type,includeIndexNumber:"Program"!==item.Type});return enableLinkButton?getTextActionButton(item,title):title}function getDefaultOsdContentSection(){return _layoutmanager.default.tv||1056<=_dom.default.getWindowSize().innerWidth?"playqueue":null}function destroyPlayQueue(instance){var playQueue=instance.playQueue;playQueue&&(playQueue.destroy(),instance.playQueue=null)}function destroyLyricsRenderer(instance){var lyricsRenderer=instance.lyricsRenderer;lyricsRenderer&&(lyricsRenderer.destroy(),instance.lyricsRenderer=null)}function destroyStats(instance){var statsOverlay=instance.statsOverlay;statsOverlay&&(statsOverlay.destroy(),instance.statsOverlay=null)}function destroySubtitleOffsetOverlay(instance){var subtitleOffsetOverlay=instance.subtitleOffsetOverlay;subtitleOffsetOverlay&&(subtitleOffsetOverlay.destroy(),instance.subtitleOffsetOverlay=null)}function clearBlurFromDocumentElement(){document.documentElement.classList.remove("doc-nowplaying-blur"),document.documentElement.style.backgroundImage=null,backgroundContainer&&(backgroundContainer.style.backgroundImage=null)}function shouldOsdBeShown(instance){return!_layoutmanager.default.tv||!!instance.currentVisibleMenu||!(instance=instance.currentPlayer)||isDisplayingLocalVideo(instance)}var supportsTouchEvent="ontouchstart"in document.documentElement;function rewind(instance,animate){var player=instance.currentPlayer;animate&&((animate=instance.view.querySelector(".osd-rew-animationtext")).innerHTML="-"+parseInt(_usersettings.default.skipBackLength()/1e3),fadeInAndOut(animate)),_playbackmanager.default.rewind(player)}function fadeInAndOut(elem){if(elem.animate)try{elem.animate([{opacity:"1",offset:.5},{opacity:"0",transform:"none",offset:1}],{duration:600,iterations:1,easing:"ease-out"})}catch(err){console.log("error animating element: "+err)}}function fastForward(instance,animate){var player=instance.currentPlayer;animate&&((animate=instance.view.querySelector(".osd-ff-animationtext")).innerHTML="+"+parseInt(_usersettings.default.skipForwardLength()/1e3),fadeInAndOut(animate)),_playbackmanager.default.fastForward(player)}function onOsdClick(e,instance,elementToFocusIfShowing,showOsdIfNoEvent){var target=e.target;if(target.closest(".videoOsdBottom"))showOsdIfNoEvent&&instance.showOsd();else if(!target.closest("button"))return target=instance.currentPlayer,!e.button&&target&&isDisplayingLocalVideo(target)?(instance.showOsd(null,elementToFocusIfShowing),_playbackmanager.default.playPause(target)):showOsdIfNoEvent&&instance.showOsd(),1}function toggleStats(instance){require(["playerStats"],function(PlayerStats){var player=instance.currentPlayer;player&&(instance.statsOverlay?instance.statsOverlay.toggle():(instance.statsOverlay=new PlayerStats({player:player,view:instance.view}),_events.default.on(instance.statsOverlay,"close",function(){this.currentVisibleMenu&&!this.upNextContainer._visible&&_focusmanager.default.focus(this.btnVideoOsdSettingsRight)}.bind(instance))))})}function setBottomTabIndex(instance,index){var bottomTabButtons,bottomTabs=instance.bottomTabs;-1===index?bottomTabs.selectedIndex(index):(bottomTabButtons=instance.bottomTabButtons,instance.showOsd(null,bottomTabButtons[index]),bottomTabs.selectedIndex(index),_focusmanager.default.focus(bottomTabButtons[index]))}function onRewindInputCommand(e,instance){instance.currentVisibleMenu||e.detail.repeat||(rewind(instance),e.preventDefault()),shouldOsdBeShown(instance)&&instance.showOsd()}function onFastForwardInputCommand(e,instance){instance.currentVisibleMenu||e.detail.repeat||(fastForward(instance),e.preventDefault()),shouldOsdBeShown(instance)&&instance.showOsd()}function startOsdHideTimer(instance,timeoutMs){var isLocalVideo;stopOsdHideTimer(instance),instance.paused||!(isLocalVideo=isDisplayingLocalVideo(instance.currentPlayer))||0===timeoutMs||_focusmanager.default.hasExclusiveFocusScope()||(instance.osdHideTimeout=setTimeout(instance.boundOnOsdHideTimeout,timeoutMs||(isLocalVideo?4e3:1e4)))}function stopOsdHideTimer(instance){var osdHideTimeout=instance.osdHideTimeout;osdHideTimeout&&(clearTimeout(osdHideTimeout),instance.osdHideTimeout=null)}var systemUIHidden,orientationLocked=!1;function onOrientationChangeSuccess(){orientationLocked=!0}function onOrientationChangeError(err){orientationLocked=!0,console.log("error locking orientation: "+err)}function setSystemUIHidden(hidden){if(systemUIHidden!==hidden&&(systemUIHidden=hidden,_servicelocator.appHost.setSystemUIHidden))try{_servicelocator.appHost.setSystemUIHidden(hidden)}catch(err){console.log("Error in setSystemUIHidden: "+err)}}var enableOrientationLock=!_browser.default.tv;function lockOrientation(type){var _screen$orientation;enableOrientationLock&&!function(orientation){var promise;try{return(promise=screen.orientation&&screen.orientation.lock?screen.orientation.lock(orientation):promise)&&promise.then?promise:Promise.resolve()}catch(err){return Promise.reject(err)}}(type=type||(null==(_screen$orientation=screen.orientation)?void 0:_screen$orientation.type)||"landscape").then(onOrientationChangeSuccess,onOrientationChangeError)}function unlockOrientation(){if(enableOrientationLock&&orientationLocked&&screen.orientation&&screen.orientation.unlock){try{screen.orientation.unlock()}catch(err){console.log("error unlocking orientation: "+err)}orientationLocked=!1}}function VideoOsd(view,params){_baseview.default.apply(this,arguments);var comingUpNextDisplayed,isEnabled,currentDisplayItem,currentDisplayChapters,currentIntroInfo,currentCreditsInfo,currentMediaSource,currentItemThumbnails,currentItemThumbnailsPromise,enableProgressByTimeOfDay,skipIntroValidated,enableAutoSkipIntro,lastPointerUpType,currentOsdContentSectionName,self=this,currentPlayerSupportedCommands=[],currentRuntimeTicks=0,lastUpdateTime=0,ratingTextNeedsUpdate=!0,programStartDateMs=0,programEndDateMs=0,playbackStartTimeTicks=0,nowPlayingVolumeSlider=(this.currentLockState=0,view.querySelector(".videoOsdVolumeSlider")),videoOsdVolumeSliderWrapper=view.querySelector(".videoOsdVolumeSliderWrapper"),brightnessSlider=view.querySelector(".videoOsdBrightnessSlider"),brightnessSliderContainer=view.querySelector(".brightnessSliderContainer"),videoOsdPositionText=(this.nowPlayingPositionSlider=view.querySelector(".videoOsdPositionSlider"),view.querySelector(".videoOsdPositionText")),videoOsdDurationText=view.querySelector(".videoOsdDurationText"),rewindButtons=view.querySelectorAll(".btnRewind"),fastForwardButtons=view.querySelectorAll(".btnOsdFastForward"),stopButtons=(this.btnPause=view.querySelector(".videoOsd-btnPause"),view.querySelectorAll(".btnVideoOsd-stop")),btnRepeatMode=view.querySelector(".btnOsdRepeatMode"),btnOsdMoreBottom=view.querySelector(".btnOsdMore-bottom"),btnOsdMoreTitle=view.querySelector(".btnOsdMore-title"),transitionEndEventName=_dom.default.whichTransitionEvent(),btnPreviousTrack=(this.osdBottomElement=view.querySelector(".videoOsdBottom"),view.querySelector(".btnPreviousTrack")),btnNextTrack=view.querySelector(".btnNextTrack"),buttonMute=view.querySelector(".buttonMute"),btnSubtitles=view.querySelector(".btnSubtitles"),btnAudio=view.querySelector(".btnAudio"),btnFullscreen=view.querySelector(".btnFullscreen"),videoOsdSecondaryText=view.querySelector(".videoOsdSecondaryText"),videoOsdBottomButtons=(this.videoOsdText=view.querySelector(".videoOsdText"),view.querySelector(".videoOsdBottom-buttons")),mainTransportButtons=view.querySelector(".videoOsd-maintransportbuttons"),videoOsdPositionContainer=view.querySelector(".videoOsdPositionContainer"),osdTitle=view.querySelector(".videoOsdTitle"),videoOsdThirdTitle=view.querySelector(".videoOsdThirdTitle"),videoOsdParentTitle=view.querySelector(".videoOsdParentTitle-small"),videoOsdParentTitleLarge=view.querySelector(".videoOsdParentTitle-large"),osdPosterContainer=view.querySelector(".osdPosterContainer"),videoOsdSecondaryMediaInfo=view.querySelector(".videoOsdSecondaryMediaInfo"),videoOsdAudioInfo=view.querySelector(".videoOsd-audioInfo"),mainLockButton=view.querySelector(".videoOsd-btnLock"),tabContainers=(this.bottomTabs=view.querySelector(".videoOsdBottom-tabs"),this.bottomTabButtons=view.querySelectorAll(".videoosd-tab-button"),view.querySelectorAll(".videoosd-tab")),btnCloseTabContent=(this.bottomTabControllers=[],this.bottomTabControllers.length=tabContainers.length,view.querySelector(".btnCloseTabContent")),tabContainersElem=view.querySelector(".videoosd-tabcontainers"),videoOsdBottomContentbuttons=view.querySelector(".videoOsdBottom-contentbuttons"),videoOsdBottomMaincontrols=(this.upNextContainer=view.querySelector(".upNextContainer"),view.querySelector(".videoOsdBottom-maincontrols")),videoOsdVolumeControls=view.querySelector(".videoOsdVolumeControls"),videoOsdButtomButtonsTopRight=view.querySelector(".videoOsdBottom-buttons-topright"),ratingInfoContainer=view.querySelector(".videoOsd-ratingInfo"),ratingTextElement=view.querySelector(".videoOsd-ratingText"),btnSkipIntro=view.querySelector(".btnSkipIntro"),skipIntroContainer=view.querySelector(".skipIntroContainer"),btnLyrics=view.querySelector(".btnLyrics"),btnVideoOsdSettingsTransportButton=(this.btnRecord=view.querySelector(".btnRecord"),this.btnVideoOsdSettingsRight=view.querySelector(".btnVideoOsdSettings-right"),view.querySelector(".btnVideoOsdSettings-transport")),btnPlayNextFromUpNextProgress=view.querySelector(".btnPlayNextFromUpNext-progress"),btnHideUpNext=view.querySelector(".btnHideUpNext"),enableSkipIntro=!0;_layoutmanager.default.tv?videoOsdBottomButtons.classList.add("videoOsdBottom-buttons-tv"):(videoOsdPositionText.classList.add("videoOsd-customFont-x0"),videoOsdDurationText.classList.add("videoOsd-customFont-x0"),ratingTextElement.classList.add("videoOsd-customFont-x2"),videoOsdBottomButtons.classList.add("videoOsd-customFont-x2"),videoOsdButtomButtonsTopRight.classList.add("videoOsd-customFont-x2"),skipIntroContainer.classList.add("videoOsd-customFont-x2"),this.upNextContainer.classList.add("videoOsd-customFont-x2"),this.osdBottomElement.classList.add("videoOsd-nobuttonmargin"));for(var i=0,length=fastForwardButtons.length;i=introInfo.start&¤tTime=endDate.getTime()&&(console.log("program info needs to be refreshed"),state=_playbackmanager.default.getPlayerState(player),onStateChanged.call(player,{type:"updatemetadata"},state))}catch(e){console.log("Error parsing date: "+item.EndDate)}}}(this,item))}var fiftyMinuteTicks=3e10,fortyMinuteTicks=24e9;function showComingUpNextIfNeeded(player,currentItem,currentTimeTicks,runtimeTicks,isStopped,creditsInfo){(runtimeTicks&¤tTimeTicks||isStopped)&&"Episode"===currentItem.Type&&self.hasNextTrack&&(currentItem=runtimeTicks-currentTimeTicks,(!comingUpNextDisplayed||isStopped)&&(creditsInfo=function(runtimeTicks,creditsInfo){return(creditsInfo=(null==creditsInfo?void 0:creditsInfo.start)||0)&&creditsInfo")),elem.innerHTML=html)}function updatePlayerBrightnessState(player){var showSlider=!_layoutmanager.default.tv&¤tPlayerSupportedCommands.includes("SetBrightness");brightnessSlider&&(showSlider?(brightnessSliderContainer.classList.remove("hide"),brightnessSlider.dragging||brightnessSlider.setValue(_playbackmanager.default.getBrightness(player))):brightnessSliderContainer.classList.add("hide"))}function updatePlayerVolumeState(player,isMuted,volumeLevel,supportedCommands){var showMuteButton=!0,showVolumeSlider=!0;supportedCommands.includes("Mute")||(showMuteButton=!1),supportedCommands.includes("SetVolume")||(showVolumeSlider=!1),isMuted?(buttonMute.setAttribute("title",_globalize.default.translate("Unmute")),buttonMute.querySelector("i").innerHTML=""):(buttonMute.setAttribute("title",_globalize.default.translate("Mute")),buttonMute.querySelector("i").innerHTML=""),showMuteButton?buttonMute.classList.remove("hide"):buttonMute.classList.add("hide"),nowPlayingVolumeSlider&&(showVolumeSlider?videoOsdVolumeControls.classList.remove("hide"):videoOsdVolumeControls.classList.add("hide"),nowPlayingVolumeSlider.dragging||nowPlayingVolumeSlider.setValue(volumeLevel))}function onSettingsButtonClick(e){var btn=this;require(["playerSettingsMenu"],function(playerSettingsMenu){var player=self.currentPlayer;player&&playerSettingsMenu.show({player:player,positionTo:btn,stats:!0,onOption:onSettingsOption,mediaType:self.currentItem.MediaType}).then(self.boundShowOsdDefaultParams,self.boundShowOsdDefaultParams)})}function onSettingsOption(selectedOption){"stats"===selectedOption?toggleStats(self):"subtitleoffset"===selectedOption&&toggleSubtitleOffset()}function toggleSubtitleOffset(){require(["subtitleOffsetOverlay"],function(SubtitleOffsetOverlay){var player=self.currentPlayer;player&&(self.subtitleOffsetOverlay||(self.subtitleOffsetOverlay=new SubtitleOffsetOverlay({player:player})),self.subtitleOffsetOverlay.show())})}var lastPointerEvent=0;function refreshThumbnailsIfNeeded(item,mediaSourceId,apiClient,maxThumbnailWidth){!item.Id||"Audio"===item.MediaType||currentItemThumbnails||currentItemThumbnailsPromise||!function(itemId,mediaSourceId,apiClient,maxThumbnailWidth){currentItemThumbnailsPromise||(currentItemThumbnailsPromise=apiClient.getThumbnails(itemId,{MediaSourceId:mediaSourceId,Width:maxThumbnailWidth}).then(function(result){return currentItemThumbnails=result,Promise.resolve(result)},function(){currentItemThumbnailsPromise=null}))}(item.Id,mediaSourceId,apiClient,maxThumbnailWidth)}function getThumbnailBubbleHtml(apiClient,itemId,mediaSourceId,thumbnailSet,chapters,positionTicks,maxThumbnailWidth){var thumbnail,thumbnails=(thumbnailSet=thumbnailSet||{}).Thumbnails||{},bubbleElement=self.nowPlayingPositionSlider.getBubbleElement();thumbnails.length?(bubbleElement.classList.add("chapterThumbImageContainer"),thumbnailSet.AspectRatio&&thumbnailSet.AspectRatio<1.4?bubbleElement.classList.add("chapterThumbImageContainer-fourthree"):bubbleElement.classList.remove("chapterThumbImageContainer-fourthree"),bubbleElement.classList.remove("chapterThumbImageContainer-noimg")):(bubbleElement.classList.remove("chapterThumbImageContainer","chapterThumbImageContainer-fourthree"),bubbleElement.classList.add("chapterThumbImageContainer-noimg")),_layoutmanager.default.tv?bubbleElement.classList.add("chapterThumbImageContainer-tv"):bubbleElement.classList.remove("chapterThumbImageContainer-tv");for(var _i16=0,_length16=thumbnails.length;_i16<_length16;_i16++){var currentThumbnail=thumbnails[_i16];if(positionTicks>=currentThumbnail.PositionTicks)thumbnail=currentThumbnail;else if(thumbnail)break}for(var _i17=0,_length17=chapters.length;_i17<_length17;_i17++){var currentChapter=chapters[_i17];if(positionTicks>=currentChapter.StartPositionTicks)chapter=currentChapter;else if(chapter)break}var chapter=chapter||{Name:" "},thumbnailSet=thumbnail?function(itemId,thumbnail,maxWidth,apiClient){return thumbnail.ImageTag?apiClient.getImageUrl(itemId,{maxWidth:maxWidth,tag:thumbnail.ImageTag,type:"Thumbnail",PositionTicks:thumbnail.PositionTicks}):null}(itemId,thumbnail,maxThumbnailWidth,apiClient):null,bubbleElement="",itemId="chapterThumbTextContainer";return thumbnailSet||(itemId+=" chapterThumbTextContainer-noimg"),self.nowPlayingPositionSlider.getBubbleElement().style.backgroundImage=thumbnailSet?"url('"+thumbnailSet+"')":null,bubbleElement=(bubbleElement=(bubbleElement=(bubbleElement=(bubbleElement=bubbleElement+('
')+'
')+(chapter?_dom.default.htmlEncode(chapter.Name):" "))+"
"+(thumbnailSet?'
':'
'))+_datetime.default.getDisplayRunningTime(positionTicks))+"
"+"
"}function onStop(){_playbackmanager.default.stop(self.currentPlayer)}_dom.default.addEventListener(view,window.PointerEvent&&!_dom.default.supportsPointerTypeInClickEvent()?"pointerup":"click",function(e){var isEnoughTimeSinceLastTap,pointerType=e.pointerType;"touch"===(lastPointerUpType=pointerType=pointerType||(supportsTouchEvent?"touch":"mouse"))?e.target.closest("BUTTON,INPUT,.videoosd-tabcontainers")?self.showOsd():!(isEnoughTimeSinceLastTap=300<(pointerType=Date.now())-lastPointerEvent)&&"click"!==e.type||(lastPointerEvent=pointerType,self.currentVisibleMenu?setTimeout(self.boundHideOsd,10):self.currentVisibleMenu||isEnoughTimeSinceLastTap&&setTimeout(self.boundShowOsdDefaultParams,100)):onOsdClick(e,self,null,!0)},{passive:!0}),_dom.default.addEventListener(view,"dblclick",function(e){e.target.closest("BUTTON")||"mouse"===lastPointerUpType&&_playbackmanager.default.toggleFullscreen(self.currentPlayer)},{passive:!0}),_dom.default.addEventListener(buttonMute,"click",function(){_playbackmanager.default.toggleMute(self.currentPlayer)},{passive:!0}),_dom.default.addEventListener(brightnessSlider,"change",function(){_playbackmanager.default.setBrightness(parseFloat(this.value),self.currentPlayer),self.showOsd()},{passive:!0}),_dom.default.addEventListener(brightnessSlider,"input",function(){_playbackmanager.default.setBrightness(parseFloat(this.value),self.currentPlayer),self.showOsd()},{passive:!0}),_dom.default.addEventListener(nowPlayingVolumeSlider,"change",function(){_playbackmanager.default.setVolume(parseFloat(this.value),self.currentPlayer),self.showOsd()},{passive:!0}),_dom.default.addEventListener(self.nowPlayingPositionSlider,"change",function(){var newPercent,seekAirTimeTicks,player=self.currentPlayer;player&&(newPercent=parseFloat(this.value),enableProgressByTimeOfDay?(seekAirTimeTicks=(seekAirTimeTicks=newPercent/100*(programEndDateMs-programStartDateMs)*1e4)+1e4*programStartDateMs-playbackStartTimeTicks,_playbackmanager.default.seek(seekAirTimeTicks,player)):_playbackmanager.default.seekPercent(newPercent,player))},{passive:!0}),self.nowPlayingPositionSlider.getBubbleHtml=function(value){if(self.showOsd(),enableProgressByTimeOfDay)return programStartDateMs&&programEndDateMs?(ms=programEndDateMs-programStartDateMs,ms=(ms/=100)*value+programStartDateMs,'

'+getDisplayTimeWithoutAmPm(new Date(parseInt(ms)),!0)+"

"):"--:--";if(!currentRuntimeTicks)return"--:--";var ms=currentRuntimeTicks,value=(ms=ms/100*value,self.currentItem);if(value){var apiClient=_connectionmanager.default.getApiClient(value.ServerId),thumbnails=(refreshThumbnailsIfNeeded(value,"",apiClient,400),currentItemThumbnails),chapters=currentDisplayChapters||[];if(chapters.length){apiClient=getThumbnailBubbleHtml(apiClient,value.Id,0,thumbnails,chapters,ms,400);if(apiClient)return apiClient}}return'

'+_datetime.default.getDisplayRunningTime(ms)+"

"},_dom.default.addEventListener(self.osdBottomElement,transitionEndEventName,function(e){var elem=e.currentTarget;elem===e.target&&elem.classList.contains("videoOsdBottom-hidden")&&(elem.classList.add("hide"),headerElement.classList.add("hide"),self.bottomTabs.selectedIndex(-1),onTabTransitionEnd.call(tabContainersElem,{target:tabContainersElem,currentTarget:tabContainersElem}),2===self.currentLockState&&self.setLockState(1),view.dispatchEvent(new CustomEvent("video-osd-hide",{bubbles:!0})))},{passive:!0}),_dom.default.addEventListener(btnPreviousTrack,"click",function(){_playbackmanager.default.previousTrack(self.currentPlayer)},{passive:!0});for(var _i18=0,_length18=stopButtons.length;_i18<_length18;_i18++)stopButtons[_i18].addEventListener("click",onStop);function onNextTrackClick(){_playbackmanager.default.nextTrack(self.currentPlayer)}function onRewindButtonClick(){rewind(self,!0)}_dom.default.addEventListener(self.btnPause,"click",function(){_playbackmanager.default.playPause(self.currentPlayer)},{passive:!0}),_dom.default.addEventListener(btnNextTrack,"click",onNextTrackClick,{passive:!0});for(var _i19=0,_length19=rewindButtons.length;_i19<_length19;_i19++)_dom.default.addEventListener(rewindButtons[_i19],"click",onRewindButtonClick,{passive:!0});function onFastForwardButtonClick(){fastForward(self,!0)}for(var _i20=0,_length20=fastForwardButtons.length;_i20<_length20;_i20++)_dom.default.addEventListener(fastForwardButtons[_i20],"click",onFastForwardButtonClick,{passive:!0});function onMoreClick(){showMoreMenu(self.currentItem,this)}function onCloseRequestedFromTab(){self.bottomTabs.selectedIndex(-1)}function loadBottomTabController(index,forceRefresh){var tabResumeOptions={refresh:forceRefresh,item:self.currentItem,displayItem:currentDisplayItem,mediaSource:currentMediaSource,enableProgressByTimeOfDay:enableProgressByTimeOfDay,currentPlayer:self.currentPlayer},bottomTabControllers=self.bottomTabControllers;if(bottomTabControllers[index])return bottomTabControllers[index].onResume(tabResumeOptions);require([["videoosd_infotab","videoosd_chapterstab","videoosd_peopletab","videoosd_onnowtab","videoosd_guidetab"][index]]).then(function(responses){responses=new responses[0](tabContainers[index]);return bottomTabControllers[index]=responses,tabResumeOptions.refresh=!0,_events.default.on(responses,"closerequested",onCloseRequestedFromTab),responses.onResume(tabResumeOptions)})}function onTabTransitionEnd(e){var elem=e.currentTarget;elem===e.target&&elem.classList.contains("videoosd-tabcontainers-hidden")&&(elem.classList.add("hide"),self.osdBottomElement.classList.remove("videoosd-bottom-with-opentab"),(e=elem.querySelector(".videoosd-activetab"))&&e.classList.remove("videoosd-activetab"),focusMainOsdControls(self))}function setContentSection(sectionName,saveToUserSettings){currentOsdContentSectionName=sectionName;for(var sections=view.querySelectorAll(".osdContentSection"),_i21=0,_length21=sections.length;_i21<_length21;_i21++){var section=sections[_i21];section.getAttribute("data-contentsection")===sectionName?section.classList.remove("hide"):section.classList.add("hide")}for(var buttons=view.querySelectorAll(".osdContentSectionToggleButton"),_i22=0,_length22=buttons.length;_i22<_length22;_i22++){var button=buttons[_i22],icon=button.querySelector("i");button.getAttribute("data-contentsection")===sectionName?(button.classList.add("toggleButton-active"),icon.classList.add("toggleButtonIcon-active")):(button.classList.remove("toggleButton-active"),icon.classList.remove("toggleButtonIcon-active"))}var playQueue=self.playQueue,playQueue=("playqueue"===sectionName?playQueue&&playQueue.resume({}):playQueue&&playQueue.pause(),self.lyricsRenderer),playQueue=("lyrics"===sectionName?playQueue&&playQueue.resume({}):playQueue&&playQueue.pause(),self.osdBottomElement);_layoutmanager.default.tv?(sectionName&&"playqueue"!==sectionName&&"art"!==sectionName?playQueue.classList.add("videoOsdBottom-split"):playQueue.classList.remove("videoOsdBottom-split"),sectionName&&"lyrics"!==sectionName&&"art"!==sectionName?playQueue.classList.remove("videoOsdBottom-art"):playQueue.classList.add("videoOsdBottom-art")):sectionName&&"art"!==sectionName?(playQueue.classList.add("videoOsdBottom-split"),playQueue.classList.remove("videoOsdBottom-art")):(playQueue.classList.remove("videoOsdBottom-split"),playQueue.classList.add("videoOsdBottom-art")),!1!==saveToUserSettings&&_usersettings.default.osdContentSection(sectionName)}function onContentSectionToggleButtonClick(e){this.classList.contains("toggleButton-active")?setContentSection("art"):setContentSection(this.getAttribute("data-contentsection"))}function onSkipIntroClickInternal(){var info=currentIntroInfo,player=self.currentPlayer;info&&player&&(_playbackmanager.default.seek(info.end,player),showHideSkipIntro(!1),self.hideOsd())}function onLockClick(){var lockState=self.currentLockState;switch(lockState){case 0:case 1:lockState++;break;default:lockState=0}self.setLockState(lockState)}_dom.default.addEventListener(btnRepeatMode,"click",function(){var player;(player=self.currentPlayer)&&_playbackmanager.default.toggleRepeatMode(player)},{passive:!0}),_dom.default.addEventListener(btnOsdMoreBottom,"click",onMoreClick,{passive:!0}),_dom.default.addEventListener(btnOsdMoreTitle,"click",onMoreClick,{passive:!0}),_dom.default.addEventListener(btnAudio,"click",function(){var currentIndex,audioTracks,player=self.currentPlayer;player&&(audioTracks=_playbackmanager.default.audioTracks(player),currentIndex=_playbackmanager.default.getAudioStreamIndex(player),audioTracks=audioTracks.map(function(stream){var opt={name:stream.DisplayTitle,secondaryText:stream.Title&&!(stream.DisplayTitle||"").toLowerCase().includes((stream.Title||"").toLowerCase())?stream.Title:null,id:stream.Index};return stream.Index===currentIndex&&(opt.selected=!0),opt}),self.showOsd(),showActionSheet({items:audioTracks,title:_globalize.default.translate("Audio"),positionTo:this,positionY:"above",transformOrigin:"center bottom",hasItemSelectionState:!0,autoTvLayout:!1}).then(function(id){self.showOsd();id=parseInt(id);id!==currentIndex&&_playbackmanager.default.setAudioStreamIndex(id,player)},self.boundShowOsdDefaultParams))},{passive:!0}),_dom.default.addEventListener(btnSubtitles,"click",function(){var player=self.currentPlayer,streams=_playbackmanager.default.subtitleTracks(player),currentIndex=_playbackmanager.default.getSubtitleStreamIndex(player),menuItems=(null==currentIndex&&(currentIndex=-1),streams.unshift({Index:-1,DisplayTitle:_globalize.default.translate("Off")}),streams.map(function(stream){var opt={name:stream.DisplayTitle,secondaryText:stream.Title&&!(stream.DisplayTitle||"").toLowerCase().includes((stream.Title||"").toLowerCase())?stream.Title:null,id:stream.Index};return stream.Index===currentIndex&&(opt.selected=!0),opt})),positionTo=this;(streams=_connectionmanager.default.getApiClient(self.currentItem)).getCurrentUser().then(function(user){supportsSubtitleDownloading()&&_itemmanager.default.canDownloadSubtitles(self.currentItem,user)&&menuItems.push({name:_globalize.default.translate("SearchForSubtitles"),id:"search",asideIcon:""}),_playbackmanager.default.getSupportedCommands(player).includes("SetSubtitleOffset")&&(user=_playbackmanager.default.getSubtitleStream(player))&&("External"===user.DeliveryMethod||"Hls"===user.DeliveryMethod)&&menuItems.unshift({name:_globalize.default.translate("HeaderSubtitleOffset"),id:"subtitleoffset",secondaryText:_playbackmanager.default.getSubtitleOffset(player)+" ms",asideIcon:"",dividerAfter:0' + + text + + "" + ); + } + function getSecondaryName(item, enableLinkButton) { + var title = _itemmanager.default.getDisplayName(item, { + includeParentInfo: "Program" !== item.Type, + includeIndexNumber: "Program" !== item.Type, + }); + return enableLinkButton ? getTextActionButton(item, title) : title; + } + function getDefaultOsdContentSection() { + return _layoutmanager.default.tv || + 1056 <= _dom.default.getWindowSize().innerWidth + ? "playqueue" + : null; + } + function destroyPlayQueue(instance) { + var playQueue = instance.playQueue; + playQueue && (playQueue.destroy(), (instance.playQueue = null)); + } + function destroyLyricsRenderer(instance) { + var lyricsRenderer = instance.lyricsRenderer; + lyricsRenderer && + (lyricsRenderer.destroy(), (instance.lyricsRenderer = null)); + } + function destroyStats(instance) { + var statsOverlay = instance.statsOverlay; + statsOverlay && (statsOverlay.destroy(), (instance.statsOverlay = null)); + } + function destroySubtitleOffsetOverlay(instance) { + var subtitleOffsetOverlay = instance.subtitleOffsetOverlay; + subtitleOffsetOverlay && + (subtitleOffsetOverlay.destroy(), + (instance.subtitleOffsetOverlay = null)); + } + function clearBlurFromDocumentElement() { + document.documentElement.classList.remove("doc-nowplaying-blur"), + (document.documentElement.style.backgroundImage = null), + backgroundContainer && (backgroundContainer.style.backgroundImage = null); + } + function shouldOsdBeShown(instance) { + return ( + !_layoutmanager.default.tv || + !!instance.currentVisibleMenu || + !(instance = instance.currentPlayer) || + isDisplayingLocalVideo(instance) + ); + } + var supportsTouchEvent = "ontouchstart" in document.documentElement; + function rewind(instance, animate) { + var player = instance.currentPlayer; + animate && + (((animate = instance.view.querySelector( + ".osd-rew-animationtext", + )).innerHTML = + "-" + parseInt(_usersettings.default.skipBackLength() / 1e3)), + fadeInAndOut(animate)), + _playbackmanager.default.rewind(player); + } + function fadeInAndOut(elem) { + if (elem.animate) + try { + elem.animate( + [ + { opacity: "1", offset: 0.5 }, + { opacity: "0", transform: "none", offset: 1 }, + ], + { duration: 600, iterations: 1, easing: "ease-out" }, + ); + } catch (err) { + console.log("error animating element: " + err); + } + } + function fastForward(instance, animate) { + var player = instance.currentPlayer; + animate && + (((animate = instance.view.querySelector( + ".osd-ff-animationtext", + )).innerHTML = + "+" + parseInt(_usersettings.default.skipForwardLength() / 1e3)), + fadeInAndOut(animate)), + _playbackmanager.default.fastForward(player); + } + function onOsdClick(e, instance, elementToFocusIfShowing, showOsdIfNoEvent) { + var target = e.target; + if (target.closest(".videoOsdBottom")) + showOsdIfNoEvent && instance.showOsd(); + else if (!target.closest("button")) + return ( + (target = instance.currentPlayer), + !e.button && target && isDisplayingLocalVideo(target) + ? (instance.showOsd(null, elementToFocusIfShowing), + _playbackmanager.default.playPause(target)) + : showOsdIfNoEvent && instance.showOsd(), + 1 + ); + } + function toggleStats(instance) { + require(["playerStats"], function (PlayerStats) { + var player = instance.currentPlayer; + player && + (instance.statsOverlay + ? instance.statsOverlay.toggle() + : ((instance.statsOverlay = new PlayerStats({ + player: player, + view: instance.view, + })), + _events.default.on( + instance.statsOverlay, + "close", + function () { + this.currentVisibleMenu && + !this.upNextContainer._visible && + _focusmanager.default.focus(this.btnVideoOsdSettingsRight); + }.bind(instance), + ))); + }); + } + function setBottomTabIndex(instance, index) { + var bottomTabButtons, + bottomTabs = instance.bottomTabs; + -1 === index + ? bottomTabs.selectedIndex(index) + : ((bottomTabButtons = instance.bottomTabButtons), + instance.showOsd(null, bottomTabButtons[index]), + bottomTabs.selectedIndex(index), + _focusmanager.default.focus(bottomTabButtons[index])); + } + function onRewindInputCommand(e, instance) { + instance.currentVisibleMenu || + e.detail.repeat || + (rewind(instance), e.preventDefault()), + shouldOsdBeShown(instance) && instance.showOsd(); + } + function onFastForwardInputCommand(e, instance) { + instance.currentVisibleMenu || + e.detail.repeat || + (fastForward(instance), e.preventDefault()), + shouldOsdBeShown(instance) && instance.showOsd(); + } + function startOsdHideTimer(instance, timeoutMs) { + var isLocalVideo; + stopOsdHideTimer(instance), + instance.paused || + !(isLocalVideo = isDisplayingLocalVideo(instance.currentPlayer)) || + 0 === timeoutMs || + _focusmanager.default.hasExclusiveFocusScope() || + (instance.osdHideTimeout = setTimeout( + instance.boundOnOsdHideTimeout, + timeoutMs || (isLocalVideo ? 4e3 : 1e4), + )); + } + function stopOsdHideTimer(instance) { + var osdHideTimeout = instance.osdHideTimeout; + osdHideTimeout && + (clearTimeout(osdHideTimeout), (instance.osdHideTimeout = null)); + } + var systemUIHidden, + orientationLocked = !1; + function onOrientationChangeSuccess() { + orientationLocked = !0; + } + function onOrientationChangeError(err) { + (orientationLocked = !0), console.log("error locking orientation: " + err); + } + function setSystemUIHidden(hidden) { + if ( + systemUIHidden !== hidden && + ((systemUIHidden = hidden), _servicelocator.appHost.setSystemUIHidden) + ) + try { + _servicelocator.appHost.setSystemUIHidden(hidden); + } catch (err) { + console.log("Error in setSystemUIHidden: " + err); + } + } + var enableOrientationLock = !_browser.default.tv; + function lockOrientation(type) { + var _screen$orientation; + enableOrientationLock && + !(function (orientation) { + var promise; + try { + return (promise = + screen.orientation && screen.orientation.lock + ? screen.orientation.lock(orientation) + : promise) && promise.then + ? promise + : Promise.resolve(); + } catch (err) { + return Promise.reject(err); + } + })( + (type = + type || + (null == (_screen$orientation = screen.orientation) + ? void 0 + : _screen$orientation.type) || + "landscape"), + ).then(onOrientationChangeSuccess, onOrientationChangeError); + } + function unlockOrientation() { + if ( + enableOrientationLock && + orientationLocked && + screen.orientation && + screen.orientation.unlock + ) { + try { + screen.orientation.unlock(); + } catch (err) { + console.log("error unlocking orientation: " + err); + } + orientationLocked = !1; + } + } + function VideoOsd(view, params) { + _baseview.default.apply(this, arguments); + var comingUpNextDisplayed, + isEnabled, + currentDisplayItem, + currentDisplayChapters, + currentIntroInfo, + currentCreditsInfo, + currentMediaSource, + currentItemThumbnails, + currentItemThumbnailsPromise, + enableProgressByTimeOfDay, + skipIntroValidated, + enableAutoSkipIntro, + lastPointerUpType, + currentOsdContentSectionName, + self = this, + currentPlayerSupportedCommands = [], + currentRuntimeTicks = 0, + lastUpdateTime = 0, + ratingTextNeedsUpdate = !0, + programStartDateMs = 0, + programEndDateMs = 0, + playbackStartTimeTicks = 0, + nowPlayingVolumeSlider = + ((this.currentLockState = 0), + view.querySelector(".videoOsdVolumeSlider")), + videoOsdVolumeSliderWrapper = view.querySelector( + ".videoOsdVolumeSliderWrapper", + ), + brightnessSlider = view.querySelector(".videoOsdBrightnessSlider"), + brightnessSliderContainer = view.querySelector( + ".brightnessSliderContainer", + ), + videoOsdPositionText = + ((this.nowPlayingPositionSlider = view.querySelector( + ".videoOsdPositionSlider", + )), + view.querySelector(".videoOsdPositionText")), + videoOsdDurationText = view.querySelector(".videoOsdDurationText"), + rewindButtons = view.querySelectorAll(".btnRewind"), + fastForwardButtons = view.querySelectorAll(".btnOsdFastForward"), + stopButtons = + ((this.btnPause = view.querySelector(".videoOsd-btnPause")), + view.querySelectorAll(".btnVideoOsd-stop")), + btnRepeatMode = view.querySelector(".btnOsdRepeatMode"), + btnOsdMoreBottom = view.querySelector(".btnOsdMore-bottom"), + btnOsdMoreTitle = view.querySelector(".btnOsdMore-title"), + transitionEndEventName = _dom.default.whichTransitionEvent(), + btnPreviousTrack = + ((this.osdBottomElement = view.querySelector(".videoOsdBottom")), + view.querySelector(".btnPreviousTrack")), + btnNextTrack = view.querySelector(".btnNextTrack"), + buttonMute = view.querySelector(".buttonMute"), + btnSubtitles = view.querySelector(".btnSubtitles"), + btnAudio = view.querySelector(".btnAudio"), + btnFullscreen = view.querySelector(".btnFullscreen"), + videoOsdSecondaryText = view.querySelector(".videoOsdSecondaryText"), + videoOsdBottomButtons = + ((this.videoOsdText = view.querySelector(".videoOsdText")), + view.querySelector(".videoOsdBottom-buttons")), + mainTransportButtons = view.querySelector( + ".videoOsd-maintransportbuttons", + ), + videoOsdPositionContainer = view.querySelector( + ".videoOsdPositionContainer", + ), + osdTitle = view.querySelector(".videoOsdTitle"), + videoOsdThirdTitle = view.querySelector(".videoOsdThirdTitle"), + videoOsdParentTitle = view.querySelector(".videoOsdParentTitle-small"), + videoOsdParentTitleLarge = view.querySelector( + ".videoOsdParentTitle-large", + ), + osdPosterContainer = view.querySelector(".osdPosterContainer"), + videoOsdSecondaryMediaInfo = view.querySelector( + ".videoOsdSecondaryMediaInfo", + ), + videoOsdAudioInfo = view.querySelector(".videoOsd-audioInfo"), + mainLockButton = view.querySelector(".videoOsd-btnLock"), + tabContainers = + ((this.bottomTabs = view.querySelector(".videoOsdBottom-tabs")), + (this.bottomTabButtons = view.querySelectorAll(".videoosd-tab-button")), + view.querySelectorAll(".videoosd-tab")), + btnCloseTabContent = + ((this.bottomTabControllers = []), + (this.bottomTabControllers.length = tabContainers.length), + view.querySelector(".btnCloseTabContent")), + tabContainersElem = view.querySelector(".videoosd-tabcontainers"), + videoOsdBottomContentbuttons = view.querySelector( + ".videoOsdBottom-contentbuttons", + ), + videoOsdBottomMaincontrols = + ((this.upNextContainer = view.querySelector(".upNextContainer")), + view.querySelector(".videoOsdBottom-maincontrols")), + videoOsdVolumeControls = view.querySelector(".videoOsdVolumeControls"), + videoOsdButtomButtonsTopRight = view.querySelector( + ".videoOsdBottom-buttons-topright", + ), + ratingInfoContainer = view.querySelector(".videoOsd-ratingInfo"), + ratingTextElement = view.querySelector(".videoOsd-ratingText"), + btnSkipIntro = view.querySelector(".btnSkipIntro"), + skipIntroContainer = view.querySelector(".skipIntroContainer"), + btnLyrics = view.querySelector(".btnLyrics"), + btnVideoOsdSettingsTransportButton = + ((this.btnRecord = view.querySelector(".btnRecord")), + (this.btnVideoOsdSettingsRight = view.querySelector( + ".btnVideoOsdSettings-right", + )), + view.querySelector(".btnVideoOsdSettings-transport")), + btnPlayNextFromUpNextProgress = view.querySelector( + ".btnPlayNextFromUpNext-progress", + ), + btnHideUpNext = view.querySelector(".btnHideUpNext"), + enableSkipIntro = !0; + _layoutmanager.default.tv + ? videoOsdBottomButtons.classList.add("videoOsdBottom-buttons-tv") + : (videoOsdPositionText.classList.add("videoOsd-customFont-x0"), + videoOsdDurationText.classList.add("videoOsd-customFont-x0"), + ratingTextElement.classList.add("videoOsd-customFont-x2"), + videoOsdBottomButtons.classList.add("videoOsd-customFont-x2"), + videoOsdButtomButtonsTopRight.classList.add("videoOsd-customFont-x2"), + skipIntroContainer.classList.add("videoOsd-customFont-x2"), + this.upNextContainer.classList.add("videoOsd-customFont-x2"), + this.osdBottomElement.classList.add("videoOsd-nobuttonmargin")); + for (var i = 0, length = fastForwardButtons.length; i < length; i++) { + icon = btnFastForward = void 0; + var btnFastForward = fastForwardButtons[i], + icon = btnFastForward.querySelector("i"); + switch ( + ((icon.innerHTML = ( + "rtl" === document.dir ? getRewindIconLTR : getForwardIconLTR + )()), + _usersettings.default.skipForwardLength()) + ) { + case 5e3: + case 1e4: + case 3e4: + break; + default: + icon.classList.add("videoOsd-forwardIcon-flipped"); + } + } + for (var _i = 0, _length = rewindButtons.length; _i < _length; _i++) + rewindButtons[_i].querySelector("i").innerHTML = ( + "rtl" === document.dir ? getForwardIconLTR : getRewindIconLTR + )(); + function updateRecordingButton(item, user) { + item && "Program" === item.Type + ? user.Policy.EnableLiveTvManagement && + require(["recordingButton"], function (RecordingButton) { + var recordingButtonManager = self.recordingButtonManager; + recordingButtonManager + ? recordingButtonManager.refreshItem(item) + : ((recordingButtonManager = self.recordingButtonManager = + new RecordingButton({ item: item, button: self.btnRecord })), + self.btnRecord.classList.remove("hide")); + }) + : ((user = self.recordingButtonManager) && + (user.destroy(), (self.recordingButtonManager = null)), + self.btnRecord.classList.add("hide")); + } + function updateButtomTabsVisibility(state, item, displayItem) { + var apiClient; + item + ? ((apiClient = _connectionmanager.default.getApiClient(item)), + ("Video" === item.MediaType + ? apiClient.getUserViews({}, apiClient.getCurrentUserId()) + : Promise.resolve({ Items: [] }) + ).then(function (result) { + var bottomTabButtons = self.bottomTabButtons, + result = + ("Video" === item.MediaType + ? bottomTabButtons[0].classList.remove("hide") + : bottomTabButtons[0].classList.add("hide"), + currentDisplayChapters && currentDisplayChapters.length + ? bottomTabButtons[1].classList.remove("hide") + : bottomTabButtons[1].classList.add("hide"), + displayItem.People && displayItem.People.length + ? bottomTabButtons[2].classList.remove("hide") + : bottomTabButtons[2].classList.add("hide"), + !(function (userViews) { + for ( + var _i2 = 0, _length2 = userViews.length; + _i2 < _length2; + _i2++ + ) + if ("livetv" === userViews[_i2].CollectionType) return 1; + })(result.Items) + ? (bottomTabButtons[3].classList.add("hide"), + bottomTabButtons[4].classList.add("hide")) + : (bottomTabButtons[3].classList.remove("hide"), + bottomTabButtons[4].classList.remove("hide")), + self.bottomTabs), + selectedIndex = + (view.querySelector(".videoosd-tab-button:not(.hide)") + ? (tabContainersElem.classList.remove("hide"), + result.classList.remove("hide")) + : (tabContainersElem.classList.add("hide"), + result.classList.add("hide")), + result.selectedIndex()); + 0 <= selectedIndex && + (bottomTabButtons[selectedIndex].classList.contains("hide") + ? result.selectedIndex(-1) + : loadBottomTabController(selectedIndex, !0)); + })) + : (self.bottomTabs.selectedIndex(-1), + tabContainersElem.classList.add("hide"), + self.bottomTabs.classList.add("hide")); + } + function updateDisplayItem(state, itemInfo, user) { + var item = itemInfo.originalItem, + itemInfo = + ((self.currentItem = item), + (currentItemThumbnails = currentItemThumbnailsPromise = null), + itemInfo.displayItem || item); + (currentDisplayChapters = (function (chapters) { + for ( + var list = [], _i3 = 0, _length3 = chapters.length; + _i3 < _length3; + _i3++ + ) { + var chapter = chapters[_i3]; + (chapter.MarkerType && "Chapter" !== chapter.MarkerType) || + list.push(chapter); + } + return list; + })((currentDisplayItem = itemInfo).Chapters || [])), + updateRecordingButton(itemInfo, user); + var user = isDisplayingLocalVideo(self.currentPlayer, item.MediaType), + item = + (updateButtomTabsVisibility(0, item, itemInfo), + itemInfo.EpisodeTitle || itemInfo.IsSeries + ? (primaryNameText = itemInfo.Name) + : itemInfo.SeriesName + ? ((primaryNameText = itemInfo.SeriesName), + itemInfo.SeriesId && + !user && + (primaryNameHtml = getTextActionButton({ + Id: itemInfo.SeriesId, + Type: "Series", + IsFolder: !0, + ServerId: itemInfo.ServerId, + Name: itemInfo.SeriesName, + ParentId: itemInfo.ParentId, + }))) + : itemInfo.ArtistItems && + itemInfo.ArtistItems.length && + ((primaryNameText = itemInfo.Name), + (primaryNameHtml = (function (displayItem) { + var html = [], + artistItems = displayItem.ArtistItems; + if (artistItems) + for (var i = 0, length = artistItems.length; i < length; i++) + html.push( + getTextActionButton({ + Id: artistItems[i].Id, + ServerId: displayItem.ServerId, + Name: artistItems[i].Name, + Type: "MusicArtist", + IsFolder: !0, + }), + ); + return html; + })(itemInfo).join(", "))), + (primaryNameHtml = primaryNameHtml || primaryNameText), + !(function (item, originalItem, title) { + _appheader.default.setLogoTitle({ + items: [item, originalItem], + titleText: "", + preferredLogoImageTypes: ["LogoLightColor", "LogoLight", "Logo"], + }); + originalItem = title || (item ? item.Name : null); + originalItem && (document.title = originalItem); + })(itemInfo, item, primaryNameText), + !(function (displayItem, item, displayingLocalVideo, mediaType) { + var backdropItems = [displayItem]; + if ( + (item.Id !== displayItem.Id && backdropItems.push(item), + displayingLocalVideo) + ) + _backdrop.default.setBackdrops(backdropItems), + view.classList.add( + "darkContentContainer", + "graphicContentContainer", + ), + headerElement.classList.add("headroom-scrolling"), + clearBlurFromDocumentElement(); + else { + displayItem = + "Video" === mediaType + ? "nowPlayingVideoBackgroundStyle" + : "nowPlayingAudioBackgroundStyle"; + if ( + "blur" === _usersettings.default[displayItem]() && + (item = (backdropItems = getDetailImageItemsSync().Items)[0]) + ) { + displayingLocalVideo = _imageloader.default.getImageUrl( + item, + _connectionmanager.default.getApiClient(item), + { width: 100, adjustForPixelRatio: !1 }, + ).imgUrl; + if (displayingLocalVideo) + return ( + _backdrop.default.setBackdrop(displayingLocalVideo), + displayingLocalVideo + ? (view.classList.add("darkContentContainer"), + view.classList.remove("graphicContentContainer"), + headerElement.classList.remove("headroom-scrolling"), + document.documentElement.classList.add( + "doc-nowplaying-blur", + )) + : (view.classList.remove( + "darkContentContainer", + "graphicContentContainer", + ), + headerElement.classList.remove("headroom-scrolling"), + clearBlurFromDocumentElement()) + ); + } + _backdrop.default.setBackdrops(backdropItems), + clearBlurFromDocumentElement(), + headerElement.classList.remove("headroom-scrolling"), + _backdrop.default.hasBackdrop() + ? view.classList.add( + "darkContentContainer", + "graphicContentContainer", + ) + : view.classList.remove( + "darkContentContainer", + "graphicContentContainer", + ); + } + })(itemInfo, item, user, item.MediaType), + user ? setPoster(null) : setPoster(itemInfo), + (primaryNameText = osdTitle), + (secondaryName = + "Audio" === item.MediaType + ? ((item = primaryNameHtml), + (primaryNameHtml = secondaryName = + getSecondaryName(itemInfo, !1)), + item) + : getSecondaryName(itemInfo, !user)), + primaryNameHtml || + ((primaryNameHtml = secondaryName), (secondaryName = null)), + (videoOsdParentTitle.innerHTML = primaryNameHtml), + (videoOsdParentTitleLarge.innerHTML = primaryNameHtml) + ? videoOsdSecondaryText.classList.add( + "videoOsdSecondaryText-withparentname", + ) + : videoOsdSecondaryText.classList.remove( + "videoOsdSecondaryText-withparentname", + ), + secondaryName || itemInfo.Type, + (primaryNameText.innerHTML = secondaryName) + ? primaryNameText.classList.remove("hide") + : primaryNameText.classList.add("hide"), + videoOsdSecondaryMediaInfo), + primaryNameHtml = + "Audio" === itemInfo.MediaType || + ("Program" !== itemInfo.Type && !secondaryName) + ? _mediainfo.default.getMediaInfoHtml(itemInfo, { + runtime: !1, + endsAt: !1, + container: !user, + year: "Audio" !== itemInfo.MediaType, + CommunityRating: !1, + criticRating: !1, + }) + : _mediainfo.default.getSecondaryMediaInfoHtml(itemInfo, { + startDate: !1, + programTime: !1, + }); + "Audio" === itemInfo.MediaType && itemInfo.Album && itemInfo.AlbumId + ? ((videoOsdThirdTitle.innerHTML = getTextActionButton({ + Type: "MusicAlbum", + Id: itemInfo.AlbumId, + ServerId: itemInfo.ServerId, + Name: itemInfo.Album, + })), + videoOsdThirdTitle.classList.remove("hide")) + : videoOsdThirdTitle.classList.add("hide"), + (function (item) { + for ( + var mediaStreams = + ( + (( + (item = item && "Audio" !== item.MediaType ? null : item) || + {} + ).MediaSources || [])[0] || {} + ).MediaStreams || [], + _i4 = 0, + _length4 = mediaStreams.length; + _i4 < _length4; + _i4++ + ) + if ("Subtitle" === mediaStreams[_i4].Type) + return btnLyrics.classList.remove("hide"); + btnLyrics.classList.add("hide"), + "lyrics" === currentOsdContentSectionName && + setContentSection(getDefaultOsdContentSection(), !1); + })(itemInfo), + (item.innerHTML = primaryNameHtml), + (videoOsdAudioInfo.innerHTML = primaryNameHtml) + ? "Audio" === itemInfo.MediaType + ? (item.classList.add("hide"), + videoOsdAudioInfo.classList.remove("hide")) + : (item.classList.remove("hide"), + videoOsdAudioInfo.classList.add("hide")) + : (item.classList.add("hide"), + videoOsdAudioInfo.classList.add("hide")), + (programEndDateMs = enableProgressByTimeOfDay + ? (setDisplayTime(videoOsdPositionText, itemInfo.StartDate), + setDisplayTime(videoOsdDurationText, itemInfo.EndDate), + (programStartDateMs = itemInfo.StartDate + ? _datetime.default.parseISO8601Date(itemInfo.StartDate).getTime() + : 0), + itemInfo.EndDate + ? _datetime.default.parseISO8601Date(itemInfo.EndDate).getTime() + : 0) + : (programStartDateMs = 0)); + for ( + var introStart, + introEnd, + creditsStart, + secondaryName, + primaryNameText = self.lyricsRenderer, + chapters = + (primaryNameText && primaryNameText.updateItem(itemInfo), + itemInfo.Chapters || []), + _i5 = 0, + _length5 = chapters.length; + _i5 < _length5; + _i5++ + ) { + var chapter = chapters[_i5]; + "IntroStart" === chapter.MarkerType + ? ((introStart = chapter.StartPositionTicks), + _i5 < chapters.length - 1 && + (introEnd = chapters[_i5 + 1].StartPositionTicks)) + : "IntroEnd" === chapter.MarkerType + ? (introEnd = chapter.StartPositionTicks) + : "CreditsStart" === chapter.MarkerType && + (creditsStart = chapter.StartPositionTicks); + } + creditsStart && + (secondaryName = introEnd || introStart) && + creditsStart <= secondaryName && + (creditsStart = null), + (currentIntroInfo = + null != introStart && introEnd + ? { start: introStart, end: introEnd } + : null), + (currentCreditsInfo = + null != creditsStart ? { start: creditsStart } : null); + for ( + var bottomTabControllers = self.bottomTabControllers, + _i6 = 0, + _length6 = bottomTabControllers.length; + _i6 < _length6; + _i6++ + ) + bottomTabControllers[_i6] && + bottomTabControllers[_i6].onItemUpdated({ + item: self.currentItem, + displayItem: currentDisplayItem, + mediaSource: currentMediaSource, + }); + } + function getDisplayTimeWithoutAmPm(date, showSeconds) { + return ( + showSeconds + ? _datetime.default.toLocaleTimeString(date, { + hour: "numeric", + minute: "2-digit", + second: "2-digit", + }) + : _datetime.default.getDisplayTime(date) + ) + .toLowerCase() + .replace("am", "") + .replace("pm", "") + .trim(); + } + function setDisplayTime(elem, date) { + var html; + date && + (html = getDisplayTimeWithoutAmPm( + (date = _datetime.default.parseISO8601Date(date)), + )), + (elem.innerHTML = html || ""); + } + function supportsSubtitleDownloading() { + return currentPlayerSupportedCommands.includes("RefreshMediaSource"); + } + function updateNowPlayingInfo(event, player, state) { + var item = state.NowPlayingItem; + if ( + ((self.currentItem = item), + (currentItemThumbnails = currentItemThumbnailsPromise = null), + item) + ) { + (currentMediaSource = state.MediaSource), + (enableProgressByTimeOfDay = (function (item, mediaSource) { + return !( + "TvChannel" !== item.Type || + !item.CurrentProgram || + !mediaSource || + mediaSource.RunTimeTicks + ); + })(item, state.MediaSource)) + ? self.nowPlayingPositionSlider + .getTrackBackgroundUpper() + .classList.add("emby-slider-background-upper-accent") + : self.nowPlayingPositionSlider + .getTrackBackgroundUpper() + .classList.remove("emby-slider-background-upper-accent"); + var apiClient = _connectionmanager.default.getApiClient(item); + Promise.all([ + (function (item, currentDisplayItem) { + return item.Id + ? currentDisplayItem && currentDisplayItem.Id === item.Id + ? Promise.resolve({ + originalItem: currentDisplayItem, + displayItem: + currentDisplayItem.CurrentProgram || currentDisplayItem, + }) + : (currentDisplayItem = _connectionmanager.default.getApiClient( + item.ServerId, + )) + .getItem(currentDisplayItem.getCurrentUserId(), item.Id) + .then(function (refreshedItem) { + return { + originalItem: refreshedItem, + displayItem: + refreshedItem.CurrentProgram || refreshedItem, + }; + }) + : Promise.resolve({ originalItem: item }); + })(item, currentDisplayItem), + apiClient.getCurrentUser(), + ]).then(function (responses) { + var user = responses[1]; + if ( + (updateDisplayItem(0, responses[0], user), + (nowPlayingVolumeSlider.disabled = !1), + (self.nowPlayingPositionSlider.disabled = + !0 === state.IsInitialRequest), + "Video" === item.MediaType || item.SupportsResume) + ) { + for ( + var _i9 = 0, _length9 = fastForwardButtons.length; + _i9 < _length9; + _i9++ + ) + fastForwardButtons[_i9].classList.remove("hide"), + (fastForwardButtons[_i9].disabled = + !0 === state.IsInitialRequest); + for ( + var _i10 = 0, _length10 = rewindButtons.length; + _i10 < _length10; + _i10++ + ) + rewindButtons[_i10].classList.remove("hide"), + (rewindButtons[_i10].disabled = !0 === state.IsInitialRequest); + } else { + for ( + var _i11 = 0, _length11 = fastForwardButtons.length; + _i11 < _length11; + _i11++ + ) + fastForwardButtons[_i11].classList.add("hide"); + for ( + var _i12 = 0, _length12 = rewindButtons.length; + _i12 < _length12; + _i12++ + ) + rewindButtons[_i12].classList.add("hide"); + } + 1 < _playbackmanager.default.audioTracks(player).length + ? btnAudio.classList.remove("hide") + : btnAudio.classList.add("hide"), + (enableSkipIntro = "None" !== user.Configuration.IntroSkipMode), + (enableAutoSkipIntro = + "AutoSkip" === user.Configuration.IntroSkipMode), + enableSkipIntro && validateSkipIntroFeature({ showDialog: !1 }, !0), + _playbackmanager.default.subtitleTracks(player).length || + (_itemmanager.default.canDownloadSubtitles(item, user) && + supportsSubtitleDownloading()) + ? btnSubtitles.classList.remove("hide") + : btnSubtitles.classList.add("hide"); + }); + } else { + (ratingTextNeedsUpdate = !(currentCreditsInfo = + currentIntroInfo = + currentDisplayChapters = + currentDisplayItem = + null)), + setPoster((currentMediaSource = null)), + updateRecordingButton(null), + _appheader.default.setTitle(""), + (nowPlayingVolumeSlider.disabled = !0), + (self.nowPlayingPositionSlider.disabled = !0); + for ( + var _i7 = 0, _length7 = fastForwardButtons.length; + _i7 < _length7; + _i7++ + ) + fastForwardButtons[_i7].classList.add("hide"); + for ( + var _i8 = 0, _length8 = rewindButtons.length; + _i8 < _length8; + _i8++ + ) + rewindButtons[_i8].classList.add("hide"); + btnSubtitles.classList.add("hide"), + btnAudio.classList.add("hide"), + ratingInfoContainer.classList.add("hide"), + updateButtomTabsVisibility(0, null, null), + (osdTitle.innerHTML = ""), + (view.querySelector(".videoOsdMediaInfo").innerHTML = ""); + } + } + function setPoster(item) { + var posterContainer = osdPosterContainer; + item + ? (posterContainer.classList.remove("hide"), + posterContainer.resume({ refresh: !0 })) + : (posterContainer.classList.add("hide"), + (posterContainer.innerHTML = "")); + } + var endEditTimeoutForPositionSlider, + itemsContainer, + nowPlayingSliderValue = 0, + nowPlayingSliderRunTimeTicks = 0; + function endEditsForPositionSlider() { + self.nowPlayingPositionSlider.endEditing(!0, nowPlayingSliderValue); + } + function clearEndEditTimeoutForPositionSlider() { + endEditTimeoutForPositionSlider && + (clearTimeout(endEditTimeoutForPositionSlider), + (endEditTimeoutForPositionSlider = null)); + } + function startEndEditTimeoutForPositionSlider() { + clearEndEditTimeoutForPositionSlider(), + (endEditTimeoutForPositionSlider = setTimeout( + endEditsForPositionSlider, + 800, + )); + } + function convertMsToNowPlayingSliderStep(ms) { + return nowPlayingSliderRunTimeTicks + ? ((1e4 * ms) / nowPlayingSliderRunTimeTicks) * 100 + : self.nowPlayingPositionSlider.step; + } + function cancelPositionSliderEditing() { + clearEndEditTimeoutForPositionSlider(); + var elem = self.nowPlayingPositionSlider; + elem.dragging && elem.cancelEditing(); + } + function updateFullscreenIcon() { + var title; + _playbackmanager.default.isFullscreen(self.currentPlayer) + ? ((title = _globalize.default.translate("ExitFullscreen")), + (btnFullscreen.querySelector("i").innerHTML = "")) + : ((title = _globalize.default.translate("Fullscreen")), + (btnFullscreen.querySelector("i").innerHTML = "")), + (btnFullscreen.title = title), + btnFullscreen.setAttribute("aria-label", title); + } + function updateTransparency(player, state, mediaType) { + var hideTransportButtons, + isLocalVideo = isDisplayingLocalVideo(player, mediaType), + videoOsdText = + (console.log( + "updateTransparency: isLocalVideo:" + + isLocalVideo + + ", mediaType:" + + mediaType, + ), + _layoutmanager.default.tv + ? videoOsdSecondaryText.classList.add("videoOsdSecondaryText-tv") + : videoOsdSecondaryText.classList.remove( + "videoOsdSecondaryText-tv", + ), + self.videoOsdText), + bottomTabs = self.bottomTabs, + osdBottomElement = self.osdBottomElement; + if (isLocalVideo) { + if ( + !player.isLocalPlayer || + player.isExternalPlayer || + state.IsBackgroundPlayback + ) + unlockOrientation(), setSystemUIHidden(!1); + else { + switch (_usersettings.default.videoOrientation()) { + case "device": + unlockOrientation(); + break; + case "landscape": + lockOrientation("landscape"); + break; + default: + lockOrientation("any"); + } + setSystemUIHidden(!0); + } + self.currentVisibleMenu || + (headerElement.classList.add("videoOsdHeader-hidden", "hide"), + osdBottomElement.classList.add("hide", "videoOsdBottom-hidden")), + osdBottomElement.classList.add("videoOsdBottom-video"), + osdPosterContainer.classList.remove("osdPosterContainer-autoexpand"), + videoOsdSecondaryText.classList.remove( + "videoOsdSecondaryText-remotecontrol", + ), + videoOsdBottomMaincontrols.classList.remove( + "videoOsdBottomMaincontrols-autoexpand", + ), + videoOsdPositionContainer.classList.remove( + "videoOsdPositionContainer-autosmall", + ), + videoOsdPositionContainer.classList.add("focuscontainer-x"), + _layoutmanager.default.tv + ? ((function () { + var val; + if (!_usersettings.default.enableVideoUnderUI()) + return "true" === + (val = _usersettings.default.hideMediaTransportButtons()) + ? 1 + : "false" !== val && !_mouse.default.lastMouseInputTime(); + })() && (hideTransportButtons = !0), + mainLockButton.classList.add("hide")) + : mainLockButton.classList.remove("hide"), + videoOsdButtomButtonsTopRight.classList.remove( + "videoOsdBottom-buttons-topright-remotecontrol", + "videoOsdBottom-buttons-topright-remotecontrol-tv", + ), + tabContainersElem.classList.remove( + "videoosd-tabcontainers-autosmall", + ), + bottomTabs.classList.remove("videoOsdBottom-tabs-remotecontrol"), + videoOsdVolumeControls.classList.add( + "videoOsdVolumeControls-showhover", + "videoOsdVolumeControls-hidetouch", + ), + videoOsdParentTitle.classList.add("hide"), + videoOsdParentTitleLarge.classList.remove("hide"), + state.IsInitialRequest + ? _approuter.default.setTransparency(0) + : _approuter.default.setTransparency("full"), + hideOrShowAll( + self, + stopButtons, + !_layoutmanager.default.tv || + !_usersettings.default.enableVideoUnderUI(), + null, + ), + videoOsdText.classList.remove( + "videoOsdText-remotecontrol", + "videoOsdText-autosmall", + "videoOsdText-remotecontrol-tv", + ), + videoOsdBottomButtons.classList.remove( + "videoOsdBottom-buttons-remotecontrol", + "videoOsdBottom-buttons-remotecontrol-tv", + ), + osdBottomElement.classList.remove( + "videoOsdBottom-remotecontrol", + "videoOsdBottom-safe", + "padded-top-page", + "videoOsdBottom-tvnowplaying", + ), + view.classList.remove("justify-content-flex-end"), + osdTitle.classList.remove("secondaryText"), + videoOsdSecondaryMediaInfo.classList.remove( + "videoOsdSecondaryMediaInfo-remotecontrol", + ), + videoOsdPositionText.classList.remove( + "videoOsd-customFont-remotecontrol", + ), + videoOsdDurationText.classList.remove( + "videoOsd-customFont-remotecontrol", + ), + videoOsdBottomButtons.classList.remove( + "videoOsd-customFont-remotecontrol", + "videoOsd-customFont-remotecontrol-buttons", + ), + videoOsdButtomButtonsTopRight.classList.remove( + "videoOsd-customFont-remotecontrol", + "videoOsd-customFont-remotecontrol-buttons", + ), + headerElement.classList.remove( + "videoOsd-customFont-remotecontrol", + "videoosd-header-safe", + ), + videoOsdBottomContentbuttons.classList.add("hide"), + videoOsdBottomContentbuttons.classList.remove( + "focusable", + "videoOsd-customFont-remotecontrol-buttons", + "videoOsd-customFont-remotecontrol", + "videoOsd-customFont-remotecontrol-buttons", + "videoOsdBottom-contentbuttons-tv", + ), + videoOsdVolumeSliderWrapper.classList.remove( + "videoOsdVolumeSliderWrapper-customfont", + ), + buttonMute.classList.remove("btnMuteOSD-remotecontrol"), + videoOsdPositionContainer.classList.remove( + "videoOsdPositionContainer-limitwidth", + ), + backdropContainer.classList.remove( + "nowplaying-backdropcontainer-blur", + "nowplaying-backdropcontainer-blur-high", + "nowplaying-backdropcontainer-blur-extrasaturation", + "nowplaying-backdropcontainer-blur-backdropfilter", + ), + backgroundContainer.classList.remove( + "nowplaying-backgroundcontainer-blur", + "nowplaying-backgroundcontainer-blur-backdropfilter", + ), + backgroundContainer.classList.remove( + "nowplaying-backgroundcontainer-brighter", + ), + (self.enableStopOnBack = !0), + (self.enableBackOnStop = !0), + btnOsdMoreTitle.classList.add("hide"), + btnOsdMoreBottom.classList.add("hide"); + } else + unlockOrientation(), + setSystemUIHidden(!1), + osdTitle.classList.add("secondaryText"), + osdBottomElement.classList.remove( + "videoOsdBottom-video", + "videoOsdBottom-hidden", + "hide", + "videoosd-withupnext", + ), + self.showOsd(), + "blur" === + _usersettings.default[ + "Video" === mediaType + ? "nowPlayingVideoBackgroundStyle" + : "nowPlayingAudioBackgroundStyle" + ]() + ? (backdropContainer.classList.add( + "nowplaying-backdropcontainer-blur", + ), + enableHighResBlur && + backdropContainer.classList.add( + "nowplaying-backdropcontainer-blur-high", + ), + _browser.default.chrome + ? backdropContainer.classList.add( + "nowplaying-backdropcontainer-blur-extrasaturation", + ) + : backdropContainer.classList.remove( + "nowplaying-backdropcontainer-blur-extrasaturation", + ), + backgroundContainer.classList.add( + "nowplaying-backgroundcontainer-blur", + ), + useBackdropFilterForBlur && + (backgroundContainer.classList.add( + "nowplaying-backgroundcontainer-blur-backdropfilter", + ), + backdropContainer.classList.add( + "nowplaying-backdropcontainer-blur-backdropfilter", + )), + backgroundContainer.classList.remove( + "nowplaying-backgroundcontainer-brighter", + )) + : (backdropContainer.classList.remove( + "nowplaying-backdropcontainer-blur", + "nowplaying-backdropcontainer-blur-high", + "nowplaying-backdropcontainer-blur-extrasaturation", + "nowplaying-backdropcontainer-blur-backdropfilter", + ), + backgroundContainer.classList.remove( + "nowplaying-backgroundcontainer-blur", + "nowplaying-backgroundcontainer-blur-backdropfilter", + ), + backgroundContainer.classList.add( + "nowplaying-backgroundcontainer-brighter", + )), + videoOsdParentTitleLarge.classList.add("hide"), + videoOsdParentTitle.classList.remove("hide"), + videoOsdSecondaryMediaInfo.classList.add( + "videoOsdSecondaryMediaInfo-remotecontrol", + ), + mainLockButton.classList.add("hide"), + headerElement.classList.add("videoosd-header-safe"), + _layoutmanager.default.tv + ? (osdBottomElement.classList.add( + "videoOsdBottom-safe", + "padded-top-page", + "videoOsdBottom-tvnowplaying", + "videoOsdBottom-remotecontrol", + ), + view.classList.remove("justify-content-flex-end"), + videoOsdText.classList.add( + "videoOsdText-remotecontrol", + "videoOsdText-remotecontrol-tv", + ), + videoOsdText.classList.remove("videoOsdText-autosmall"), + osdPosterContainer.classList.remove( + "osdPosterContainer-autoexpand", + ), + videoOsdSecondaryText.classList.add( + "videoOsdSecondaryText-remotecontrol", + ), + videoOsdBottomButtons.classList.remove( + "videoOsdBottom-buttons-remotecontrol", + "videoOsd-customFont-remotecontrol", + "videoOsd-customFont-remotecontrol-buttons", + ), + videoOsdBottomButtons.classList.add( + "videoOsdBottom-buttons-remotecontrol-tv", + ), + videoOsdBottomMaincontrols.classList.remove( + "videoOsdBottomMaincontrols-autoexpand", + ), + videoOsdPositionContainer.classList.add("focuscontainer-x"), + videoOsdPositionContainer.classList.remove( + "videoOsdPositionContainer-autosmall", + ), + tabContainersElem.classList.remove( + "videoosd-tabcontainers-autosmall", + ), + bottomTabs.classList.add("videoOsdBottom-tabs-remotecontrol"), + videoOsdPositionText.classList.remove( + "videoOsd-customFont-remotecontrol", + ), + videoOsdDurationText.classList.remove( + "videoOsd-customFont-remotecontrol", + ), + headerElement.classList.remove( + "videoOsd-customFont-remotecontrol", + ), + videoOsdBottomContentbuttons.classList.add( + "focusable", + "videoOsdBottom-contentbuttons-tv", + ), + videoOsdBottomContentbuttons.classList.remove( + "hide", + "videoOsd-customFont-remotecontrol-buttons", + "videoOsd-customFont-remotecontrol", + "videoOsd-customFont-remotecontrol-buttons", + ), + videoOsdVolumeSliderWrapper.classList.remove( + "videoOsdVolumeSliderWrapper-customfont", + ), + videoOsdVolumeControls.classList.add( + "videoOsdVolumeControls-showhover", + "videoOsdVolumeControls-hidetouch", + ), + buttonMute.classList.remove("btnMuteOSD-remotecontrol"), + videoOsdButtomButtonsTopRight.classList.remove( + "videoOsd-customFont-remotecontrol", + "videoOsd-customFont-remotecontrol-buttons", + "videoOsdBottom-buttons-topright-remotecontrol", + ), + videoOsdButtomButtonsTopRight.classList.add( + "videoOsdBottom-buttons-topright-remotecontrol-tv", + ), + btnOsdMoreTitle.classList.add("hide"), + btnOsdMoreBottom.classList.remove("hide")) + : (osdBottomElement.classList.add( + "videoOsdBottom-remotecontrol", + "videoOsdBottom-safe", + "padded-top-page", + ), + view.classList.remove("justify-content-flex-end"), + osdPosterContainer.classList.add("osdPosterContainer-autoexpand"), + videoOsdText.classList.add( + "videoOsdText-remotecontrol", + "videoOsdText-autosmall", + ), + videoOsdText.classList.remove("videoOsdText-remotecontrol-tv"), + videoOsdBottomMaincontrols.classList.add( + "videoOsdBottomMaincontrols-autoexpand", + ), + videoOsdPositionContainer.classList.add( + "videoOsdPositionContainer-autosmall", + ), + videoOsdPositionContainer.classList.remove("focuscontainer-x"), + tabContainersElem.classList.add( + "videoosd-tabcontainers-autosmall", + ), + bottomTabs.classList.add("videoOsdBottom-tabs-remotecontrol"), + videoOsdSecondaryText.classList.add( + "videoOsdSecondaryText-remotecontrol", + ), + videoOsdBottomButtons.classList.add( + "videoOsdBottom-buttons-remotecontrol", + ), + videoOsdBottomButtons.classList.remove( + "videoOsdBottom-buttons-remotecontrol-tv", + ), + videoOsdPositionText.classList.add( + "videoOsd-customFont-remotecontrol", + ), + videoOsdDurationText.classList.add( + "videoOsd-customFont-remotecontrol", + ), + videoOsdBottomButtons.classList.add( + "videoOsd-customFont-remotecontrol", + "videoOsd-customFont-remotecontrol-buttons", + ), + videoOsdButtomButtonsTopRight.classList.add( + "videoOsd-customFont-remotecontrol", + "videoOsd-customFont-remotecontrol-buttons", + ), + headerElement.classList.add("videoOsd-customFont-remotecontrol"), + videoOsdBottomContentbuttons.classList.remove( + "hide", + "videoOsdBottom-contentbuttons-tv", + ), + videoOsdBottomContentbuttons.classList.add( + "focusable", + "videoOsd-customFont-remotecontrol-buttons", + "videoOsd-customFont-remotecontrol", + ), + videoOsdVolumeSliderWrapper.classList.add( + "videoOsdVolumeSliderWrapper-customfont", + ), + videoOsdVolumeControls.classList.remove( + "videoOsdVolumeControls-showhover", + "videoOsdVolumeControls-hidetouch", + ), + buttonMute.classList.add("btnMuteOSD-remotecontrol"), + videoOsdButtomButtonsTopRight.classList.add( + "videoOsdBottom-buttons-topright-remotecontrol", + ), + videoOsdButtomButtonsTopRight.classList.remove( + "videoOsdBottom-buttons-topright-remotecontrol-tv", + ), + videoOsdPositionContainer.classList.add( + "videoOsdPositionContainer-limitwidth", + ), + btnOsdMoreTitle.classList.remove("hide"), + btnOsdMoreBottom.classList.add("hide")), + _approuter.default.setTransparency(0), + hideOrShowAll(self, stopButtons, !1, null), + (self.enableStopOnBack = !1), + (self.enableBackOnStop = !0); + hideTransportButtons + ? (videoOsdBottomButtons.classList.add("hide"), + videoOsdBottomButtons.classList.remove("focusable"), + self.bottomTabs.classList.add("videoOsdTabs-margintop")) + : (videoOsdBottomButtons.classList.add("focusable"), + videoOsdBottomButtons.classList.remove("hide"), + self.bottomTabs.classList.remove("videoOsdTabs-margintop")), + isLocalVideo + ? (destroyPlayQueue(self), destroyLyricsRenderer(self)) + : (self.lyricsRenderer || + (self.lyricsRenderer = new _lyrics.default({ + parent: view.querySelector(".lyricsSection"), + })), + self.playQueue || + ((player = view.querySelector(".osdPlayQueue")), + (state = + _usersettings.default.osdContentSection() || + getDefaultOsdContentSection()), + _layoutmanager.default.tv + ? ((self.playQueue = new _tvplayqueue.default({ + parent: player, + })), + (state = "playqueue")) + : (self.playQueue = new _playqueue.default({ parent: player })), + setContentSection( + (state = + "lyrics" === state ? getDefaultOsdContentSection() : state), + !1, + ))); + mediaType = self.btnPause; + isLocalVideo && !_layoutmanager.default.tv + ? (mainTransportButtons.classList.add( + "videoOsd-centerButtons-autolayout", + ), + mediaType.classList.add("videoOsd-btnPause-autolayout"), + stopButtons[0].classList.add("btnVideoOsd-stop-center-autolayout")) + : (mainTransportButtons.classList.remove( + "videoOsd-centerButtons-autolayout", + ), + mediaType.classList.remove("videoOsd-btnPause-autolayout"), + stopButtons[0].classList.remove( + "btnVideoOsd-stop-center-autolayout", + )); + } + function getDetailImageItemsSync() { + var item = currentDisplayItem, + items = []; + return ( + item && + (item.SeriesPrimaryImageTag && + (item = { + Id: item.SeriesId, + Name: item.SeriesName, + ServerId: item.ServerId, + ImageTags: { Primary: item.SeriesPrimaryImageTag }, + IsFolder: !0, + PrimaryImageAspectRatio: 2 / 3, + }), + items.push(item)), + { Items: items, TotalRecordCount: items.length } + ); + } + function getDetailImageItems() { + return Promise.resolve(getDetailImageItemsSync()); + } + function getDetailImageListOptions(items) { + var cardClass = "osdRemoteControlImageCard"; + return ( + _layoutmanager.default.tv || + (cardClass += " osdRemoteControlImageCard-automargin"), + { + renderer: _cardbuilder.default, + options: { + overlayText: !0, + fields: [], + action: "none", + multiSelect: !1, + contextMenu: !_layoutmanager.default.tv, + ratingButton: !_layoutmanager.default.tv, + playedButton: !1, + cardClass: cardClass, + cardBoxClass: "osdRemoteControlImageCardBox", + cardContentClass: + "osdRemoteControlImageCardContent legacyLazyLoadImmediate", + defaultIcon: !0, + typeIndicator: !1, + playedIndicator: !1, + syncIndicator: !1, + timerIndicator: !1, + randomDefaultBackground: !1, + staticElement: !0, + progress: !1, + hoverPlayButton: !1, + moreButton: !1, + enableUserData: !_layoutmanager.default.tv, + shape: "auto", + }, + virtualScrollLayout: "vertical-grid", + } + ); + } + function onStateChanged(event, state) { + state.NowPlayingItem && + ((isEnabled = !0), + (function (player, state) { + var playState = (self.lastPlayerState = state).PlayState || {}, + supportedCommands = + (updatePlayPauseState(playState.IsPaused, state.IsInitialRequest), + _playbackmanager.default.getSupportedCommands(player)), + nowPlayingPositionSlider = + ((currentPlayerSupportedCommands = supportedCommands), + updatePlayerVolumeState( + 0, + playState.IsMuted, + playState.VolumeLevel, + supportedCommands, + ), + updatePlayerBrightnessState(player), + self.nowPlayingPositionSlider); + nowPlayingPositionSlider && + !nowPlayingPositionSlider.dragging && + (nowPlayingPositionSlider.disabled = !playState.CanSeek); + for ( + var _i13 = 0, _length13 = fastForwardButtons.length; + _i13 < _length13; + _i13++ + ) + fastForwardButtons[_i13].disabled = !playState.CanSeek; + for ( + var _i14 = 0, _length14 = rewindButtons.length; + _i14 < _length14; + _i14++ + ) + rewindButtons[_i14].disabled = !playState.CanSeek; + var nowPlayingItem = state.NowPlayingItem || {}, + displayingLocalVideo = isDisplayingLocalVideo( + player, + nowPlayingItem.MediaType, + ), + focusedElement = + (updateTransparency(player, state, nowPlayingItem.MediaType), + (playbackStartTimeTicks = playState.PlaybackStartTimeTicks), + updateTimeDisplay( + playState.PositionTicks, + nowPlayingItem.RunTimeTicks, + playState.PlaybackStartTimeTicks, + playState.BufferedRanges || [], + ), + updateNowPlayingInfo(0, player, state), + document.activeElement); + state.MediaSource && !state.IsInitialRequest + ? displayingLocalVideo || _layoutmanager.default.tv + ? (hideButton(btnVideoOsdSettingsTransportButton, focusedElement), + self.btnVideoOsdSettingsRight.classList.remove("hide")) + : (btnVideoOsdSettingsTransportButton.classList.remove("hide"), + hideButton(self.btnVideoOsdSettingsRight, focusedElement)) + : (hideButton(self.btnVideoOsdSettingsRight, focusedElement), + hideButton(btnVideoOsdSettingsTransportButton, focusedElement)); + var isProgressClear = + state.MediaSource && null == state.MediaSource.RunTimeTicks; + nowPlayingPositionSlider.setIsClear(isProgressClear), + !supportedCommands.includes("ToggleFullscreen") || + !displayingLocalVideo || + (player.isLocalPlayer && + _layoutmanager.default.tv && + _playbackmanager.default.isFullscreen(player)) + ? hideButton(btnFullscreen, focusedElement) + : btnFullscreen.classList.remove("hide"); + state.IsInitialRequest || + !supportedCommands.includes("PictureInPicture") || + _layoutmanager.default.tv || + supportedCommands.includes("AutoPictureInPicture") + ? hideButton(view.querySelector(".btnPip"), focusedElement) + : view.querySelector(".btnPip").classList.remove("hide"); + updateRepeatModeDisplay(playState.RepeatMode), + supportedCommands.includes("SetRepeatMode") && + "Video" !== nowPlayingItem.MediaType && + _layoutmanager.default.tv + ? btnRepeatMode.classList.remove("hide") + : hideButton(btnRepeatMode, focusedElement); + updateFullscreenIcon(); + (nowPlayingPositionSlider = state.PlaylistIndex), + (isProgressClear = state.PlaylistLength), + updatePlaylistButtons( + nowPlayingPositionSlider, + isProgressClear, + focusedElement, + ), + (displayingLocalVideo = self.playQueue); + displayingLocalVideo && + ((supportedCommands = state.PlaylistItemId), + displayingLocalVideo.updatePlaylist( + player, + supportedCommands, + nowPlayingPositionSlider, + isProgressClear, + )); + })(this, state)); + } + function onPlayPauseStateChanged(e) { + isEnabled && updatePlayPauseState(this.paused()); + } + function onVolumeChanged(e) { + isEnabled && + updatePlayerVolumeState( + 0, + this.isMuted(), + this.getVolume(), + currentPlayerSupportedCommands, + ); + } + function onBrightnessChanged(e) { + isEnabled && updatePlayerBrightnessState(this); + } + function onPlaybackStart(e, state) { + console.log("nowplaying event: " + e.type), cancelPositionSliderEditing(); + onStateChanged.call(this, e, state), + resetUpNextDialog(), + resetRatingText(), + showHideSkipIntro(!1), + "Video" !== + (null == (e = state.NowPlayingItem) ? void 0 : e.MediaType) && + self.bottomTabs.selectedIndex(-1); + } + function onRepeatModeChange(e) { + updateRepeatModeDisplay(_playbackmanager.default.getRepeatMode(this)); + } + function onSubtitleTrackChange() { + destroySubtitleOffsetOverlay(self); + } + function onPlaylistItemAdd(e) { + var playlistItemId, + playlistIndex = _playbackmanager.default.getCurrentPlaylistIndex(this), + playlistLength = + _playbackmanager.default.getCurrentPlaylistLength(this), + playQueue = + (updatePlaylistButtons( + playlistIndex, + playlistLength, + document.activeElement, + ), + self.playQueue); + playQueue && + ((playlistItemId = + _playbackmanager.default.getCurrentPlaylistItemId(this)), + playQueue.updatePlaylist( + this, + playlistItemId, + playlistIndex, + playlistLength, + )); + } + function onPlaylistItemMove(e, info) { + updatePlaylistButtons( + _playbackmanager.default.getCurrentPlaylistIndex(this), + _playbackmanager.default.getCurrentPlaylistLength(this), + document.activeElement, + ); + var playQueue = self.playQueue; + playQueue && playQueue.onPlaylistItemMoved(this, e, info); + } + function onPlaylistItemRemove(e, info) { + updatePlaylistButtons( + _playbackmanager.default.getCurrentPlaylistIndex(this), + _playbackmanager.default.getCurrentPlaylistLength(this), + document.activeElement, + ); + var playQueue = self.playQueue; + playQueue && playQueue.onPlaylistItemRemoved(this, e, info); + } + function resetUpNextDialog() { + showHideUpNext((comingUpNextDisplayed = !1)), + btnHideUpNext.classList.remove("hide"); + } + function onPlaybackStopped(e, state) { + hideWaiting(), + cancelPositionSliderEditing(), + (currentRuntimeTicks = null), + resetRatingText(); + self.currentItem && + showComingUpNextIfNeeded( + 0, + self.currentItem, + 1, + 1, + !0, + currentCreditsInfo, + ); + var hideUpNextHasFocus = btnHideUpNext === document.activeElement; + btnHideUpNext.classList.add("hide"), + hideUpNextHasFocus && + _focusmanager.default.autoFocus(self.upNextContainer), + showHideSkipIntro(!1), + console.log("nowplaying event: " + e.type), + state.NextMediaType || + ((hideUpNextHasFocus = self.playQueue) && + hideUpNextHasFocus.onPlaybackStopped(), + (e = self.lyricsRenderer) && e.onPlaybackStopped(), + (self.enableStopOnBack = !1), + self.enableBackOnStop && ((self.enableBackOnStop = !1), self.exit())); + } + function onMediaStreamsChanged(e) { + var state = _playbackmanager.default.getPlayerState(this); + onStateChanged.call(this, e, state); + } + function releaseCurrentPlayer() { + cancelPositionSliderEditing(), + destroyStats(self), + destroySubtitleOffsetOverlay(self), + resetUpNextDialog(), + resetRatingText(), + showHideSkipIntro(!1); + var player = self.currentPlayer; + player && + (hideWaiting(), + _events.default.off(player, "playbackrequest", onPlaybackStart), + _events.default.off(player, "playbackstart", onPlaybackStart), + _events.default.off(player, "playbackstop", onPlaybackStopped), + _events.default.off(player, "volumechange", onVolumeChanged), + _events.default.off(player, "brightnesschange", onBrightnessChanged), + _events.default.off(player, "pause", onPlayPauseStateChanged), + _events.default.off(player, "unpause", onPlayPauseStateChanged), + _events.default.off(player, "timeupdate", onTimeUpdate), + _events.default.off(player, "waiting", onWaiting), + _events.default.off(player, "playing", onPlaying), + _events.default.off(player, "fullscreenchange", updateFullscreenIcon), + _events.default.off( + player, + "mediastreamschange", + onMediaStreamsChanged, + ), + _events.default.off(player, "statechange", onStateChanged), + _events.default.off(player, "repeatmodechange", onRepeatModeChange), + _events.default.off( + player, + "subtitletrackchange", + onSubtitleTrackChange, + ), + _events.default.off(player, "playlistitemadd", onPlaylistItemAdd), + _events.default.off(player, "playlistitemmove", onPlaylistItemMove), + _events.default.off(player, "playlistitemremove", onPlaylistItemRemove), + (self.currentPlayer = null)); + } + function resetRatingText() { + ratingInfoContainer.classList.add("hide"), (ratingTextNeedsUpdate = !0); + } + function showHideSkipIntro(show) { + var needToRefocus; + show + ? skipIntroContainer._visible || + ((skipIntroContainer._visible = !0), + skipIntroContainer.classList.remove("hide"), + self.currentVisibleMenu) || + (_focusmanager.default.focus(btnSkipIntro), + enableAutoSkipIntro && btnSkipIntro.click()) + : skipIntroContainer._visible && + ((skipIntroContainer._visible = !1), + (show = btnSkipIntro === document.activeElement), + (needToRefocus = !!self.currentVisibleMenu && show), + skipIntroContainer.classList.add("hide"), + needToRefocus + ? focusMainOsdControls(self) + : show && btnSkipIntro.blur()); + } + function showHideUpNext(show, timeRemainingTicks) { + var upNextContainer = self.upNextContainer; + show + ? upNextContainer._visible || + ((btnPlayNextFromUpNextProgress.style.transform = "scaleX(0)"), + (upNextContainer._visible = !0), + (upNextContainer._timeRemainingTicks = timeRemainingTicks), + upNextContainer.classList.remove("hide"), + self.osdBottomElement.classList.add("videoosd-withupnext"), + _focusmanager.default.focus( + upNextContainer.querySelector(".btnPlayNextFromUpNext"), + )) + : upNextContainer._visible && + ((upNextContainer._visible = !1), + (upNextContainer._timeRemainingTicks = null), + (show = + !!self.currentVisibleMenu && + upNextContainer.contains(document.activeElement)), + upNextContainer.classList.add("hide"), + self.osdBottomElement.classList.remove("videoosd-withupnext"), + show) && + focusMainOsdControls(self); + } + function validateSkipIntroFeature(options, incrementAppSettings) { + return require(["registrationServices"]).then(function (responses) { + return responses[0] + .validateFeature("dvr", Object.assign({ viewOnly: !0 }, options)) + .then( + function () { + (skipIntroValidated = !0), + _appsettings.default.introSkipDisplayCount(0); + }, + function (err) { + return ( + (skipIntroValidated = !1), + incrementAppSettings && + _appsettings.default.introSkipDisplayCount( + _appsettings.default.introSkipDisplayCount() + 1, + ), + Promise.reject(err) + ); + }, + ); + }); + } + (self.updateTransparency = updateTransparency), + ((itemsContainer = osdPosterContainer).fetchData = getDetailImageItems), + (itemsContainer.getListOptions = getDetailImageListOptions), + _dom.default.addEventListener( + btnFullscreen, + "click", + function () { + _playbackmanager.default.toggleFullscreen(self.currentPlayer); + }, + { passive: !0 }, + ), + view.querySelector(".btnPip").addEventListener("click", function () { + _playbackmanager.default.togglePictureInPicture(self.currentPlayer); + }), + self.btnVideoOsdSettingsRight.addEventListener( + "click", + onSettingsButtonClick, + ), + btnVideoOsdSettingsTransportButton.addEventListener( + "click", + onSettingsButtonClick, + ), + (self.bindToPlayer = function (player, forceStateChange) { + player === self.currentPlayer + ? forceStateChange && + player && + onStateChanged.call( + player, + { type: "viewresume" }, + _playbackmanager.default.getPlayerState(player), + ) + : (releaseCurrentPlayer(), + (self.currentPlayer = player) && + (onStateChanged.call( + player, + { type: "init" }, + _playbackmanager.default.getPlayerState(player), + ), + _events.default.on(player, "playbackrequest", onPlaybackStart), + _events.default.on(player, "playbackstart", onPlaybackStart), + _events.default.on(player, "playbackstop", onPlaybackStopped), + _events.default.on(player, "volumechange", onVolumeChanged), + _events.default.on( + player, + "brightnesschange", + onBrightnessChanged, + ), + _events.default.on(player, "pause", onPlayPauseStateChanged), + _events.default.on(player, "unpause", onPlayPauseStateChanged), + _events.default.on(player, "timeupdate", onTimeUpdate), + _events.default.on(player, "waiting", onWaiting), + _events.default.on(player, "playing", onPlaying), + _events.default.on( + player, + "fullscreenchange", + updateFullscreenIcon, + ), + _events.default.on( + player, + "mediastreamschange", + onMediaStreamsChanged, + ), + _events.default.on(player, "statechange", onStateChanged), + _events.default.on( + player, + "repeatmodechange", + onRepeatModeChange, + ), + _events.default.on( + player, + "subtitletrackchange", + onSubtitleTrackChange, + ), + _events.default.on(player, "playlistitemadd", onPlaylistItemAdd), + _events.default.on( + player, + "playlistitemmove", + onPlaylistItemMove, + ), + _events.default.on( + player, + "playlistitemremove", + onPlaylistItemRemove, + ), + resetUpNextDialog(), + resetRatingText(), + showHideSkipIntro(!1))); + }), + (self.releaseCurrentPlayer = releaseCurrentPlayer); + var IntroEndToleranceTicks = 2e7; + function onWaiting(e) { + (self.timeWhenWaiting = _playbackmanager.default.currentTime(this)), + _loading.default.show(); + } + function hideWaiting() { + (self.timeWhenWaiting = null), _loading.default.hide(); + } + function onPlaying(e) { + hideWaiting(); + } + function onTimeUpdate(e) { + var now, currentTime, item; + !isEnabled || + (now = Date.now()) - lastUpdateTime < 200 || + ((currentTime = _playbackmanager.default.currentTime(this)) !== + self.timeWhenWaiting && hideWaiting(), + showComingUpNextIfNeeded( + 0, + (item = self.currentItem), + currentTime, + (currentRuntimeTicks = _playbackmanager.default.duration(this)), + !1, + currentCreditsInfo, + ), + now - lastUpdateTime < 600) || + ((lastUpdateTime = now), + (function (currentTime) { + var introInfo = currentIntroInfo; + introInfo && + enableSkipIntro && + currentTime >= introInfo.start && + currentTime < introInfo.end - IntroEndToleranceTicks && + (!1 !== skipIntroValidated || + _appsettings.default.introSkipDisplayCount() < 5) + ? (!0 === skipIntroValidated && + _appsettings.default.introSkipDisplayCount(0), + showHideSkipIntro(!0)) + : showHideSkipIntro(!1); + })(currentTime), + (function () { + var item; + ratingTextNeedsUpdate && + (item = currentDisplayItem) && + ((ratingTextNeedsUpdate = !1), + item.OfficialRating && + "Trailer" !== item.Type && + "Video" === item.MediaType && + _usersettings.default.enableRatingInfoOnPlaybackStart() + ? ((ratingTextElement.innerHTML = _globalize.default.translate( + "RatedValue", + item.OfficialRating, + )), + ratingInfoContainer.classList.add("hide"), + ratingInfoContainer.offsetWidth, + ratingInfoContainer.classList.remove("hide")) + : ratingInfoContainer.classList.add("hide")); + })(), + updateTimeDisplay( + currentTime, + currentRuntimeTicks, + _playbackmanager.default.playbackStartTime(this), + _playbackmanager.default.getBufferedRanges(this), + ), + (function (player, item) { + if ("TvChannel" === item.Type) { + item = item.CurrentProgram; + if (item && item.EndDate) + try { + var state, + endDate = _datetime.default.parseISO8601Date(item.EndDate); + Date.now() >= endDate.getTime() && + (console.log("program info needs to be refreshed"), + (state = _playbackmanager.default.getPlayerState(player)), + onStateChanged.call( + player, + { type: "updatemetadata" }, + state, + )); + } catch (e) { + console.log("Error parsing date: " + item.EndDate); + } + } + })(this, item)); + } + var fiftyMinuteTicks = 3e10, + fortyMinuteTicks = 24e9; + function showComingUpNextIfNeeded( + player, + currentItem, + currentTimeTicks, + runtimeTicks, + isStopped, + creditsInfo, + ) { + ((runtimeTicks && currentTimeTicks) || isStopped) && + "Episode" === currentItem.Type && + self.hasNextTrack && + ((currentItem = runtimeTicks - currentTimeTicks), + (!comingUpNextDisplayed || isStopped) && + ((creditsInfo = (function (runtimeTicks, creditsInfo) { + return (creditsInfo = + (null == creditsInfo ? void 0 : creditsInfo.start) || 0) && + creditsInfo < runtimeTicks + ? creditsInfo + : runtimeTicks - + 1e3 * + (fiftyMinuteTicks <= runtimeTicks + ? 40 + : fortyMinuteTicks <= runtimeTicks + ? 35 + : 30) * + 1e4; + })(runtimeTicks, creditsInfo)), + isStopped || + (creditsInfo <= currentTimeTicks && + 3e9 <= runtimeTicks && + 2e8 <= currentItem && + _usersettings.default.enableNextVideoInfoOverlay())) && + (isStopped && btnHideUpNext.classList.add("hide"), + showHideUpNext((comingUpNextDisplayed = !0), currentItem)), + self.upNextContainer._visible) && + (creditsInfo = self.upNextContainer._timeRemainingTicks) && + ((currentTimeTicks = isStopped + ? 1 + : (creditsInfo - currentItem + 15e6) / creditsInfo), + (currentTimeTicks *= 100), + (currentTimeTicks = (currentTimeTicks = Math.min( + currentTimeTicks, + 100, + )).toFixed(2)), + (btnPlayNextFromUpNextProgress.style.transform = + "scaleX(" + currentTimeTicks + "%)")); + } + function updatePlayPauseState(isPaused, isInitialRequest) { + var btnPause = self.btnPause, + title = isPaused + ? ((btnPause.querySelector("i").innerHTML = ""), + _globalize.default.translate("Play")) + : ((btnPause.querySelector("i").innerHTML = ""), + _globalize.default.translate("Pause")), + title = + ((btnPause.title = title), + btnPause.setAttribute("aria-label", title), + (btnPause.disabled = !0 === isInitialRequest), + self.playQueue); + title && title.setPausedState(isPaused); + } + function hideButton(btn, focusedElement) { + focusedElement = btn === focusedElement; + btn.classList.add("hide"), focusedElement && focusMainOsdControls(self); + } + function updatePlaylistButtons( + playlistIndex, + playlistLength, + focusedElement, + ) { + playlistIndex + ? btnPreviousTrack.classList.remove("hide") + : hideButton(btnPreviousTrack, focusedElement), + null != playlistIndex && + playlistLength && + playlistIndex < playlistLength - 1 + ? ((self.hasNextTrack = !0), btnNextTrack.classList.remove("hide")) + : ((self.hasNextTrack = !1), + hideButton(btnNextTrack, focusedElement)); + } + function updateRepeatModeDisplay(repeatMode) { + var icon = btnRepeatMode.querySelector("i"), + icon = + ("RepeatAll" === repeatMode + ? ((icon.innerHTML = ""), + icon.classList.add("toggleButtonIcon-active"), + btnRepeatMode.classList.add("toggleButton-active")) + : "RepeatOne" === repeatMode + ? ((icon.innerHTML = ""), + icon.classList.add("toggleButtonIcon-active"), + btnRepeatMode.classList.add("toggleButton-active")) + : ((icon.innerHTML = ""), + icon.classList.remove("toggleButtonIcon-active"), + btnRepeatMode.classList.remove("toggleButton-active")), + self.playQueue); + icon && icon.updateRepeatModeDisplay(repeatMode); + } + function getDisplayPercentByTimeOfDay( + programStartDateMs, + programRuntimeMs, + currentTimeMs, + ) { + return ((currentTimeMs - programStartDateMs) / programRuntimeMs) * 100; + } + function getStep(runtimeTicks) { + runtimeTicks = (runtimeTicks = + ((1e7 * (_layoutmanager.default.tv ? 10 : 1)) / runtimeTicks) * + 100).toFixed(3); + return ( + (runtimeTicks = Math.max(0.01, runtimeTicks)), + (runtimeTicks = Math.min(1, runtimeTicks)) + ); + } + function updateTimeDisplay( + positionTicks, + runtimeTicks, + playbackStartTimeTicks, + bufferedRanges, + ) { + for ( + var programRuntimeMs, + dash, + nowPlayingPositionSlider = self.nowPlayingPositionSlider, + bottomTabControllers = + (enableProgressByTimeOfDay + ? nowPlayingPositionSlider && + !nowPlayingPositionSlider.dragging && + (programStartDateMs && programEndDateMs + ? ((currentTimeMs = + (playbackStartTimeTicks + (positionTicks || 0)) / 1e4), + (nowPlayingSliderRunTimeTicks = + 1e4 * + (programRuntimeMs = + programEndDateMs - programStartDateMs)), + (nowPlayingPositionSlider.step = getStep( + nowPlayingSliderRunTimeTicks, + )), + (nowPlayingSliderValue = + ((currentTimeMs - programStartDateMs) / + programRuntimeMs) * + 100), + nowPlayingPositionSlider.setValue(nowPlayingSliderValue), + bufferedRanges.length + ? ((currentTimeMs = getDisplayPercentByTimeOfDay( + programStartDateMs, + programRuntimeMs, + (playbackStartTimeTicks + + (bufferedRanges[0].start || 0)) / + 1e4, + )), + (programRuntimeMs = getDisplayPercentByTimeOfDay( + programStartDateMs, + programRuntimeMs, + (playbackStartTimeTicks + + (bufferedRanges[0].end || 0)) / + 1e4, + )), + nowPlayingPositionSlider.setBufferedRanges([ + { start: currentTimeMs, end: programRuntimeMs }, + ])) + : nowPlayingPositionSlider.setBufferedRanges([])) + : ((nowPlayingPositionSlider.step = 0.01), + (nowPlayingSliderRunTimeTicks = null), + (nowPlayingSliderValue = 0), + nowPlayingPositionSlider.setValue(0), + nowPlayingPositionSlider.setBufferedRanges([]))) + : ((nowPlayingSliderRunTimeTicks = runtimeTicks), + nowPlayingPositionSlider && + !nowPlayingPositionSlider.dragging && + ((playbackStartTimeTicks = currentDisplayItem), + runtimeTicks && + null != (bufferedRanges = currentMediaSource) && + bufferedRanges.RunTimeTicks + ? ((currentTimeMs = positionTicks / runtimeTicks), + (currentTimeMs *= 100), + (nowPlayingPositionSlider.step = getStep(runtimeTicks)), + (nowPlayingSliderValue = currentTimeMs), + nowPlayingPositionSlider.setValue(currentTimeMs), + updateDurationText( + runtimeTicks - positionTicks, + playbackStartTimeTicks, + !0, + )) + : ((nowPlayingPositionSlider.step = 0.01), + (nowPlayingSliderValue = 0), + nowPlayingPositionSlider.setValue(0), + updateDurationText( + runtimeTicks, + playbackStartTimeTicks, + ))), + nowPlayingPositionSlider && + nowPlayingPositionSlider.setBufferedRanges([]), + (programRuntimeMs = videoOsdPositionText), + null == (bufferedRanges = positionTicks) || + isNaN(bufferedRanges) + ? (programRuntimeMs.innerHTML = "") + : ((bufferedRanges = + _datetime.default.getDisplayRunningTime(bufferedRanges)), + dash && (bufferedRanges = "-" + bufferedRanges), + (programRuntimeMs.innerHTML = bufferedRanges))), + self.bottomTabControllers), + _i15 = 0, + _length15 = bottomTabControllers.length; + _i15 < _length15; + _i15++ + ) + bottomTabControllers[_i15] && + bottomTabControllers[_i15].onTimeUpdate(positionTicks, runtimeTicks); + var currentTimeMs = self.lyricsRenderer; + currentTimeMs && + currentTimeMs.onTimeUpdate(positionTicks, currentRuntimeTicks); + } + function updateDurationText( + durationTicks, + displayItem, + enableTimeRemaining, + ) { + var html, + elem = videoOsdDurationText; + null == durationTicks || isNaN(durationTicks) + ? (elem.innerHTML = "") + : ((html = _datetime.default.getDisplayRunningTime(durationTicks)), + enableTimeRemaining && + ((html = "-" + html), + enableProgressByTimeOfDay || + "Video" !== + (null == displayItem ? void 0 : displayItem.MediaType) || + (html += + '/' + + _mediainfo.default + .getEndsAtFromPosition(durationTicks, 0, !1) + .toLowerCase() + + "")), + (elem.innerHTML = html)); + } + function updatePlayerBrightnessState(player) { + var showSlider = + !_layoutmanager.default.tv && + currentPlayerSupportedCommands.includes("SetBrightness"); + brightnessSlider && + (showSlider + ? (brightnessSliderContainer.classList.remove("hide"), + brightnessSlider.dragging || + brightnessSlider.setValue( + _playbackmanager.default.getBrightness(player), + )) + : brightnessSliderContainer.classList.add("hide")); + } + function updatePlayerVolumeState( + player, + isMuted, + volumeLevel, + supportedCommands, + ) { + var showMuteButton = !0, + showVolumeSlider = !0; + supportedCommands.includes("Mute") || (showMuteButton = !1), + supportedCommands.includes("SetVolume") || (showVolumeSlider = !1), + isMuted + ? (buttonMute.setAttribute( + "title", + _globalize.default.translate("Unmute"), + ), + (buttonMute.querySelector("i").innerHTML = "")) + : (buttonMute.setAttribute( + "title", + _globalize.default.translate("Mute"), + ), + (buttonMute.querySelector("i").innerHTML = "")), + showMuteButton + ? buttonMute.classList.remove("hide") + : buttonMute.classList.add("hide"), + nowPlayingVolumeSlider && + (showVolumeSlider + ? videoOsdVolumeControls.classList.remove("hide") + : videoOsdVolumeControls.classList.add("hide"), + nowPlayingVolumeSlider.dragging || + nowPlayingVolumeSlider.setValue(volumeLevel)); + } + function onSettingsButtonClick(e) { + var btn = this; + require(["playerSettingsMenu"], function (playerSettingsMenu) { + var player = self.currentPlayer; + player && + playerSettingsMenu + .show({ + player: player, + positionTo: btn, + stats: !0, + onOption: onSettingsOption, + mediaType: self.currentItem.MediaType, + }) + .then( + self.boundShowOsdDefaultParams, + self.boundShowOsdDefaultParams, + ); + }); + } + function onSettingsOption(selectedOption) { + "stats" === selectedOption + ? toggleStats(self) + : "subtitleoffset" === selectedOption && toggleSubtitleOffset(); + } + function toggleSubtitleOffset() { + require(["subtitleOffsetOverlay"], function (SubtitleOffsetOverlay) { + var player = self.currentPlayer; + player && + (self.subtitleOffsetOverlay || + (self.subtitleOffsetOverlay = new SubtitleOffsetOverlay({ + player: player, + })), + self.subtitleOffsetOverlay.show()); + }); + } + var lastPointerEvent = 0; + function refreshThumbnailsIfNeeded( + item, + mediaSourceId, + apiClient, + maxThumbnailWidth, + ) { + !item.Id || + "Audio" === item.MediaType || + currentItemThumbnails || + currentItemThumbnailsPromise || + !(function (itemId, mediaSourceId, apiClient, maxThumbnailWidth) { + currentItemThumbnailsPromise || + (currentItemThumbnailsPromise = apiClient + .getThumbnails(itemId, { + MediaSourceId: mediaSourceId, + Width: maxThumbnailWidth, + }) + .then( + function (result) { + return ( + (currentItemThumbnails = result), Promise.resolve(result) + ); + }, + function () { + currentItemThumbnailsPromise = null; + }, + )); + })(item.Id, mediaSourceId, apiClient, maxThumbnailWidth); + } + function getThumbnailBubbleHtml( + apiClient, + itemId, + mediaSourceId, + thumbnailSet, + chapters, + positionTicks, + maxThumbnailWidth, + ) { + var thumbnail, + thumbnails = (thumbnailSet = thumbnailSet || {}).Thumbnails || {}, + bubbleElement = self.nowPlayingPositionSlider.getBubbleElement(); + thumbnails.length + ? (bubbleElement.classList.add("chapterThumbImageContainer"), + thumbnailSet.AspectRatio && thumbnailSet.AspectRatio < 1.4 + ? bubbleElement.classList.add( + "chapterThumbImageContainer-fourthree", + ) + : bubbleElement.classList.remove( + "chapterThumbImageContainer-fourthree", + ), + bubbleElement.classList.remove("chapterThumbImageContainer-noimg")) + : (bubbleElement.classList.remove( + "chapterThumbImageContainer", + "chapterThumbImageContainer-fourthree", + ), + bubbleElement.classList.add("chapterThumbImageContainer-noimg")), + _layoutmanager.default.tv + ? bubbleElement.classList.add("chapterThumbImageContainer-tv") + : bubbleElement.classList.remove("chapterThumbImageContainer-tv"); + for ( + var _i16 = 0, _length16 = thumbnails.length; + _i16 < _length16; + _i16++ + ) { + var currentThumbnail = thumbnails[_i16]; + if (positionTicks >= currentThumbnail.PositionTicks) + thumbnail = currentThumbnail; + else if (thumbnail) break; + } + for ( + var _i17 = 0, _length17 = chapters.length; + _i17 < _length17; + _i17++ + ) { + var currentChapter = chapters[_i17]; + if (positionTicks >= currentChapter.StartPositionTicks) + chapter = currentChapter; + else if (chapter) break; + } + var chapter = chapter || { Name: " " }, + thumbnailSet = thumbnail + ? (function (itemId, thumbnail, maxWidth, apiClient) { + return thumbnail.ImageTag + ? apiClient.getImageUrl(itemId, { + maxWidth: maxWidth, + tag: thumbnail.ImageTag, + type: "Thumbnail", + PositionTicks: thumbnail.PositionTicks, + }) + : null; + })(itemId, thumbnail, maxThumbnailWidth, apiClient) + : null, + bubbleElement = "", + itemId = "chapterThumbTextContainer"; + return ( + thumbnailSet || (itemId += " chapterThumbTextContainer-noimg"), + (self.nowPlayingPositionSlider.getBubbleElement().style.backgroundImage = + thumbnailSet ? "url('" + thumbnailSet + "')" : null), + (bubbleElement = + (bubbleElement = + (bubbleElement = + (bubbleElement = + (bubbleElement = + bubbleElement + + ('
') + + '
') + + (chapter ? _dom.default.htmlEncode(chapter.Name) : " ")) + + "
" + + (thumbnailSet + ? '
' + : '
')) + + _datetime.default.getDisplayRunningTime(positionTicks)) + + "
" + + "
") + ); + } + function onStop() { + _playbackmanager.default.stop(self.currentPlayer); + } + _dom.default.addEventListener( + view, + window.PointerEvent && !_dom.default.supportsPointerTypeInClickEvent() + ? "pointerup" + : "click", + function (e) { + var isEnoughTimeSinceLastTap, + pointerType = e.pointerType; + "touch" === + (lastPointerUpType = pointerType = + pointerType || (supportsTouchEvent ? "touch" : "mouse")) + ? e.target.closest("BUTTON,INPUT,.videoosd-tabcontainers") + ? self.showOsd() + : (!(isEnoughTimeSinceLastTap = + 300 < (pointerType = Date.now()) - lastPointerEvent) && + "click" !== e.type) || + ((lastPointerEvent = pointerType), + self.currentVisibleMenu + ? setTimeout(self.boundHideOsd, 10) + : self.currentVisibleMenu || + (isEnoughTimeSinceLastTap && + setTimeout(self.boundShowOsdDefaultParams, 100))) + : onOsdClick(e, self, null, !0); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + view, + "dblclick", + function (e) { + e.target.closest("BUTTON") || + ("mouse" === lastPointerUpType && + _playbackmanager.default.toggleFullscreen(self.currentPlayer)); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + buttonMute, + "click", + function () { + _playbackmanager.default.toggleMute(self.currentPlayer); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + brightnessSlider, + "change", + function () { + _playbackmanager.default.setBrightness( + parseFloat(this.value), + self.currentPlayer, + ), + self.showOsd(); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + brightnessSlider, + "input", + function () { + _playbackmanager.default.setBrightness( + parseFloat(this.value), + self.currentPlayer, + ), + self.showOsd(); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + nowPlayingVolumeSlider, + "change", + function () { + _playbackmanager.default.setVolume( + parseFloat(this.value), + self.currentPlayer, + ), + self.showOsd(); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + self.nowPlayingPositionSlider, + "change", + function () { + var newPercent, + seekAirTimeTicks, + player = self.currentPlayer; + player && + ((newPercent = parseFloat(this.value)), + enableProgressByTimeOfDay + ? ((seekAirTimeTicks = + (seekAirTimeTicks = + (newPercent / 100) * + (programEndDateMs - programStartDateMs) * + 1e4) + + 1e4 * programStartDateMs - + playbackStartTimeTicks), + _playbackmanager.default.seek(seekAirTimeTicks, player)) + : _playbackmanager.default.seekPercent(newPercent, player)); + }, + { passive: !0 }, + ), + (self.nowPlayingPositionSlider.getBubbleHtml = function (value) { + if ((self.showOsd(), enableProgressByTimeOfDay)) + return programStartDateMs && programEndDateMs + ? ((ms = programEndDateMs - programStartDateMs), + (ms = (ms /= 100) * value + programStartDateMs), + '

' + + getDisplayTimeWithoutAmPm(new Date(parseInt(ms)), !0) + + "

") + : "--:--"; + if (!currentRuntimeTicks) return "--:--"; + var ms = currentRuntimeTicks, + value = ((ms = (ms / 100) * value), self.currentItem); + if (value) { + var apiClient = _connectionmanager.default.getApiClient( + value.ServerId, + ), + thumbnails = + (refreshThumbnailsIfNeeded(value, "", apiClient, 400), + currentItemThumbnails), + chapters = currentDisplayChapters || []; + if (chapters.length) { + apiClient = getThumbnailBubbleHtml( + apiClient, + value.Id, + 0, + thumbnails, + chapters, + ms, + 400, + ); + if (apiClient) return apiClient; + } + } + return ( + '

' + + _datetime.default.getDisplayRunningTime(ms) + + "

" + ); + }), + _dom.default.addEventListener( + self.osdBottomElement, + transitionEndEventName, + function (e) { + var elem = e.currentTarget; + elem === e.target && + elem.classList.contains("videoOsdBottom-hidden") && + (elem.classList.add("hide"), + headerElement.classList.add("hide"), + self.bottomTabs.selectedIndex(-1), + onTabTransitionEnd.call(tabContainersElem, { + target: tabContainersElem, + currentTarget: tabContainersElem, + }), + 2 === self.currentLockState && self.setLockState(1), + view.dispatchEvent( + new CustomEvent("video-osd-hide", { bubbles: !0 }), + )); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + btnPreviousTrack, + "click", + function () { + _playbackmanager.default.previousTrack(self.currentPlayer); + }, + { passive: !0 }, + ); + for (var _i18 = 0, _length18 = stopButtons.length; _i18 < _length18; _i18++) + stopButtons[_i18].addEventListener("click", onStop); + function onNextTrackClick() { + _playbackmanager.default.nextTrack(self.currentPlayer); + } + function onRewindButtonClick() { + rewind(self, !0); + } + _dom.default.addEventListener( + self.btnPause, + "click", + function () { + _playbackmanager.default.playPause(self.currentPlayer); + }, + { passive: !0 }, + ), + _dom.default.addEventListener(btnNextTrack, "click", onNextTrackClick, { + passive: !0, + }); + for ( + var _i19 = 0, _length19 = rewindButtons.length; + _i19 < _length19; + _i19++ + ) + _dom.default.addEventListener( + rewindButtons[_i19], + "click", + onRewindButtonClick, + { passive: !0 }, + ); + function onFastForwardButtonClick() { + fastForward(self, !0); + } + for ( + var _i20 = 0, _length20 = fastForwardButtons.length; + _i20 < _length20; + _i20++ + ) + _dom.default.addEventListener( + fastForwardButtons[_i20], + "click", + onFastForwardButtonClick, + { passive: !0 }, + ); + function onMoreClick() { + showMoreMenu(self.currentItem, this); + } + function onCloseRequestedFromTab() { + self.bottomTabs.selectedIndex(-1); + } + function loadBottomTabController(index, forceRefresh) { + var tabResumeOptions = { + refresh: forceRefresh, + item: self.currentItem, + displayItem: currentDisplayItem, + mediaSource: currentMediaSource, + enableProgressByTimeOfDay: enableProgressByTimeOfDay, + currentPlayer: self.currentPlayer, + }, + bottomTabControllers = self.bottomTabControllers; + if (bottomTabControllers[index]) + return bottomTabControllers[index].onResume(tabResumeOptions); + require([ + [ + "videoosd_infotab", + "videoosd_chapterstab", + "videoosd_peopletab", + "videoosd_onnowtab", + "videoosd_guidetab", + ][index], + ]).then(function (responses) { + responses = new responses[0](tabContainers[index]); + return ( + (bottomTabControllers[index] = responses), + (tabResumeOptions.refresh = !0), + _events.default.on( + responses, + "closerequested", + onCloseRequestedFromTab, + ), + responses.onResume(tabResumeOptions) + ); + }); + } + function onTabTransitionEnd(e) { + var elem = e.currentTarget; + elem === e.target && + elem.classList.contains("videoosd-tabcontainers-hidden") && + (elem.classList.add("hide"), + self.osdBottomElement.classList.remove("videoosd-bottom-with-opentab"), + (e = elem.querySelector(".videoosd-activetab")) && + e.classList.remove("videoosd-activetab"), + focusMainOsdControls(self)); + } + function setContentSection(sectionName, saveToUserSettings) { + currentOsdContentSectionName = sectionName; + for ( + var sections = view.querySelectorAll(".osdContentSection"), + _i21 = 0, + _length21 = sections.length; + _i21 < _length21; + _i21++ + ) { + var section = sections[_i21]; + section.getAttribute("data-contentsection") === sectionName + ? section.classList.remove("hide") + : section.classList.add("hide"); + } + for ( + var buttons = view.querySelectorAll(".osdContentSectionToggleButton"), + _i22 = 0, + _length22 = buttons.length; + _i22 < _length22; + _i22++ + ) { + var button = buttons[_i22], + icon = button.querySelector("i"); + button.getAttribute("data-contentsection") === sectionName + ? (button.classList.add("toggleButton-active"), + icon.classList.add("toggleButtonIcon-active")) + : (button.classList.remove("toggleButton-active"), + icon.classList.remove("toggleButtonIcon-active")); + } + var playQueue = self.playQueue, + playQueue = + ("playqueue" === sectionName + ? playQueue && playQueue.resume({}) + : playQueue && playQueue.pause(), + self.lyricsRenderer), + playQueue = + ("lyrics" === sectionName + ? playQueue && playQueue.resume({}) + : playQueue && playQueue.pause(), + self.osdBottomElement); + _layoutmanager.default.tv + ? (sectionName && "playqueue" !== sectionName && "art" !== sectionName + ? playQueue.classList.add("videoOsdBottom-split") + : playQueue.classList.remove("videoOsdBottom-split"), + sectionName && "lyrics" !== sectionName && "art" !== sectionName + ? playQueue.classList.remove("videoOsdBottom-art") + : playQueue.classList.add("videoOsdBottom-art")) + : sectionName && "art" !== sectionName + ? (playQueue.classList.add("videoOsdBottom-split"), + playQueue.classList.remove("videoOsdBottom-art")) + : (playQueue.classList.remove("videoOsdBottom-split"), + playQueue.classList.add("videoOsdBottom-art")), + !1 !== saveToUserSettings && + _usersettings.default.osdContentSection(sectionName); + } + function onContentSectionToggleButtonClick(e) { + this.classList.contains("toggleButton-active") + ? setContentSection("art") + : setContentSection(this.getAttribute("data-contentsection")); + } + function onSkipIntroClickInternal() { + var info = currentIntroInfo, + player = self.currentPlayer; + info && + player && + (_playbackmanager.default.seek(info.end, player), + showHideSkipIntro(!1), + self.hideOsd()); + } + function onLockClick() { + var lockState = self.currentLockState; + switch (lockState) { + case 0: + case 1: + lockState++; + break; + default: + lockState = 0; + } + self.setLockState(lockState); + } + _dom.default.addEventListener( + btnRepeatMode, + "click", + function () { + var player; + (player = self.currentPlayer) && + _playbackmanager.default.toggleRepeatMode(player); + }, + { passive: !0 }, + ), + _dom.default.addEventListener(btnOsdMoreBottom, "click", onMoreClick, { + passive: !0, + }), + _dom.default.addEventListener(btnOsdMoreTitle, "click", onMoreClick, { + passive: !0, + }), + _dom.default.addEventListener( + btnAudio, + "click", + function () { + var currentIndex, + audioTracks, + player = self.currentPlayer; + player && + ((audioTracks = _playbackmanager.default.audioTracks(player)), + (currentIndex = + _playbackmanager.default.getAudioStreamIndex(player)), + (audioTracks = audioTracks.map(function (stream) { + var opt = { + name: stream.DisplayTitle, + secondaryText: + stream.Title && + !(stream.DisplayTitle || "") + .toLowerCase() + .includes((stream.Title || "").toLowerCase()) + ? stream.Title + : null, + id: stream.Index, + }; + return stream.Index === currentIndex && (opt.selected = !0), opt; + })), + self.showOsd(), + showActionSheet({ + items: audioTracks, + title: _globalize.default.translate("Audio"), + positionTo: this, + positionY: "above", + transformOrigin: "center bottom", + hasItemSelectionState: !0, + autoTvLayout: !1, + }).then(function (id) { + self.showOsd(); + id = parseInt(id); + id !== currentIndex && + _playbackmanager.default.setAudioStreamIndex(id, player); + }, self.boundShowOsdDefaultParams)); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + btnSubtitles, + "click", + function () { + var player = self.currentPlayer, + streams = _playbackmanager.default.subtitleTracks(player), + currentIndex = + _playbackmanager.default.getSubtitleStreamIndex(player), + menuItems = + (null == currentIndex && (currentIndex = -1), + streams.unshift({ + Index: -1, + DisplayTitle: _globalize.default.translate("Off"), + }), + streams.map(function (stream) { + var opt = { + name: stream.DisplayTitle, + secondaryText: + stream.Title && + !(stream.DisplayTitle || "") + .toLowerCase() + .includes((stream.Title || "").toLowerCase()) + ? stream.Title + : null, + id: stream.Index, + }; + return ( + stream.Index === currentIndex && (opt.selected = !0), opt + ); + })), + positionTo = this; + (streams = _connectionmanager.default.getApiClient(self.currentItem)) + .getCurrentUser() + .then(function (user) { + supportsSubtitleDownloading() && + _itemmanager.default.canDownloadSubtitles( + self.currentItem, + user, + ) && + self.showOsd(), + showActionSheet({ + title: _globalize.default.translate("Subtitles"), + items: menuItems, + positionTo: positionTo, + positionY: "above", + transformOrigin: "center bottom", + hasItemSelectionState: !0, + hasItemAsideIcon: !0, + autoTvLayout: !1, + }).then(function (id) { + var item, mediaSource; + self.showOsd(), + "search" === id + ? ((item = self.currentItem), + (mediaSource = currentMediaSource), + require([ + "registrationServices", + "subtitleEditor", + ]).then(function (responses) { + return responses[0] + .validateFeature("sync") + .then(function () { + return responses[1] + .show({ + item: item, + mediaSource: mediaSource, + showCurrentSubtitles: !1, + autoSearch: !0, + closeOnDownload: !0, + }) + .then(function (result) { + self.showOsd(), + _playbackmanager.default.setSubtitleStreamIndex( + result.NewIndex, + self.currentPlayer, + !0, + ); + }, self.boundShowOsdDefaultParams); + }); + })) + : "subtitleoffset" === id + ? toggleSubtitleOffset() + : (id = parseInt(id)) !== currentIndex && + _playbackmanager.default.setSubtitleStreamIndex( + id, + player, + ); + }, self.boundShowOsdDefaultParams); + }); + }, + { passive: !0 }, + ), + (videoOsdBottomContentbuttons.getFocusableElements = + videoOsdBottomButtons.getFocusableElements = + function (parent, activeElement, direction, options) { + if (!_layoutmanager.default.tv) return null; + switch (direction) { + case 0: + case 1: + return Array.prototype.slice + .call(videoOsdBottomButtons.querySelectorAll("button"), 0) + .concat( + Array.prototype.slice.call( + videoOsdBottomContentbuttons.querySelectorAll("button"), + 0, + ), + ); + default: + return null; + } + }), + self.bottomTabs.addEventListener("beforetabchange", function (e) { + var previousPanel, + newPanel = tabContainers[e.detail.selectedTabIndex]; + null != e.detail.previousIndex && + ((previousPanel = tabContainers[e.detail.previousIndex]) && + newPanel && + previousPanel.classList.remove("videoosd-activetab"), + (previousPanel = + self.bottomTabControllers[e.detail.previousIndex])) && + previousPanel.onPause(), + newPanel + ? (loadBottomTabController(e.detail.selectedTabIndex), + newPanel.classList.add("videoosd-activetab"), + tabContainersElem.classList.remove("hide"), + tabContainersElem.offsetWidth, + tabContainersElem.classList.remove( + "videoosd-tabcontainers-hidden", + ), + self.osdBottomElement.classList.add( + "videoosd-bottom-with-opentab", + ), + btnCloseTabContent.classList.remove("hide")) + : (tabContainersElem.classList.add("videoosd-tabcontainers-hidden"), + btnCloseTabContent.classList.add("hide")); + }), + btnCloseTabContent.addEventListener("click", function () { + self.bottomTabs.selectedIndex(-1); + }), + _dom.default.addEventListener( + tabContainersElem, + transitionEndEventName, + onTabTransitionEnd, + { passive: !0 }, + ), + _inputmanager.default.on(self.bottomTabs, function (e) { + switch (e.detail.command) { + case "up": + -1 !== self.bottomTabs.selectedIndex() && + (self.bottomTabs.selectedIndex(-1), + e.preventDefault(), + e.stopPropagation(), + self.showOsd()); + break; + case "down": + var btn; + -1 === self.bottomTabs.selectedIndex() && + ((btn = e.target.closest(".videoosd-tab-button")) + ? self.bottomTabs.selectedIndex( + parseInt(btn.getAttribute("data-index")), + ) + : self.bottomTabs.selectedIndex(-1)); + } + }); + for ( + var lockButtons = view.querySelectorAll(".videoOsd-btnToggleLock"), + _i24 = 0, + _length24 = lockButtons.length; + _i24 < _length24; + _i24++ + ) + _dom.default.addEventListener(lockButtons[_i24], "click", onLockClick, { + passive: !0, + }); + if ( + (_dom.default.addEventListener( + btnHideUpNext, + "click", + function () { + showHideUpNext(!1); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + view.querySelector(".btnPlayNextFromUpNext"), + "click", + onNextTrackClick, + { passive: !0 }, + ), + _dom.default.addEventListener( + btnSkipIntro, + "click", + function () { + if (!skipIntroValidated) + return validateSkipIntroFeature().then(onSkipIntroClickInternal); + onSkipIntroClickInternal(); + }, + { passive: !0 }, + ), + _dom.default.addEventListener( + view.querySelector(".btnPlayQueue"), + "click", + onContentSectionToggleButtonClick, + { passive: !0 }, + ), + _dom.default.addEventListener( + btnLyrics, + "click", + onContentSectionToggleButtonClick, + { passive: !0 }, + ), + _dom.default.allowBackdropFilter()) + ) + for ( + var toggleButtonIcons = view.querySelectorAll(".toggleButtonIcon"), + _i25 = 0, + _length25 = toggleButtonIcons.length; + _i25 < _length25; + _i25++ + ) + toggleButtonIcons[_i25].classList.add( + "toggleButtonIcon-backdropfilter", + ); + _inputmanager.default.on(self.nowPlayingPositionSlider, function (e) { + var stepUpCommand, + stepDownCommand = + "rtl" === document.dir + ? ((stepUpCommand = "left"), "right") + : ((stepUpCommand = "right"), "left"); + switch (e.detail.command) { + case stepDownCommand: + case "rewind": + e.preventDefault(), + (nowPlayingSliderValue = e.detail.repeat + ? Math.min( + Math.max( + nowPlayingSliderValue - parseFloat(this.step), + this.min, + ), + this.max, + ) + : Math.min( + Math.max( + nowPlayingSliderValue - + convertMsToNowPlayingSliderStep( + _usersettings.default.skipBackLength(), + ), + this.min, + ), + this.max, + )), + this.beginEditing(nowPlayingSliderValue), + startEndEditTimeoutForPositionSlider(); + break; + case stepUpCommand: + case "fastforward": + e.preventDefault(), + (nowPlayingSliderValue = e.detail.repeat + ? Math.min( + Math.max( + nowPlayingSliderValue + parseFloat(this.step), + this.min, + ), + this.max, + ) + : Math.min( + Math.max( + nowPlayingSliderValue + + convertMsToNowPlayingSliderStep( + _usersettings.default.skipForwardLength(), + ), + this.min, + ), + this.max, + )), + this.beginEditing(nowPlayingSliderValue), + startEndEditTimeoutForPositionSlider(); + break; + case "pageup": + e.preventDefault(), + _playbackmanager.default.nextChapter(self.currentPlayer); + break; + case "pagedown": + e.preventDefault(), + _playbackmanager.default.previousChapter(self.currentPlayer); + break; + case "back": + cancelPositionSliderEditing(); + break; + case "play": + case "playpause": + self.nowPlayingPositionSlider.dragging && + (e.preventDefault(), + e.stopPropagation(), + self.nowPlayingPositionSlider.endEditing( + !0, + nowPlayingSliderValue, + )); + break; + case "select": + self.nowPlayingPositionSlider.dragging + ? (e.preventDefault(), + e.stopPropagation(), + self.nowPlayingPositionSlider.endEditing( + !0, + nowPlayingSliderValue, + )) + : _playbackmanager.default.playPause(self.currentPlayer); + } + }), + self.nowPlayingPositionSlider.addEventListener("keydown", function (e) { + var key = _keyboard.default.normalizeKeyFromEvent(e); + ("Enter" !== key && " " !== key) || + (this.dragging && + (e.preventDefault(), + e.stopPropagation(), + this.endEditing(!0, nowPlayingSliderValue))); + }), + self.nowPlayingPositionSlider.addEventListener("blur", function (e) { + cancelPositionSliderEditing(); + }); + for ( + var sections = view.querySelectorAll(".osdContentSection"), + _i23 = 0, + _length23 = sections.length; + _i23 < _length23; + _i23++ + ) { + var section = sections[_i23]; + (_layoutmanager.default.tv && + "lyrics" !== section.getAttribute("data-contentsection")) || + section.classList.add("osdContentSection-split"), + _layoutmanager.default.tv && + "lyrics" === section.getAttribute("data-contentsection") && + section.classList.add("osdContentSection-tv-split"); + } + _shortcuts.default.on(this.videoOsdText), + (this.boundHideOsd = this.hideOsd.bind(this)), + (this.boundShowOsdDefaultParams = function () { + this.showOsd(); + }.bind(this)), + (this.boundOnOsdHideTimeout = function () { + _focusmanager.default.hasExclusiveFocusScope() || + 0 <= this.bottomTabs.selectedIndex() + ? startOsdHideTimer(this) + : this.mouseOverButton || this.hideOsd(); + }.bind(this)); + } + Object.assign(VideoOsd.prototype, _baseview.default.prototype), + (VideoOsd.prototype.enableWindowInputCommands = function () { + return !0; + }), + (VideoOsd.prototype.onWindowInputCommand = function (e) { + var mediaType; + switch (e.detail.command) { + case "back": + var upNextContainer = e.target.closest(".upNextContainer"); + return upNextContainer + ? (e.preventDefault(), + void upNextContainer.querySelector(".btnHideUpNext").click()) + : void ( + !_layoutmanager.default.tv || + _focusmanager.default.hasExclusiveFocusScope() || + ((upNextContainer = + null == (upNextContainer = e.detail.originalEvent) + ? void 0 + : upNextContainer.target) && + headerElement.contains(upNextContainer)) || + (isDisplayingLocalVideo(this.currentPlayer) + ? this.currentVisibleMenu && + !this.upNextContainer._visible && + (e.preventDefault(), this.hideOsd()) + : !this.currentVisibleMenu && + (upNextContainer = this.currentPlayer) && + upNextContainer.isLocalPlayer && + (mediaType || + _playbackmanager.default.isPlaying(upNextContainer)) && + (e.preventDefault(), this.showOsd())) + ); + case "left": + return e.target.closest(".skipIntroContainer,.upNextContainer") + ? void 0 + : void ( + "rtl" === document.dir + ? onFastForwardInputCommand + : onRewindInputCommand + )(e, this); + case "rewind": + return void onRewindInputCommand(e, this); + case "right": + return e.target.closest(".skipIntroContainer,.upNextContainer") + ? void 0 + : void ( + "rtl" === document.dir + ? onRewindInputCommand + : onFastForwardInputCommand + )(e, this); + case "fastforward": + return void onFastForwardInputCommand(e, this); + case "pageup": + return void _playbackmanager.default.nextChapter(this.currentPlayer); + case "pagedown": + return void _playbackmanager.default.previousChapter( + this.currentPlayer, + ); + case "playpause": + e.preventDefault(), e.stopPropagation(); + var isPaused = + null == (upNextContainer = this.currentPlayer) + ? void 0 + : upNextContainer.paused(); + return ( + _playbackmanager.default.playPause(this.currentPlayer), + void ( + (this.currentVisibleMenu || + (shouldOsdBeShown(this) && !isPaused)) && + this.showOsd() + ) + ); + case "play": + e.preventDefault(), e.stopPropagation(); + isPaused = + null == (isPaused = this.currentPlayer) + ? void 0 + : isPaused.paused(); + return ( + _playbackmanager.default.unpause(this.currentPlayer), + void ( + (this.currentVisibleMenu || + (shouldOsdBeShown(this) && !isPaused)) && + this.showOsd() + ) + ); + case "select": + return void ( + onOsdClick(e, this, null, shouldOsdBeShown(this)) && + e.preventDefault() + ); + case "up": + case "down": + return void (shouldOsdBeShown(this) && this.showOsd()); + case "menu": + case "pause": + case "nowplaying": + return void (shouldOsdBeShown(this) && this.showOsd()); + case "record": + return ( + shouldOsdBeShown(this) && this.showOsd(), + void (function (instance) { + (instance = instance.btnRecord).classList.contains("hide") || + instance.click(); + })(this) + ); + case "togglestats": + return void toggleStats(this); + case "movies": + case "music": + case "tv": + case "settings": + case "search": + case "favorites": + case "recordedtv": + return void e.preventDefault(); + case "info": + return setBottomTabIndex(this, 0), void e.preventDefault(); + case "livetv": + case "guide": + return ( + this.bottomTabButtons[3].classList.contains("hide") || + setBottomTabIndex(this, 3), + void e.preventDefault() + ); + } + _baseview.default.prototype.onWindowInputCommand.apply(this, arguments); + }), + (VideoOsd.prototype.setLockState = function (lockState) { + ((this.currentLockState = lockState) + ? (headerElement.classList.add("videoOsdHeader-locked"), + this.osdBottomElement.classList.add("videoosd-bottom-locked"), + this.view + .querySelector(".videoOsdUnlockControls") + .classList.remove("hide"), + 1 === lockState + ? (this.view + .querySelector(".videoOsd-btnUnlock1") + .classList.remove("hide"), + this.view + .querySelector(".videoOsd-btnUnlock2") + .classList.add("hide")) + : (this.view + .querySelector(".videoOsd-btnUnlock1") + .classList.add("hide"), + this.view + .querySelector(".videoOsd-btnUnlock2") + .classList.remove("hide")), + lockOrientation) + : (headerElement.classList.remove("videoOsdHeader-locked"), + this.osdBottomElement.classList.remove("videoosd-bottom-locked"), + this.view + .querySelector(".videoOsdUnlockControls") + .classList.add("hide"), + this.view.querySelector(".videoOsd-btnUnlock1").classList.add("hide"), + this.view.querySelector(".videoOsd-btnUnlock2").classList.add("hide"), + unlockOrientation))(); + }), + (VideoOsd.prototype.showOsd = function (timeoutMs, elementToFocus) { + this.paused || + (headerElement.classList.remove("hide"), + headerElement.offsetWidth, + headerElement.classList.remove("videoOsdHeader-hidden"), + (function (instance, elementToFocus) { + var elem; + instance.currentVisibleMenu || + ((elem = instance.osdBottomElement), + (instance.currentVisibleMenu = "osd"), + elem.classList.remove("hide"), + elem.offsetWidth, + elem.classList.remove("videoOsdBottom-hidden"), + _focusmanager.default.hasExclusiveFocusScope() || + (elementToFocus + ? _focusmanager.default.focus(elementToFocus) + : focusMainOsdControls(instance)), + console.log( + "showMainOsdControls activeElement: " + + document.activeElement.className, + ), + instance.view.dispatchEvent( + new CustomEvent("video-osd-show", { bubbles: !0 }), + )); + })(this, elementToFocus), + startOsdHideTimer(this, timeoutMs)); + }), + (VideoOsd.prototype.hideOsd = function () { + var instance, elem; + isDisplayingLocalVideo(this.currentPlayer) && + (headerElement.classList.add("videoOsdHeader-hidden"), + (instance = this).currentVisibleMenu && + ((elem = instance.osdBottomElement).offsetWidth, + elem.classList.add("videoOsdBottom-hidden"), + (instance.currentVisibleMenu = null)), + (elem = this.lyricsRenderer)) && + !elem.paused && + _layoutmanager.default.tv && + elem.focus(); + }), + (VideoOsd.prototype.exit = function () { + _approuter.default.back(); + }), + (VideoOsd.prototype.onResume = function (options) { + _baseview.default.prototype.onResume.apply(this, arguments), + _layoutmanager.default.tv + ? headerElement.classList.add("videoOsdHeader") + : headerElement.classList.add( + "videoOsdHeader", + "videoOsd-customFont-x2", + ); + var boundOnPlayerChange = + (boundOnPlayerChange = this.boundOnPlayerChange) || + (this.boundOnPlayerChange = function (e, player) { + this.bindToPlayer(player), this.bottomTabs.selectedIndex(-1); + }.bind(this)), + boundOnPlayerChange = + (_events.default.on( + _playbackmanager.default, + "playerchange", + boundOnPlayerChange, + ), + this.bindToPlayer(_playbackmanager.default.getCurrentPlayer(), !0), + this.currentPlayer), + boundOnPlayerChange = + (boundOnPlayerChange && + !options.refresh && + this.updateTransparency( + boundOnPlayerChange, + this.lastPlayerState || {}, + null == (boundOnPlayerChange = this.currentItem) + ? void 0 + : boundOnPlayerChange.MediaType, + ), + this.view), + boundPointerMove = + (boundPointerMove = this.boundPointerMove) || + (this.boundPointerMove = function (e) { + var obj, + pointerType = e.pointerType; + "touch" === pointerType || + (!pointerType && supportsTouchEvent) || + ((pointerType = e.screenX || 0), + (e = e.screenY || 0), + (obj = this.lastPointerMoveData) + ? (Math.abs(pointerType - obj.x) < 10 && + Math.abs(e - obj.y) < 10) || + ((obj.x = pointerType), (obj.y = e), this.showOsd()) + : ((this.lastPointerMoveData = { x: pointerType, y: e }), + this.showOsd())); + }.bind(this)); + _dom.default.addEventListener( + document, + window.PointerEvent ? "pointermove" : "mousemove", + boundPointerMove, + { passive: !0 }, + ); + boundPointerMove = + (boundPointerMove = this.boundPointerEnter) || + (this.boundPointerEnter = function (e) { + var pointerType = e.pointerType; + "touch" === pointerType || + (!pointerType && supportsTouchEvent) || + (this.mouseOverButton = null != e.target.closest("button,a")); + }.bind(this)); + _dom.default.addEventListener( + boundOnPlayerChange, + window.PointerEvent ? "pointerenter" : "mouseenter", + boundPointerMove, + { passive: !0, capture: !0 }, + ); + boundPointerMove = + (boundPointerMove = this.boundPointerLeave) || + (this.boundPointerLeave = function (e) { + this.mouseOverButton = null; + }.bind(this)); + _dom.default.addEventListener( + boundOnPlayerChange, + window.PointerEvent ? "pointerleave" : "mouseleave", + boundPointerMove, + { passive: !0, capture: !0 }, + ), + (function (view) { + var activeElement = document.activeElement; + if (activeElement && !view.contains(activeElement)) + try { + activeElement.blur(); + } catch (err) { + console.log("Error blurring element from previous view: " + err); + } + })(boundOnPlayerChange); + boundPointerMove = + (boundPointerMove = this.boundWindowKeyDown) || + (this.boundWindowKeyDown = function (e) { + switch (_keyboard.default.normalizeKeyFromEvent(e)) { + case "Enter": + case " ": + return _focusmanager.default.hasExclusiveFocusScope() + ? void 0 + : void (this.currentVisibleMenu && + !e.target.closest(".videoOsdPositionSlider") + ? this.showOsd() + : e.target.closest("BUTTON") || + this.nowPlayingPositionSlider.dragging || + (_playbackmanager.default.playPause(this.currentPlayer), + shouldOsdBeShown(this) && + setTimeout(this.boundShowOsdDefaultParams, 100), + _browser.default.edge && + (e.preventDefault(), e.stopPropagation()))); + case "b": + case "B": + if (!_focusmanager.default.hasExclusiveFocusScope() && e.ctrlKey) + return e.shiftKey + ? (e.preventDefault(), void rewind(this)) + : (e.preventDefault(), + void _playbackmanager.default.previousChapter( + this.currentPlayer, + )); + break; + case "f": + case "F": + if (!_focusmanager.default.hasExclusiveFocusScope()) { + if (e.ctrlKey) + return e.shiftKey + ? (e.preventDefault(), void fastForward(this)) + : (e.preventDefault(), + void _playbackmanager.default.nextChapter( + this.currentPlayer, + )); + _playbackmanager.default.toggleFullscreen(this.currentPlayer); + } + break; + case "m": + case "M": + _focusmanager.default.hasExclusiveFocusScope() || + _playbackmanager.default.toggleMute(this.currentPlayer); + } + }.bind(this)); + _dom.default.addEventListener(window, "keydown", boundPointerMove, {}), + _mouse.default.requestMouseListening("videoosd"); + }), + (VideoOsd.prototype.onPause = function () { + _baseview.default.prototype.onPause.apply(this, arguments); + var statsOverlay = this.statsOverlay; + statsOverlay && statsOverlay.enabled(!1); + this.subtitleOffsetOverlay && destroySubtitleOffsetOverlay(this); + var statsOverlay = this.boundWindowKeyDown, + statsOverlay = + (statsOverlay && + _dom.default.removeEventListener( + window, + "keydown", + statsOverlay, + {}, + ), + headerElement.classList.remove( + "videoOsdHeader", + "videoosd-header-safe", + "videoOsdHeader-hidden", + "videoOsdHeader-locked", + "hide", + "videoOsd-customFont-x2", + "videoOsd-customFont-remotecontrol", + ), + backdropContainer.classList.remove( + "nowplaying-backdropcontainer-blur", + "nowplaying-backdropcontainer-blur-high", + "nowplaying-backdropcontainer-blur-extrasaturation", + "nowplaying-backdropcontainer-blur-backdropfilter", + ), + backgroundContainer.classList.remove( + "nowplaying-backgroundcontainer-blur", + "nowplaying-backgroundcontainer-brighter", + "nowplaying-backgroundcontainer-blur-backdropfilter", + ), + clearBlurFromDocumentElement(), + this.boundPointerMove), + statsOverlay = + (statsOverlay && + _dom.default.removeEventListener( + document, + window.PointerEvent ? "pointermove" : "mousemove", + statsOverlay, + { passive: !0 }, + ), + this.boundOnPlayerChange); + statsOverlay && + _events.default.off( + _playbackmanager.default, + "playerchange", + statsOverlay, + ), + this.enableStopOnBack && + ((this.enableStopOnBack = !1), + (this.enableBackOnStop = !1), + null != (statsOverlay = this.currentPlayer) && + statsOverlay.isLocalPlayer && + _usersettings.default.enableVideoUnderUI() + ? _approuter.default.setTransparency("backdrop") + : _playbackmanager.default.stop(statsOverlay)), + this.releaseCurrentPlayer(), + _mouse.default.releaseMouseListening("videoosd"), + stopOsdHideTimer(this), + _backdrop.default.clear(), + this.setLockState(0), + unlockOrientation(), + setSystemUIHidden(!1); + }), + (VideoOsd.prototype.destroy = function () { + _baseview.default.prototype.destroy.apply(this, arguments); + var videoOsdText = this.videoOsdText, + videoOsdText = + (videoOsdText && + (_shortcuts.default.off(videoOsdText), (this.videoOsdText = null)), + destroyPlayQueue(this), + destroyLyricsRenderer(this), + this.recordingButtonManager), + bottomTabControllers = + (videoOsdText && + (videoOsdText.destroy(), (this.recordingButtonManager = null)), + destroyStats(this), + destroySubtitleOffsetOverlay(this), + this.bottomTabControllers); + if (bottomTabControllers) { + for (var i = 0, length = bottomTabControllers.length; i < length; i++) + bottomTabControllers[i] && bottomTabControllers[i].destroy(); + this.bottomTabControllers = null; + } + (this.boundPointerMove = null), + (this.boundWindowKeyDown = null), + (this.boundInputCommand = null), + (this.boundHideOsd = null), + (this.boundShowOsdDefaultParams = null), + (this.boundOnOsdHideTimeout = null), + (this.boundOnPlayerChange = null), + (this.upNextContainer = null), + (this.lastPlayerState = null); + }), + (_exports.default = VideoOsd); +});