PageSourceSearch

https://www.costan.com/themes/custom/epta_fe/js/youtube.js

js costan.com collected 2026-10-06 03:50:18 UTC 2,599 bytes, 7 lines download raw bytes

vendor: 2,599 bytes, lines 1-7
1/*!
2 * @license MIT
3 * @name vlitejs
4 * @version 6.0.5
5 * @copyright 2024 Yoriiis
6 */
7function e(e){if(window.VlitejsYoutubeQueue=window.VlitejsYoutubeQueue||[],void 0===window.YT){const e=document.createElement("script");e.async=!0,e.type="text/javascript",e.src="https://youtube.com/iframe_api",window.onYouTubeIframeAPIReady=()=>{window.VlitejsYoutubeQueue.forEach((e=>{e.initYoutubePlayer().then((()=>{e.onReady()}))})),window.VlitejsYoutubeQueue=[]},document.getElementsByTagName("body")[0].appendChild(e)}return class extends e{constructor(e){super(e);const t={autohide:1,controls:0,fs:this.options.fullscreen?1:0,modestbranding:0,playsinline:this.options.playsinline?1:0,rel:0,showinfo:0,wmode:"transparent"};this.params=Object.assign(Object.assign({},t),this.options.providerParams)}init(){this.waitUntilVideoIsReady().then((()=>{super.onReady()}))}waitUntilVideoIsReady(){return new window.Promise((e=>{void 0!==window.YT?this.initYoutubePlayer().then(e):window.VlitejsYoutubeQueue.push(this)}))}initYoutubePlayer(){return new window.Promise((e=>{this.instance=new window.YT.Player(this.media.getAttribute("id"),{videoId:this.media.getAttribute("data-youtube-id"),height:"100%",width:"100%",playerVars:this.params,origin:window.location.origin,events:{onReady:t=>{this.media=t.target.getIframe(),e()},onStateChange:e=>this.onPlayerStateChange(e)}})}))}onPlayerStateChange(e){switch(this.rafPlaying&&window.cancelAnimationFrame(this.rafPlaying),e.data){case window.YT.PlayerState.ENDED:super.onMediaEnded();break;case window.YT.PlayerState.PLAYING:super.loading(!1),this.options.controls&&window.requestAnimationFrame(this.onRafPlaying.bind(this));break;case window.YT.PlayerState.BUFFERING:super.loading(!0)}}onRafPlaying(){super.onTimeUpdate(),this.isPaused||(this.rafTimeout=setTimeout((()=>{this.rafPlaying=window.requestAnimationFrame(this.onRafPlaying.bind(this))}),100))}getInstance(){return this.instance}getCurrentTime(){return new window.Promise((e=>e(this.instance.getCurrentTime())))}getDuration(){return new window.Promise((e=>e(this.instance.getDuration())))}methodPlay(){this.instance.playVideo()}methodPause(){this.instance.pauseVideo()}methodSetVolume(e){this.instance.setVolume(100*e)}methodGetVolume(){return new window.Promise((e=>e(this.instance.getVolume()/100)))}methodMute(){this.instance.mute()}methodUnMute(){this.instance.unMute()}methodSeekTo(e){null!==this.isPaused||this.options.muted||(this.mute(),this.play()),this.instance.seekTo(e),super.onTimeUpdate()}destroy(){clearTimeout(this.rafTimeout),this.instance.destroy(),super.destroy()}}}export{e as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.