PageSourceSearch

https://endearhq.com/_next/static/chunks/reactPlayerFilePlayer.2d47c49205ab55b2.js

js endearhq.com collected 2026-09-24 08:43:44 UTC 10,979 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6011],{72935:function(e,t,n){function r(e){return(r="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})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(n(52983)),i=n(42954),s=n(19131);function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d="undefined"!=typeof navigator,f=d&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,y=d&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||f)&&!window.MSStream,v=/www\.dropbox\.com\/.+/,E=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(d,e);var t,n,a=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=c(d);return e=t?Reflect.construct(n,arguments,c(this).constructor):n.apply(this,arguments),e&&("object"===r(e)||"function"==typeof e)?e:p(this)});function d(){var e;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,d);for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(p(e=a.call.apply(a,[this].concat(n))),"onReady",function(){var t;return(t=e.props).onReady.apply(t,arguments)}),h(p(e),"onPlay",function(){var t;return(t=e.props).onPlay.apply(t,arguments)}),h(p(e),"onBuffer",function(){var t;return(t=e.props).onBuffer.apply(t,arguments)}),h(p(e),"onBufferEnd",function(){var t;return(t=e.props).onBufferEnd.apply(t,arguments)}),h(p(e),"onPause",function(){var t;return(t=e.props).onPause.apply(t,arguments)}),h(p(e),"onEnded",function(){var t;return(t=e.props).onEnded.apply(t,arguments)}),h(p(e),"onError",function(){var t;return(t=e.props).onError.apply(t,arguments)}),h(p(e),"onPlayBackRateChange",function(t){return e.props.onPlaybackRateChange(t.target.playbackRate)}),h(p(e),"onEnablePIP",function(){var t;return(t=e.props).onEnablePIP.apply(t,arguments)}),h(p(e),"onDisablePIP",function(t){var n=e.props,r=n.onDisablePIP,o=n.playing;r(t),o&&e.play()}),h(p(e),"onPresentationModeChange",function(t){if(e.player&&(0,i.supportsWebKitPresentationMode)(e.player)){var n=e.player.webkitPresentationMode;"picture-in-picture"===n?e.onEnablePIP(t):"inline"===n&&e.onDisablePIP(t)}}),h(p(e),"onSeek",function(t){e.props.onSeek(t.target.currentTime)}),h(p(e),"mute",function(){e.player.muted=!0}),h(p(e),"unmute",function(){e.player.muted=!1}),h(p(e),"renderSourceElement",function(e,t){return"string"==typeof e?o.default.createElement("source",{key:t,src:e}):o.default.createElement("source",u({key:t},e))}),h(p(e),"renderTrack",function(e,t){return o.default.createElement("track",u({key:t},e))}),h(p(e),"ref",function(t){e.player&&(e.prevPlayer=e.player),e.player=t}),e}return n=[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player),y&&this.player.load()}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url===e.url||(0,i.isMediaStream)(this.props.url)||(this.player.srcObject=null)}},{key:"componentWillUnmount",value:function(){this.removeListeners(this.player),this.hls&&this.hls.destroy()}},{key:"addListeners",value:function(e){var t=this.props,n=t.url,r=t.playsinline;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(n)||e.addEventListener("canplay",this.onReady),r&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}},{key:"removeListeners",value:function(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}},{key:"shouldUseAudio",value:function(e){return!e.config.forceVideo&&!e.config.attributes.poster&&(s.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio)}},{key:"shouldUseHLS",value:function(e){return!!this.props.config.forceHLS||!y&&(s.HLS_EXTENSIONS.test(e)||E.test(e))}},{key:"shouldUseDASH",value:function(e){return s.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}},{key:"shouldUseFLV",value:function(e){return s.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}},{key:"load",value:function(e){var t=this,n=this.props.config,r=n.hlsVersion,o=n.hlsOptions,s=n.dashVersion,a=n.flvVersion;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,i.getSDK)("https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js".replace("VERSION",r),"Hls").then(function(n){if(t.hls=new n(o),t.hls.on(n.Events.MANIFEST_PARSED,function(){t.props.onReady()}),t.hls.on(n.Events.ERROR,function(e,r){t.props.onError(e,r,t.hls,n)}),E.test(e)){var r=e.match(E)[1];t.hls.loadSource("https://videodelivery.net/{id}/manifest/video.m3u8".replace("{id}",r))}else t.hls.loadSource(e);t.hls.attachMedia(t.player),t.props.onLoaded()}),this.shouldUseDASH(e)&&(0,i.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js".replace("VERSION",s),"dashjs").then(function(n){t.dash=n.MediaPlayer().create(),t.dash.initialize(t.player,e,t.props.playing),t.dash.on("error",t.props.onError),3>
1parseInt(s)?t.dash.getDebug().setLogToBrowserConsole(!1):t.dash.updateSettings({debug:{logLevel:n.Debug.LOG_LEVEL_NONE}}),t.props.onLoaded()}),this.shouldUseFLV(e)&&(0,i.getSDK)("https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js".replace("VERSION",a),"flvjs").then(function(n){t.flv=n.createPlayer({type:"flv",url:e}),t.flv.attachMediaElement(t.player),t.flv.on(n.Events.ERROR,function(e,r){t.props.onError(e,r,t.flv,n)}),t.flv.load(),t.props.onLoaded()}),e instanceof Array)this.player.load();else if((0,i.isMediaStream)(e))try{this.player.srcObject=e}catch(t){this.player.src=window.URL.createObjectURL(e)}}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(e){this.player.currentTime=e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"enablePIP",value:function(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,i.supportsWebKitPresentationMode)(this.player)&&"picture-in-picture"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("picture-in-picture")}},{key:"disablePIP",value:function(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,i.supportsWebKitPresentationMode)(this.player)&&"inline"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("inline")}},{key:"setPlaybackRate",value:function(e){try{this.player.playbackRate=e}catch(e){this.props.onError(e)}}},{key:"getDuration",value:function(){if(!this.player)return null;var e=this.player,t=e.duration,n=e.seekable;return t===1/0&&n.length>0?n.end(n.length-1):t}},{key:"getCurrentTime",value:function(){return this.player?this.player.currentTime:null}},{key:"getSecondsLoaded",value:function(){if(!this.player)return null;var e=this.player.buffered;if(0===e.length)return 0;var t=e.end(e.length-1),n=this.getDuration();return t>n?n:t}},{key:"getSource",value:function(e){var t=this.shouldUseHLS(e),n=this.shouldUseDASH(e),r=this.shouldUseFLV(e);return e instanceof Array||(0,i.isMediaStream)(e)||t||n||r?void 0:v.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.playing,r=e.loop,i=e.controls,s=e.muted,a=e.config,l=e.width,p=e.height,c=this.shouldUseAudio(this.props);return o.default.createElement(c?"audio":"video",u({ref:this.ref,src:this.getSource(t),style:{width:"auto"===l?l:"100%",height:"auto"===p?p:"100%"},preload:"auto",autoPlay:n||void 0,controls:i,muted:s,loop:r},a.attributes),t instanceof Array&&t.map(this.renderSourceElement),a.tracks.map(this.renderTrack))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(d.prototype,n),d}(o.Component);t.default=P,h(P,"displayName","FilePlayer"),h(P,"canPlay",s.canPlay.file)}}]);

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.