axotube 1.30.6 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/early.js +1 -1
- package/dist/service-core.js +239 -0
- package/dist/service-core.json +6 -0
- package/dist/userScript.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,9 +13,13 @@ update with every change.
|
|
|
13
13
|
|---|---|---|
|
|
14
14
|
| `dist/early.js` | the WGT and the APK | first, right after `<head>`, before YouTube reads its config |
|
|
15
15
|
| `dist/userScript.js` | the WGT and the APK | last, after the page is up |
|
|
16
|
+
| `dist/service-core.js` | the WGT (Samsung TV) | downloaded, checked against `service-core.json`, and started on the next service start |
|
|
17
|
+
| `dist/service-core.json` | the WGT (Samsung TV) | the version, size and sha256 that `service-core.js` must match |
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
so `axotube@latest` on jsDelivr always matches the release being
|
|
19
|
+
The bundles and the service core are built from the AxoTube source at the version
|
|
20
|
+
in `package.json`, so `axotube@latest` on jsDelivr always matches the release being
|
|
21
|
+
shipped. A downloaded service core is only kept after it starts and answers; a copy
|
|
22
|
+
that fails is rolled back to the one shipped in the WGT.
|
|
19
23
|
|
|
20
24
|
## Getting AxoTube
|
|
21
25
|
|
package/dist/early.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t;t||(t=1,function(){if("undefined"==typeof globalThis)try{Object.defineProperty(Object.prototype,"__globalThis__",{get:function(){return this},configurable:!0}),__globalThis__.globalThis=__globalThis__,delete Object.prototype.__globalThis__}catch(e){"undefined"!=typeof window?window.globalThis=window:"undefined"!=typeof self&&(self.globalThis=self)}}(),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.HTMLCollection&&!HTMLCollection.prototype.forEach&&(HTMLCollection.prototype.forEach=Array.prototype.forEach),function(){var e=window.EventTarget;if(void 0!==e)try{return void new e}catch(e){}window.EventTarget=function(){var e={};return{addEventListener:function(t,n){"function"==typeof n&&(e[t]||(e[t]=[]),-1===e[t].indexOf(n)&&e[t].push(n))},removeEventListener:function(t,n){var o=e[t];if(o){var r=o.indexOf(n);-1!==r&&o.splice(r,1)}},dispatchEvent:function(t){var n=e[t&&t.type];if(n)for(var o=n.slice(),r=0;r<o.length;r++)try{o[r].call(this,t)}catch(e){console.error(e)}return!(t&&t.defaultPrevented)}}},e&&(window.EventTarget.prototype=e.prototype)}(),function(){function e(){this.aborted=!1,this._cbs=[]}function t(){this.signal=new e}"undefined"==typeof AbortController&&(e.prototype.addEventListener=function(e,t){"abort"===e&&"function"==typeof t&&this._cbs.push(t)},e.prototype.removeEventListener=function(e,t){if("abort"===e){var n=this._cbs.indexOf(t);-1!==n&&this._cbs.splice(n,1)}},e.prototype.dispatchEvent=function(e){if(e&&"abort"===e.type)for(var t=this._cbs.slice(),n=0;n<t.length;n++)t[n](e)},t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",bubbles:!1,cancelable:!1}))},window.AbortSignal=e,window.AbortController=t)}(),function(){function e(e,t){var n,o=!!(t=t||{}).bubbles,r=!!t.cancelable,i=void 0!==t.detail?t.detail:null;try{(n=document.createEvent("CustomEvent")).initCustomEvent(e,o,r,i)}catch(t){(n=document.createEvent("Event")).initEvent(e,o,r),n.detail=i}return n}"function"!=typeof CustomEvent&&(window.Event&&window.Event.prototype&&(e.prototype=window.Event.prototype),window.CustomEvent=e)}(),"undefined"!=typeof Promise&&"function"!=typeof Promise.prototype.finally&&(Promise.prototype.finally=function(e){var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),"undefined"!=typeof Promise&&"function"!=typeof Promise.allSettled&&(Promise.allSettled=function(e){return Promise.all(Array.prototype.map.call(e,function(e){return Promise.resolve(e).then(function(e){return{status:"fulfilled",value:e}},function(e){return{status:"rejected",reason:e}})}))}),function(){function e(t,n,o){for(var r=0;r<t.length;r++)n>0&&Array.isArray(t[r])?e(t[r],n-1,o):o.push(t[r]);return o}"function"!=typeof Array.prototype.flat&&(Array.prototype.flat=function(t){return e(this,(t=void 0===t?1:Math.floor(t))<0?0:t,[])})}(),"function"!=typeof Array.prototype.flatMap&&(Array.prototype.flatMap=function(e,t){return Array.prototype.map.call(this,e,t).flat(1)}),"function"!=typeof String.prototype.replaceAll&&(String.prototype.replaceAll=function(e,t){return"string"!=typeof e?this.replace(e,t):this.split(e).join("function"==typeof t?t(e,0,String(this)):String(t))}),"function"==typeof Object.values&&"function"==typeof Object.entries||(Object.values=Object.values||function(e){for(var t=Object.keys(e),n=[],o=0;o<t.length;o++)n.push(e[t[o]]);return n},Object.entries=Object.entries||function(e){for(var t=Object.keys(e),n=[],o=0;o<t.length;o++)n.push([t[o],e[t[o]]]);return n}),"function"!=typeof Object.fromEntries&&(Object.fromEntries=function(e){var t=Object.create(null);if("function"==typeof e.forEach)e.forEach(function(e){t[e[0]]=e[1]});else for(var n=Array.isArray(e)?e:Array.prototype.slice.call(e),o=0;o<n.length;o++)t[n[o][0]]=n[o][1];return t}),"function"!=typeof queueMicrotask&&(window.queueMicrotask=function(e){Promise.resolve().then(e).catch(function(e){setTimeout(function(){throw e},0)})}),window.Element&&"function"!=typeof Element.prototype.closest&&(Element.prototype.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches?t.matches(e):t.msMatchesSelector?t.msMatchesSelector(e):t.webkitMatchesSelector&&t.webkitMatchesSelector(e))return t;t=t.parentElement||t.parentNode}return null}),function(){if(window.Element){var e=Element.prototype;"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1})}}(),function(){if("undefined"!=typeof Intl&&"function"!=typeof Intl.Locale){var e={US:"en",GB:"en",AU:"en",CA:"en",IN:"hi",IE:"en",NZ:"en",FR:"fr",DE:"de",ES:"es",IT:"it",PT:"pt",BR:"pt",MX:"es",AR:"es",CO:"es",CL:"es",RU:"ru",UA:"uk",PL:"pl",NL:"nl",BE:"nl",SE:"sv",NO:"no",DK:"da",FI:"fi",TR:"tr",GR:"el",CZ:"cs",SK:"sk",HU:"hu",RO:"ro",BG:"bg",HR:"hr",RS:"sr",JP:"ja",KR:"ko",VN:"vi",TH:"th",ID:"id",MY:"ms",PH:"tl",SA:"ar",AE:"ar",EG:"ar",IL:"he",IR:"fa",PK:"ur",BD:"bn",LK:"si"};t.prototype.maximize=function(){return this},Intl.Locale=t}function t(t,n){n=n||{},this.language=e[n.region]||"en"}}());var n;function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n||(n=1,function(){var e=!1;try{var t=0,n=[];e="xbx"!=="aba".replaceAll("a",function(e,o){return t+=1,n.push(o),"x"})||2!==t||0!==n[0]||2!==n[1]}catch(t){e=!0}e&&(String.prototype.replaceAll=function(e,t){var n=String(this);if(e instanceof RegExp){if(!e.global)throw new TypeError("replaceAll requires a global RegExp");return n.replace(e,t)}var o=new RegExp(String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");return n.replace(o,t)})}(),function(){var e=!1;try{var t=Object.fromEntries([["a",1]]);e=Object.getPrototypeOf(t)!==Object.prototype}catch(t){e=!0}e&&(Object.fromEntries=function(e){var t={};function n(e){if(e)try{Object.defineProperty(t,e[0],{value:e[1],enumerable:!0,configurable:!0,writable:!0})}catch(n){t[e[0]]=e[1]}}if(e&&"function"==typeof e.forEach)e.forEach(n);else for(var o=Array.isArray(e)?e:Array.prototype.slice.call(e||[]),r=0;r<o.length;r++)n(o[r]);return t})}());var r,i,a={defaults:{enableAdBlock:!0,enableSponsorBlock:!0,enableSponsorBlockToasts:!0,sponsorBlockManualSkips:["intro","outro","filler"],enableSponsorBlockSponsor:!0,enableSponsorBlockIntro:!0,enableSponsorBlockOutro:!0,enableSponsorBlockInteraction:!0,enableSponsorBlockSelfPromo:!0,enableSponsorBlockPreview:!0,enableSponsorBlockMusicOfftopic:!0,enableSponsorBlockFiller:!1,enableSponsorBlockHighlight:!0,videoSpeed:1,preferredVideoQuality:"auto",enableDeArrowTitles:!0,enableDeArrowThumbnails:!0,routeColor:"#0f0f0f",routeBackgroundUrl:"",themePreset:"default",textTheme:"default",userAgentProfile:"auto",enableFixedUI:!1,enableHqThumbnails:!0,enableLongPress:!0,enableShorts:!0,dontCheckUpdateUntil:0,enableWhoIsWatchingMenu:!1,permanentlyEnableWhoIsWatchingMenu:!1,enableWhosWatchingMenuOnAppExit:!1,enableShowUserLanguage:!0,enableShowOtherLanguages:!1,showWelcomeToast:!0,enablePreviousNextButtons:!0,enableSuperThanksButton:!1,enableSpeedControlsButton:!0,enablePatchingVideoPlayer:!0,enableMPButton:!0,enableSwapMPWithPIP:!1,enablePreviews:!0,previewLengthSeconds:40,enableRemainingTime:!1,enablePauseOnBlur:!1,enableLowMemoryMode:!1,enableHideWatchedVideos:!1,hideWatchedVideosThreshold:80,hideWatchedVideosPages:[],enableHideEndScreenCards:!1,enableYouThereRenderer:!0,enableScreenDimming:!1,dimmingTimeout:60,dimmingOpacity:.5,enablePaidPromotionOverlay:!0,speedSettingsIncrement:.25,videoPreferredCodec:"any",enableAutoSubtitles:!0,autoSubtitleLanguage:"en",autoSubtitleAllowAuto:!0,launchToOnStartup:null,reloadHomeOnStartup:!0,disabledSidebarContents:[],disableChannelsOnSidebar:!1,enableUpdater:!0,autoFrameRate:!1,autoFrameRatePauseVideoFor:0,enableSigninReminder:!1,sortSubscriptionsByAlphabet:!1,enableReducedMotion:!1,enablePerformanceMode:!1,enablePanelShrink:!0,enableDeArrowPeek:!0,panelShrinkPercent:"60",clockMode:"off",clockFormat:"24h",clockPosition:"topRight",clockShowSeconds:!1,enableOnePressMode:!1,enableExperimentalResolution:!1,experimentalMaxResolution:"1440p"},ranges:{videoSpeed:[.05,5],hideWatchedVideosThreshold:[0,100],dimmingTimeout:[1,3600],dimmingOpacity:[0,1],speedSettingsIncrement:[.01,1],autoFrameRatePauseVideoFor:[0,1e4],previewLengthSeconds:[5,120],dontCheckUpdateUntil:[0,9007199254740991]},enums:{preferredVideoQuality:["auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"],videoPreferredCodec:["any","vp9","av01","avc1"],themePreset:["default","black","darkGray","charcoal","navy","darkRed","darkGreen","darkPurple"],textTheme:["default","white","gray","red","blue","green","purple","yellow"],userAgentProfile:["auto","samsung","android"],experimentalMaxResolution:["1440p","2160p"],autoSubtitleLanguage:["en","hi","es","fr","de","pt","ja","ko","ru"],panelShrinkPercent:["50","60","70"],clockMode:["off","always","notPlaying"],clockFormat:["24h","12h","12hNoAmPm"],clockPosition:["topLeft","topRight","bottomLeft","bottomRight"]},themePresetColors:{default:"#0f0f0f",black:"#000000",darkGray:"#1c1a1a",charcoal:"#121212",navy:"#0d1b2a",darkRed:"#3b0505",darkGreen:"#052e1b",darkPurple:"#1a1025"}};var l=function(){if(i)return r;i=1;var e=a;return r={validateConfigValue:function(t,n){var r=e.defaults;if(!Object.prototype.hasOwnProperty.call(r,t))return!1;var i=r[t];if(null===i)return null===n||"string"==typeof n;if(Array.isArray(i))return Array.isArray(n)&&n.every(function(e){return"string"==typeof e});if("number"==typeof i){if("number"!=typeof n||!Number.isFinite(n))return!1;var a=e.ranges[t];return!a||n>=a[0]&&n<=a[1]}if(o(n)!==o(i))return!1;var l=e.enums[t];if(l&&!l.includes(n))return!1;if("routeColor"===t&&!/^#[0-9a-f]{6}$/i.test(n))return!1;if("routeBackgroundUrl"===t&&n)try{var c=new URL(n);if("http:"!==c.protocol&&"https:"!==c.protocol)return!1}catch(e){return!1}return!0}},r}(),c=e(l),u="ytaf-configuration",s=JSON.parse,f=JSON.stringify,p=function(e){return s(f(e))},d=p(a.defaults);d.enableFixedUI="undefined"==typeof window||!window.h5vcc||!window.h5vcc.tizentube||a.defaults.enableFixedUI;var h,b=c.validateConfigValue;function y(e){if(Object.prototype.hasOwnProperty.call(d,e))return void 0===h[e]&&(h[e]=p(d[e])),h[e];console.warn("[AxoTube:config] Unknown config key",e)}!function(){h=p(d);try{if(!window.localStorage||!window.localStorage[u])return;var e=s(window.localStorage[u]);if(!e||"object"!==o(e)||Array.isArray(e))return;Object.keys(e).forEach(function(t){b(t,e[t])&&(h[t]=p(e[t]))})}catch(e){console.warn("[AxoTube:config] Config read failed; using defaults:",e)}}();var v=new EventTarget,m={"1440p":"2560x1440","2160p":"3840x2160"},g={width:function(e){return Number(e)>0&&Number(e)<=7680},height:function(e){return Number(e)>0&&Number(e)<=4320},framerate:function(e){return Number(e)>0&&Number(e)<=60},bitrate:function(e){return Number(e)>0&&Number(e)<=2e8},eotf:function(e){return"bt709"===e||("smpte2084"===e||"arib-std-b67"===e)&&w()},channels:function(e){return Number(e)>0&&Number(e)<=8},cryptoblockformat:function(e){return"subsample"===e},"decode-to-texture":function(e){return"true"===e||"false"===e}};function w(){return!(!window.matchMedia||!window.matchMedia("(dynamic-range: high)").matches)}function S(e){var t=e.split("."),n="vp09"===t[0]?t[6]:"av01"===t[0]?t[7]:void 0;return"16"===n||"18"===n}var E="__axotubeResolutionOwner";if(!window[E]){if(window[E]=!0,y("enableExperimentalResolution"))try{window.h5vcc=window.h5vcc||{},window.h5vcc.system=window.h5vcc.system||{},window.h5vcc.system.getVideoContainerSizeOverride=function(){var e=y("experimentalMaxResolution");return m[e]||m["1440p"]},function(){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(t){for(var n=String(t).split(";"),o=[n[0].trim()],r=1;r<n.length;r++){var i=n[r].trim(),a=i.indexOf("="),l=(-1===a?i:i.slice(0,a)).trim().toLowerCase(),c=(-1===a?"":i.slice(a+1)).trim().replace(/^"|"$/g,"");if("codecs"===l){for(var u=c.split(","),s=0;s<u.length;s++)if(S(u[s].trim())&&!w())return!1;o.push(i)}else if(g[l]){if(!g[l](c))return!1}else o.push(i)}return e(o.join("; "))}}}()}catch(e){console.warn("[AxoTube:experimentalResolution] Could not install overrides:",e)}v.addEventListener("configChange",function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.key)||"";("enableExperimentalResolution"===n||"experimentalMaxResolution"===n&&y("enableExperimentalResolution"))&&setTimeout(function(){return location.reload()},300)})}var P={avc1:["avc1"],vp9:["vp09","vp9"],av01:["av01"]};var k="__axotubeCodecOwner";if(!window[k]){window[k]=!0;try{!function(e){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var t=function(e){if(!P[e])return[];var t=[];return Object.keys(P).forEach(function(n){n!==e&&(t=t.concat(P[n]))}),t}(e);if(0!==t.length){var n=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){var o=String(e).toLowerCase();if(-1!==o.indexOf("codecs"))for(var r=0;r<t.length;r++)if(-1!==o.indexOf(t[r]))return!1;return n(e)}}}}(y("videoPreferredCodec"))}catch(e){console.warn("[AxoTube:codecPreference] Could not install codec preference:",e)}v.addEventListener("configChange",function(e){var t;"videoPreferredCodec"===((null===(t=e.detail)||void 0===t?void 0:t.key)||"")&&setTimeout(function(){return location.reload()},300)})}}();
|
|
1
|
+
!function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t;t||(t=1,function(){if("undefined"==typeof globalThis)try{Object.defineProperty(Object.prototype,"__globalThis__",{get:function(){return this},configurable:!0}),__globalThis__.globalThis=__globalThis__,delete Object.prototype.__globalThis__}catch(e){"undefined"!=typeof window?window.globalThis=window:"undefined"!=typeof self&&(self.globalThis=self)}}(),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.HTMLCollection&&!HTMLCollection.prototype.forEach&&(HTMLCollection.prototype.forEach=Array.prototype.forEach),function(){var e=window.EventTarget;if(void 0!==e)try{return void new e}catch(e){}window.EventTarget=function(){var e={};return{addEventListener:function(t,n){"function"==typeof n&&(e[t]||(e[t]=[]),-1===e[t].indexOf(n)&&e[t].push(n))},removeEventListener:function(t,n){var o=e[t];if(o){var r=o.indexOf(n);-1!==r&&o.splice(r,1)}},dispatchEvent:function(t){var n=e[t&&t.type];if(n)for(var o=n.slice(),r=0;r<o.length;r++)try{o[r].call(this,t)}catch(e){console.error(e)}return!(t&&t.defaultPrevented)}}},e&&(window.EventTarget.prototype=e.prototype)}(),function(){function e(){this.aborted=!1,this._cbs=[]}function t(){this.signal=new e}"undefined"==typeof AbortController&&(e.prototype.addEventListener=function(e,t){"abort"===e&&"function"==typeof t&&this._cbs.push(t)},e.prototype.removeEventListener=function(e,t){if("abort"===e){var n=this._cbs.indexOf(t);-1!==n&&this._cbs.splice(n,1)}},e.prototype.dispatchEvent=function(e){if(e&&"abort"===e.type)for(var t=this._cbs.slice(),n=0;n<t.length;n++)t[n](e)},t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",bubbles:!1,cancelable:!1}))},window.AbortSignal=e,window.AbortController=t)}(),function(){function e(e,t){var n,o=!!(t=t||{}).bubbles,r=!!t.cancelable,i=void 0!==t.detail?t.detail:null;try{(n=document.createEvent("CustomEvent")).initCustomEvent(e,o,r,i)}catch(t){(n=document.createEvent("Event")).initEvent(e,o,r),n.detail=i}return n}"function"!=typeof CustomEvent&&(window.Event&&window.Event.prototype&&(e.prototype=window.Event.prototype),window.CustomEvent=e)}(),"undefined"!=typeof Promise&&"function"!=typeof Promise.prototype.finally&&(Promise.prototype.finally=function(e){var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),"undefined"!=typeof Promise&&"function"!=typeof Promise.allSettled&&(Promise.allSettled=function(e){return Promise.all(Array.prototype.map.call(e,function(e){return Promise.resolve(e).then(function(e){return{status:"fulfilled",value:e}},function(e){return{status:"rejected",reason:e}})}))}),function(){function e(t,n,o){for(var r=0;r<t.length;r++)n>0&&Array.isArray(t[r])?e(t[r],n-1,o):o.push(t[r]);return o}"function"!=typeof Array.prototype.flat&&(Array.prototype.flat=function(t){return e(this,(t=void 0===t?1:Math.floor(t))<0?0:t,[])})}(),"function"!=typeof Array.prototype.flatMap&&(Array.prototype.flatMap=function(e,t){return Array.prototype.map.call(this,e,t).flat(1)}),"function"!=typeof String.prototype.replaceAll&&(String.prototype.replaceAll=function(e,t){return"string"!=typeof e?this.replace(e,t):this.split(e).join("function"==typeof t?t(e,0,String(this)):String(t))}),"function"==typeof Object.values&&"function"==typeof Object.entries||(Object.values=Object.values||function(e){for(var t=Object.keys(e),n=[],o=0;o<t.length;o++)n.push(e[t[o]]);return n},Object.entries=Object.entries||function(e){for(var t=Object.keys(e),n=[],o=0;o<t.length;o++)n.push([t[o],e[t[o]]]);return n}),"function"!=typeof Object.fromEntries&&(Object.fromEntries=function(e){var t=Object.create(null);if("function"==typeof e.forEach)e.forEach(function(e){t[e[0]]=e[1]});else for(var n=Array.isArray(e)?e:Array.prototype.slice.call(e),o=0;o<n.length;o++)t[n[o][0]]=n[o][1];return t}),"function"!=typeof queueMicrotask&&(window.queueMicrotask=function(e){Promise.resolve().then(e).catch(function(e){setTimeout(function(){throw e},0)})}),window.Element&&"function"!=typeof Element.prototype.closest&&(Element.prototype.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches?t.matches(e):t.msMatchesSelector?t.msMatchesSelector(e):t.webkitMatchesSelector&&t.webkitMatchesSelector(e))return t;t=t.parentElement||t.parentNode}return null}),function(){if(window.Element){var e=Element.prototype;"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1})}}(),function(){if("undefined"!=typeof Intl&&"function"!=typeof Intl.Locale){var e={US:"en",GB:"en",AU:"en",CA:"en",IN:"hi",IE:"en",NZ:"en",FR:"fr",DE:"de",ES:"es",IT:"it",PT:"pt",BR:"pt",MX:"es",AR:"es",CO:"es",CL:"es",RU:"ru",UA:"uk",PL:"pl",NL:"nl",BE:"nl",SE:"sv",NO:"no",DK:"da",FI:"fi",TR:"tr",GR:"el",CZ:"cs",SK:"sk",HU:"hu",RO:"ro",BG:"bg",HR:"hr",RS:"sr",JP:"ja",KR:"ko",VN:"vi",TH:"th",ID:"id",MY:"ms",PH:"tl",SA:"ar",AE:"ar",EG:"ar",IL:"he",IR:"fa",PK:"ur",BD:"bn",LK:"si"};t.prototype.maximize=function(){return this},Intl.Locale=t}function t(t,n){n=n||{},this.language=e[n.region]||"en"}}());var n;function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n||(n=1,function(){var e=!1;try{var t=0,n=[];e="xbx"!=="aba".replaceAll("a",function(e,o){return t+=1,n.push(o),"x"})||2!==t||0!==n[0]||2!==n[1]}catch(t){e=!0}e&&(String.prototype.replaceAll=function(e,t){var n=String(this);if(e instanceof RegExp){if(!e.global)throw new TypeError("replaceAll requires a global RegExp");return n.replace(e,t)}var o=new RegExp(String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");return n.replace(o,t)})}(),function(){var e=!1;try{var t=Object.fromEntries([["a",1]]);e=Object.getPrototypeOf(t)!==Object.prototype}catch(t){e=!0}e&&(Object.fromEntries=function(e){var t={};function n(e){if(e)try{Object.defineProperty(t,e[0],{value:e[1],enumerable:!0,configurable:!0,writable:!0})}catch(n){t[e[0]]=e[1]}}if(e&&"function"==typeof e.forEach)e.forEach(n);else for(var o=Array.isArray(e)?e:Array.prototype.slice.call(e||[]),r=0;r<o.length;r++)n(o[r]);return t})}());var r,i,a={defaults:{enableAdBlock:!0,enableSponsorBlock:!0,enableSponsorBlockToasts:!0,sponsorBlockManualSkips:["intro","outro","filler"],enableSponsorBlockSponsor:!0,enableSponsorBlockIntro:!0,enableSponsorBlockOutro:!0,enableSponsorBlockInteraction:!0,enableSponsorBlockSelfPromo:!0,enableSponsorBlockPreview:!0,enableSponsorBlockMusicOfftopic:!0,enableSponsorBlockFiller:!1,enableSponsorBlockHighlight:!0,videoSpeed:1,preferredVideoQuality:"auto",enableDeArrowTitles:!0,enableDeArrowThumbnails:!0,routeColor:"#0f0f0f",routeBackgroundUrl:"",themePreset:"default",textTheme:"default",userAgentProfile:"auto",enableFixedUI:!1,enableHqThumbnails:!0,enableLongPress:!0,enableShorts:!0,dontCheckUpdateUntil:0,enableWhoIsWatchingMenu:!1,permanentlyEnableWhoIsWatchingMenu:!1,enableWhosWatchingMenuOnAppExit:!1,enableShowUserLanguage:!0,enableShowOtherLanguages:!1,showWelcomeToast:!0,enablePreviousNextButtons:!0,enableSuperThanksButton:!1,enableSpeedControlsButton:!0,enablePatchingVideoPlayer:!0,enableMPButton:!0,enableSwapMPWithPIP:!1,enablePreviews:!0,previewLengthSeconds:40,enableRemainingTime:!1,enablePauseOnBlur:!1,enableLowMemoryMode:!1,enableHideWatchedVideos:!1,hideWatchedVideosThreshold:80,hideWatchedVideosPages:[],enableHideEndScreenCards:!1,enableYouThereRenderer:!0,enableScreenDimming:!1,dimmingTimeout:60,dimmingOpacity:.5,enablePaidPromotionOverlay:!0,speedSettingsIncrement:.25,videoPreferredCodec:"any",enableAutoSubtitles:!0,autoSubtitleLanguage:"en",autoSubtitleAllowAuto:!0,launchToOnStartup:null,reloadHomeOnStartup:!0,disabledSidebarContents:[],disableChannelsOnSidebar:!1,enableUpdater:!0,autoFrameRate:!1,autoFrameRatePauseVideoFor:0,enableSigninReminder:!1,sortSubscriptionsByAlphabet:!1,enableReducedMotion:!1,enablePerformanceMode:!1,enablePanelShrink:!0,enableDeArrowPeek:!0,panelShrinkPercent:"60",clockMode:"off",clockFormat:"24h",clockPosition:"topRight",clockShowSeconds:!1,enableOnePressMode:!1,enableExperimentalResolution:!1,experimentalMaxResolution:"1440p"},ranges:{videoSpeed:[.05,5],hideWatchedVideosThreshold:[0,100],dimmingTimeout:[1,3600],dimmingOpacity:[0,1],speedSettingsIncrement:[.01,1],autoFrameRatePauseVideoFor:[0,1e4],previewLengthSeconds:[5,120],dontCheckUpdateUntil:[0,9007199254740991]},enums:{preferredVideoQuality:["auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"],videoPreferredCodec:["any","vp9","av01","avc1"],themePreset:["default","black","darkGray","charcoal","navy","darkRed","darkGreen","darkPurple"],textTheme:["default","white","gray","red","blue","green","purple","yellow"],userAgentProfile:["auto","samsung","android"],experimentalMaxResolution:["1440p","2160p"],autoSubtitleLanguage:["en","hi","es","fr","de","pt","ja","ko","ru"],panelShrinkPercent:["50","60","70"],clockMode:["off","always","notPlaying"],clockFormat:["24h","12h","12hNoAmPm"],clockPosition:["topLeft","topRight","bottomLeft","bottomRight"]},themePresetColors:{default:"#0f0f0f",black:"#000000",darkGray:"#1c1a1a",charcoal:"#121212",navy:"#0d1b2a",darkRed:"#3b0505",darkGreen:"#052e1b",darkPurple:"#1a1025"}};var l=function(){if(i)return r;i=1;var e=a;return r={validateConfigValue:function(t,n){var r=e.defaults;if(!Object.prototype.hasOwnProperty.call(r,t))return!1;var i=r[t];if(null===i)return null===n||"string"==typeof n;if(Array.isArray(i))return Array.isArray(n)&&n.every(function(e){return"string"==typeof e});if("number"==typeof i){if("number"!=typeof n||!Number.isFinite(n))return!1;var a=e.ranges[t];return!a||n>=a[0]&&n<=a[1]}if(o(n)!==o(i))return!1;var l=e.enums[t];return(!l||-1!==l.indexOf(n))&&(!("routeColor"===t&&!/^#[0-9a-f]{6}$/i.test(n))&&!("routeBackgroundUrl"===t&&n&&!/^https?:\/\/\S+$/i.test(n)))}},r}(),c=e(l),u="ytaf-configuration",s=JSON.parse,f=JSON.stringify,p=function(e){return s(f(e))},d=p(a.defaults);d.enableFixedUI="undefined"==typeof window||!window.h5vcc||!window.h5vcc.tizentube||a.defaults.enableFixedUI;var h,b=c.validateConfigValue;function y(e){if(Object.prototype.hasOwnProperty.call(d,e))return void 0===h[e]&&(h[e]=p(d[e])),h[e];console.warn("[AxoTube:config] Unknown config key",e)}!function(){h=p(d);try{if(!window.localStorage||!window.localStorage[u])return;var e=s(window.localStorage[u]);if(!e||"object"!==o(e)||Array.isArray(e))return;Object.keys(e).forEach(function(t){b(t,e[t])&&(h[t]=p(e[t]))})}catch(e){console.warn("[AxoTube:config] Config read failed; using defaults:",e)}}();var v=new EventTarget,m={"1440p":"2560x1440","2160p":"3840x2160"},g={width:function(e){return Number(e)>0&&Number(e)<=7680},height:function(e){return Number(e)>0&&Number(e)<=4320},framerate:function(e){return Number(e)>0&&Number(e)<=60},bitrate:function(e){return Number(e)>0&&Number(e)<=2e8},eotf:function(e){return"bt709"===e||("smpte2084"===e||"arib-std-b67"===e)&&w()},channels:function(e){return Number(e)>0&&Number(e)<=8},cryptoblockformat:function(e){return"subsample"===e},"decode-to-texture":function(e){return"true"===e||"false"===e}};function w(){return!(!window.matchMedia||!window.matchMedia("(dynamic-range: high)").matches)}function S(e){var t=e.split("."),n="vp09"===t[0]?t[6]:"av01"===t[0]?t[7]:void 0;return"16"===n||"18"===n}var E="__axotubeResolutionOwner";if(!window[E]){if(window[E]=!0,y("enableExperimentalResolution"))try{window.h5vcc=window.h5vcc||{},window.h5vcc.system=window.h5vcc.system||{},window.h5vcc.system.getVideoContainerSizeOverride=function(){var e=y("experimentalMaxResolution");return m[e]||m["1440p"]},function(){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(t){for(var n=String(t).split(";"),o=[n[0].trim()],r=1;r<n.length;r++){var i=n[r].trim(),a=i.indexOf("="),l=(-1===a?i:i.slice(0,a)).trim().toLowerCase(),c=(-1===a?"":i.slice(a+1)).trim().replace(/^"|"$/g,"");if("codecs"===l){for(var u=c.split(","),s=0;s<u.length;s++)if(S(u[s].trim())&&!w())return!1;o.push(i)}else if(g[l]){if(!g[l](c))return!1}else o.push(i)}return e(o.join("; "))}}}()}catch(e){console.warn("[AxoTube:experimentalResolution] Could not install overrides:",e)}v.addEventListener("configChange",function(e){var t,n=(null===(t=e.detail)||void 0===t?void 0:t.key)||"";("enableExperimentalResolution"===n||"experimentalMaxResolution"===n&&y("enableExperimentalResolution"))&&setTimeout(function(){return location.reload()},300)})}var P={avc1:["avc1"],vp9:["vp09","vp9"],av01:["av01"]};var k="__axotubeCodecOwner";if(!window[k]){window[k]=!0;try{!function(e){if(window.MediaSource&&"function"==typeof MediaSource.isTypeSupported){var t=function(e){if(!P[e])return[];var t=[];return Object.keys(P).forEach(function(n){n!==e&&(t=t.concat(P[n]))}),t}(e);if(0!==t.length){var n=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){var o=String(e).toLowerCase();if(-1!==o.indexOf("codecs"))for(var r=0;r<t.length;r++)if(-1!==o.indexOf(t[r]))return!1;return n(e)}}}}(y("videoPreferredCodec"))}catch(e){console.warn("[AxoTube:codecPreference] Could not install codec preference:",e)}v.addEventListener("configChange",function(e){var t;"videoPreferredCodec"===((null===(t=e.detail)||void 0===t?void 0:t.key)||"")&&setTimeout(function(){return location.reload()},300)})}}();
|