@extscreen/es3-player
Version:
Vue-Next binding for ES native framework
2 lines (1 loc) • 28.4 kB
JavaScript
import{Native as e}from"@extscreen/es3-vue";import{inject as n}from"vue";var E,_,t,o,P,r,i,a,S,l,A,R,T;!function(e){e[e.ES_PLAYER_STATE_IDLE=0]="ES_PLAYER_STATE_IDLE",e[e.ES_PLAYER_STATE_PREPARING=1]="ES_PLAYER_STATE_PREPARING",e[e.ES_PLAYER_STATE_PREPARED=2]="ES_PLAYER_STATE_PREPARED",e[e.ES_PLAYER_STATE_BUFFER_START=3]="ES_PLAYER_STATE_BUFFER_START",e[e.ES_PLAYER_STATE_BUFFER_END=4]="ES_PLAYER_STATE_BUFFER_END",e[e.ES_PLAYER_STATE_PLAYING=5]="ES_PLAYER_STATE_PLAYING",e[e.ES_PLAYER_STATE_SEEK_START=6]="ES_PLAYER_STATE_SEEK_START",e[e.ES_PLAYER_STATE_SEEK_COMPLETED=7]="ES_PLAYER_STATE_SEEK_COMPLETED",e[e.ES_PLAYER_STATE_PAUSED=8]="ES_PLAYER_STATE_PAUSED",e[e.ES_PLAYER_STATE_RESUMED=9]="ES_PLAYER_STATE_RESUMED",e[e.ES_PLAYER_STATE_BEFORE_STOP=10]="ES_PLAYER_STATE_BEFORE_STOP",e[e.ES_PLAYER_STATE_STOP=11]="ES_PLAYER_STATE_STOP",e[e.ES_PLAYER_STATE_PLAYBACK_COMPLETED=12]="ES_PLAYER_STATE_PLAYBACK_COMPLETED",e[e.ES_PLAYER_STATE_ERROR=13]="ES_PLAYER_STATE_ERROR",e[e.ES_PLAYER_STATE_VIDEO_SIZE_CHANGED=14]="ES_PLAYER_STATE_VIDEO_SIZE_CHANGED",e[e.ES_PLAYER_STATE_PLAYER_VIEW_CHANGED=15]="ES_PLAYER_STATE_PLAYER_VIEW_CHANGED",e[e.ES_PLAYER_STATE_AD_START=16]="ES_PLAYER_STATE_AD_START",e[e.ES_PLAYER_STATE_AD_END=17]="ES_PLAYER_STATE_AD_END",e[e.ES_PLAYER_STATE_AD_SKIP=18]="ES_PLAYER_STATE_AD_SKIP",e[e.ES_PLAYER_STATE_AD_PAUSED=19]="ES_PLAYER_STATE_AD_PAUSED",e[e.ES_PLAYER_STATE_AUTHORIZED=20]="ES_PLAYER_STATE_AUTHORIZED",e[e.ES_PLAYER_STATE_SET_PLAY_RATE_SUCCESS=21]="ES_PLAYER_STATE_SET_PLAY_RATE_SUCCESS",e[e.ES_PLAYER_STATE_SET_PLAY_RATE_ERROR=22]="ES_PLAYER_STATE_SET_PLAY_RATE_ERROR",e[e.ES_PLAYER_STATE_AD_RESUMED=23]="ES_PLAYER_STATE_AD_RESUMED",e[e.ES_PLAYER_STATE_AD_LOADED=24]="ES_PLAYER_STATE_AD_LOADED",e[e.ES_PLAYER_STATE_AD_TIME=25]="ES_PLAYER_STATE_AD_TIME",e[e.ES_PLAYER_STATE_PLAYER_INITIALIZED=26]="ES_PLAYER_STATE_PLAYER_INITIALIZED",e[e.ES_PLAYER_STATE_TIMED_TEXT_CHANGED=27]="ES_PLAYER_STATE_TIMED_TEXT_CHANGED",e[e.ES_PLAYER_STATE_PLAYER_CLICKABLE=28]="ES_PLAYER_STATE_PLAYER_CLICKABLE",e[e.ES_PLAYER_STATE_INITIALIZE_SUCCESS=29]="ES_PLAYER_STATE_INITIALIZE_SUCCESS",e[e.ES_PLAYER_STATE_INITIALIZE_ERROR=30]="ES_PLAYER_STATE_INITIALIZE_ERROR"}(E||(E={})),function(e){e[e.ES_PLAYER_DECODE_HARDWARE=2]="ES_PLAYER_DECODE_HARDWARE",e[e.ES_PLAYER_DECODE_SOFTWARE=3]="ES_PLAYER_DECODE_SOFTWARE"}(_||(_={})),function(e){e[e.ES_PLAYER_DEFINITION_UNKNOWN=-1]="ES_PLAYER_DEFINITION_UNKNOWN",e[e.ES_PLAYER_DEFINITION_SD=0]="ES_PLAYER_DEFINITION_SD",e[e.ES_PLAYER_DEFINITION_HD=1]="ES_PLAYER_DEFINITION_HD",e[e.ES_PLAYER_DEFINITION_FULL_HD=2]="ES_PLAYER_DEFINITION_FULL_HD",e[e.ES_PLAYER_DEFINITION_ORIGINAL=3]="ES_PLAYER_DEFINITION_ORIGINAL",e[e.ES_PLAYER_DEFINITION_BLUERAY=4]="ES_PLAYER_DEFINITION_BLUERAY",e[e.ES_PLAYER_DEFINITION_FOURK=5]="ES_PLAYER_DEFINITION_FOURK",e[e.ES_PLAYER_DEFINITION_2K=6]="ES_PLAYER_DEFINITION_2K"}(t||(t={})),function(e){e.ES_PLAYER_RATE_0_5="0.5",e.ES_PLAYER_RATE_0_7_5="0.75",e.ES_PLAYER_RATE_1="1",e.ES_PLAYER_RATE_1_2="1.2",e.ES_PLAYER_RATE_1_2_5="1.25",e.ES_PLAYER_RATE_1_5="1.5",e.ES_PLAYER_RATE_1_7_5="1.75",e.ES_PLAYER_RATE_2="2.0",e.ES_PLAYER_RATE_2_5="2.5"}(o||(o={})),function(e){e[e.ES_PLAYER_AR_ASPECT_FIT_PARENT=0]="ES_PLAYER_AR_ASPECT_FIT_PARENT",e[e.ES_PLAYER_AR_ASPECT_FILL_PARENT=1]="ES_PLAYER_AR_ASPECT_FILL_PARENT",e[e.ES_PLAYER_AR_ASPECT_WRAP_CONTENT=2]="ES_PLAYER_AR_ASPECT_WRAP_CONTENT",e[e.ES_PLAYER_AR_ASPECT_MATCH_PARENT=3]="ES_PLAYER_AR_ASPECT_MATCH_PARENT",e[e.ES_PLAYER_AR_16_9_FIT_PARENT=4]="ES_PLAYER_AR_16_9_FIT_PARENT",e[e.ES_PLAYER_AR_4_3_FIT_PARENT=5]="ES_PLAYER_AR_4_3_FIT_PARENT",e[e.ES_PLAYER_AR_235_FIT_PARENT=6]="ES_PLAYER_AR_235_FIT_PARENT"}(P||(P={})),function(e){e[e.ES_PLAYER_WINDOW_TYPE_SMALL=1]="ES_PLAYER_WINDOW_TYPE_SMALL",e[e.ES_PLAYER_WINDOW_TYPE_FULL=2]="ES_PLAYER_WINDOW_TYPE_FULL",e[e.ES_PLAYER_WINDOW_TYPE_FLOAT=3]="ES_PLAYER_WINDOW_TYPE_FLOAT"}(r||(r={})),function(e){e[e.ES_PLAYER_RENDER_NONE=0]="ES_PLAYER_RENDER_NONE",e[e.ES_PLAYER_RENDER_SURFACE_VIEW=1]="ES_PLAYER_RENDER_SURFACE_VIEW",e[e.ES_PLAYER_RENDER_TEXTURE_VIEW=2]="ES_PLAYER_RENDER_TEXTURE_VIEW"}(i||(i={})),function(e){e[e.ES_PLAYER_ERROR_NATIVE=1e3]="ES_PLAYER_ERROR_NATIVE",e[e.ES_PLAYER_ERROR_ES=2e3]="ES_PLAYER_ERROR_ES",e[e.ES_PLAYER_ERROR_APP=3e3]="ES_PLAYER_ERROR_APP"}(a||(a={})),function(e){e[e.ES_PLAYER_MAX_VOLUME=1]="ES_PLAYER_MAX_VOLUME",e[e.ES_PLAYER_MIN_VOLUME=0]="ES_PLAYER_MIN_VOLUME"}(S||(S={})),function(e){e[e.ES_PLAYER_PLAY_MODE_ONCE=0]="ES_PLAYER_PLAY_MODE_ONCE",e[e.ES_PLAYER_PLAY_MODE_ORDER=1]="ES_PLAYER_PLAY_MODE_ORDER",e[e.ES_PLAYER_PLAY_MODE_SHUFFLE=2]="ES_PLAYER_PLAY_MODE_SHUFFLE",e[e.ES_PLAYER_PLAY_MODE_REPEAT=3]="ES_PLAYER_PLAY_MODE_REPEAT",e[e.ES_PLAYER_PLAY_MODE_LOOP=4]="ES_PLAYER_PLAY_MODE_LOOP"}(l||(l={})),function(e){e[e.ES_PLAYER_DEFINITION_STRATEGY_NONE=-1]="ES_PLAYER_DEFINITION_STRATEGY_NONE",e[e.ES_PLAYER_DEFINITION_STRATEGY_HIGHEST=0]="ES_PLAYER_DEFINITION_STRATEGY_HIGHEST",e[e.ES_PLAYER_DEFINITION_STRATEGY_LOWEST=1]="ES_PLAYER_DEFINITION_STRATEGY_LOWEST",e[e.ES_PLAYER_DEFINITION_STRATEGY_MEDIUM=2]="ES_PLAYER_DEFINITION_STRATEGY_MEDIUM",e[e.ES_PLAYER_DEFINITION_STRATEGY_SPECIFIED_LOWER=3]="ES_PLAYER_DEFINITION_STRATEGY_SPECIFIED_LOWER",e[e.ES_PLAYER_DEFINITION_STRATEGY_SPECIFIED_HIGHER=4]="ES_PLAYER_DEFINITION_STRATEGY_SPECIFIED_HIGHER",e[e.ES_PLAYER_DEFINITION_STRATEGY_SPECIFIED_LOWEST=5]="ES_PLAYER_DEFINITION_STRATEGY_SPECIFIED_LOWEST",e[e.ES_PLAYER_DEFINITION_STRATEGY_SPECIFIED_HIGHEST=6]="ES_PLAYER_DEFINITION_STRATEGY_SPECIFIED_HIGHEST"}(A||(A={})),function(e){e[e.ES_PLAYER_INTERCEPTOR_TYPE_DEFAULT=0]="ES_PLAYER_INTERCEPTOR_TYPE_DEFAULT",e[e.ES_PLAYER_INTERCEPTOR_TYPE_MEDIA_ITEM_LIST=1]="ES_PLAYER_INTERCEPTOR_TYPE_MEDIA_ITEM_LIST",e[e.ES_PLAYER_INTERCEPTOR_TYPE_MEDIA_ITEM=2]="ES_PLAYER_INTERCEPTOR_TYPE_MEDIA_ITEM",e[e.ES_PLAYER_INTERCEPTOR_TYPE_MEDIA_SOURCE_LIST=3]="ES_PLAYER_INTERCEPTOR_TYPE_MEDIA_SOURCE_LIST",e[e.ES_PLAYER_INTERCEPTOR_TYPE_MEDIA_SOURCE=4]="ES_PLAYER_INTERCEPTOR_TYPE_MEDIA_SOURCE",e[e.ES_PLAYER_INTERCEPTOR_TYPE_AD_MEDIA_SOURCE_LIST=5]="ES_PLAYER_INTERCEPTOR_TYPE_AD_MEDIA_SOURCE_LIST",e[e.ES_PLAYER_INTERCEPTOR_TYPE_AD_MEDIA_SOURCE=6]="ES_PLAYER_INTERCEPTOR_TYPE_AD_MEDIA_SOURCE"}(R||(R={})),function(e){e[e.ES_PLAYER_TYPE_SYSTEM=1]="ES_PLAYER_TYPE_SYSTEM",e[e.ES_PLAYER_TYPE_IJK=2]="ES_PLAYER_TYPE_IJK",e[e.ES_PLAYER_TYPE_EXO=3]="ES_PLAYER_TYPE_EXO",e[e.ES_PLAYER_TYPE_APOLLO=4]="ES_PLAYER_TYPE_APOLLO",e[e.ES_PLAYER_TYPE_BILIBILI=5]="ES_PLAYER_TYPE_BILIBILI"}(T||(T={}));const u=Symbol("PlayerManagerKey"),L=Symbol("PlayerDefinitionManagerKey"),c=Symbol("PlayerAspectRatioManagerKey"),I=Symbol("playerPlayModeManagerKey"),Y=Symbol("PlayerRenderManagerKey"),y=Symbol("PlayerVolumeManagerKey"),f=Symbol("PlayerRateManagerKey"),C=Symbol("PlayerDecodeManagerKey"),d=Symbol("PlayerDisplayManagerKey"),D=Symbol("ESPlayerInterceptorManagerKey"),s=Symbol("ESPlayerEventManagerKey"),g=Symbol("ESPlayerViewManagerKey"),O=Symbol("ESPlayerLogKey"),N=Symbol("ESPlayerCacheManagerKey"),h=Symbol("ESPlayerDeviceManagerKey"),M=Symbol("PlayerLocalStorageManager"),p=Symbol("PlayerTypeManagerKey");var F,V,m,v,H;function U(){let n=F.WARN;const E={v:function(n,...E){e.callNative("ESLogModule","v",n,E.toString())},d:function(n,...E){e.callNative("ESLogModule","d",n,E.toString())},i:function(n,...E){e.callNative("ESLogModule","i",n,E.toString())},w:function(n,...E){e.callNative("ESLogModule","w",n,E.toString())},e:function(n,...E){e.callNative("ESLogModule","e",n,E.toString())}};let _=!0,t=!0;function o(e){n=e}function P(e){return n<=e}return{install:function(e){e.provide(O,this)},init:function(...e){return new Promise(n=>{o(e[0]??!1?F.VERBOSE:F.WARN),n(!0)})},v:function(e,...n){P(F.VERBOSE)&&(_&&console.log(e,...n),t&&E.v(e,...n))},d:function(e,...n){P(F.DEBUG)&&(_&&console.log(e,...n),t&&E.d(e,...n))},i:function(e,...n){P(F.INFO)&&(_&&console.log(e,...n),t&&E.i(e,...n))},w:function(e,...n){P(F.WARN)&&(_&&console.log(e,...n),t&&E.w(e,...n))},e:function(e,...n){P(F.ERROR)&&(_&&console.log(e,...n),t&&E.e(e,...n))},setMinimumLoggingLevel:o,isLoggable:P,enableConsoleLogging:function(e){_=e},enableNativeLogging:function(e){t=e}}}function W(){const n=e.isAndroid()?{initSharedPreferences:function(n){return e.callNativeWithPromise("AndroidSharedPreferencesModule","initSharedPreferences",n)},initESSharedPreferences:function(n){return e.callNativeWithPromise("AndroidSharedPreferencesModule","initESSharedPreferences",n)},getBoolean:function(n,E){return e.callNativeWithPromise("AndroidSharedPreferencesModule","getBoolean",n,E)},putBoolean:function(n,E){return e.callNativeWithPromise("AndroidSharedPreferencesModule","putBoolean",n,E)},getInt:function(n,E){return e.callNativeWithPromise("AndroidSharedPreferencesModule","getInt",n,E)},putInt:function(n,E){return e.callNativeWithPromise("AndroidSharedPreferencesModule","putInt",n,E)},getLong:function(n,E){return e.callNativeWithPromise("AndroidSharedPreferencesModule","getLong",n,E)},putLong:function(n,E){return e.callNativeWithPromise("AndroidSharedPreferencesModule","putLong",n,E)},getString:function(n,E){return e.callNativeWithPromise("AndroidSharedPreferencesModule","getString",n,E)},putString:function(n,E){return e.callNativeWithPromise("AndroidSharedPreferencesModule","putString",n,E)}}:{initSharedPreferences:function(n){return e.callNativeWithPromise("ESLocalStorageModule","initPreferences",n)},initESSharedPreferences:function(n){return e.callNativeWithPromise("ESLocalStorageModule","initPreferences",n)},getBoolean:function(n,E){return e.callNativeWithPromise("ESLocalStorageModule","get",n,E)},putBoolean:function(n,E){return e.callNativeWithPromise("ESLocalStorageModule","put",n,E)},getInt:function(n,E){return e.callNativeWithPromise("ESLocalStorageModule","get",n,E)},putInt:function(n,E){return e.callNativeWithPromise("ESLocalStorageModule","put",n,E)},getLong:function(n,E){return e.callNativeWithPromise("ESLocalStorageModule","get",n,E)},putLong:function(n,E){return e.callNativeWithPromise("ESLocalStorageModule","put",n,E)},getString:function(n,E){return e.callNativeWithPromise("ESLocalStorageModule","get",n,E)},putString:function(n,E){return e.callNativeWithPromise("ESLocalStorageModule","put",n,E)}};function E(){return n.initESSharedPreferences("player_local_storage")}return{install:function(e){e.provide(M,this)},init:function(...e){return new Promise((e,n)=>{e(!0)})},getBoolean:function(e,_){return E().then(()=>n.getBoolean(e,_))},putBoolean:function(e,_){return E().then(()=>n.putBoolean(e,_))},getInt:function(e,_){return E().then(()=>n.getInt(e,_))},putInt:function(e,_){return E().then(()=>n.putInt(e,_))},getLong:function(e,_){return E().then(()=>n.getLong(e,_))},putLong:function(e,_){return E().then(()=>n.putLong(e,_))},getString:function(e,_){return E().then(()=>n.getString(e,_))},putString:function(e,_){return E().then(()=>n.putString(e,_))}}}function G(){const e=U(),n=W(),E=function(){let e,n,E=t.ES_PLAYER_DEFINITION_FULL_HD,_=A.ES_PLAYER_DEFINITION_STRATEGY_SPECIFIED_LOWER;const o="ES_PLAYER_DEFINITION_KEY";return{install:function(e){e.provide(L,this)},init:function(..._){return e=_[0],n=_[1],e.getInt(o,t.ES_PLAYER_DEFINITION_FULL_HD).then(e=>(E=e,Promise.resolve()))},getDefinition:function(){return E},setDefinition:function(_){E=_,e.putInt(o,_).then(e=>{n.isLoggable(F.DEBUG)&&n.d("ESPlayerDefinitionManager","setDefinition:"+_+" success!")},e=>{n.isLoggable(F.DEBUG)&&n.d("ESPlayerDefinitionManager","setDefinition:"+_+" error! "+e)})},getDefinitionStrategy:function(){return _},setDefinitionStrategy:function(e){_=e}}}(),r=function(){let e=P.ES_PLAYER_AR_ASPECT_FIT_PARENT;return{install:function(e){e.provide(c,this)},init:function(...e){return Promise.resolve()},getAspectRatio:function(){return e},setAspectRatio:function(n){e=n}}}(),a=function(){let e=i.ES_PLAYER_RENDER_SURFACE_VIEW;return{install:function(e){e.provide(Y,this)},init:function(...e){return Promise.resolve()},getRender:function(){return e},setRender:function(n){e=n}}}(),R=function(){let e=S.ES_PLAYER_MAX_VOLUME,n=S.ES_PLAYER_MAX_VOLUME;return{install:function(e){e.provide(y,this)},init:function(...e){return Promise.resolve()},getLeftVolume:function(){return e},getRightVolume:function(){return n},setLeftVolume:function(n){e=n},setRightVolume:function(e){n=e}}}(),O=function(){let e=o.ES_PLAYER_RATE_1;return{install:function(e){e.provide(f,this)},init:function(...e){return Promise.resolve()},getPlayRate:function(){return e},setPlayRate:function(n){e=n}}}(),M=function(){let e,n=_.ES_PLAYER_DECODE_HARDWARE;return{install:function(e){e.provide(C,this)},init:function(...E){return e=E[0],new Promise((E,t)=>{n=e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_639)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_628)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_638)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_648)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_5508)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_9632)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_9255P)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_TCL_901)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_TCL_811)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_TCL_MT07)?_.ES_PLAYER_DECODE_HARDWARE:_.ES_PLAYER_DECODE_SOFTWARE,E(!0)})},setDecode:function(e){n=e},getDecode:function(){return n}}}(),m=function(){let e=1920,n=1080,E=1;return{install:function(e){e.provide(d,this)},init:function(..._){const t=_[0];e=t.screenWidth,n=t.screenHeight;try{E=e/1920}catch(e){}return E<=0&&(E=1),Promise.resolve()},getScale:function(){return E},getSize:function(e){return E*e},getScreenWidth:function(){return e},getScreenHeight:function(){return n}}}(),v=function(){let e=[];return{install:function(e){e.provide(D,this)},init:function(...e){return Promise.resolve()},addInterceptor:function(n){if(e&&e.length>0)for(let E=0;E<e.length;E++)if(e[E].id===n.id)return;e.push(n)},removeInterceptor:function(n){if(e&&e.length>0){let E=-1;for(let _=0;_<e.length;_++)e[_].id===n.id&&(E=_);E>-1&&e.splice(E,1)}},getInterceptorsByType:function(n){return!e||e.length<=0?null:e.filter(e=>e.type===n)},getInterceptorsById:function(n){return!e||e.length<=0?null:e.filter(e=>e.type===n)},getInterceptors:function(){return e},clearInterceptors:function(){e=[]}}}(),H=function(){let e,n=!0,E=[];function _(e,...n){try{E.length>0&&E.map(E=>{try{E&&E[e](...n)}catch(e){}})}catch(e){}}return{install:function(e){e.provide(s,this)},init:function(...e){return Promise.resolve()},addListener:function(n){if(!E.some(e=>e.getId()===n.getId())){E.push(n);try{e&&"function"==typeof n.setPlayer&&n.setPlayer(e)}catch(e){}}},removeListener:function(e){const n=E.findIndex(n=>n.getId()===e.getId());-1!==n&&E.splice(n,1)},setEnabled:function(e){n=e},isEnabled:function(){return n},setPlayer:function(n){e=n;for(const n of E)try{"function"==typeof n.setPlayer&&n.setPlayer(e)}catch(e){}},getPlayer:function(){return e},onPlayerInitialized:function(e){_("onPlayerInitialized",e)},onPlayerPlayMediaSourceList:function(e){_("onPlayerPlayMediaSourceList",e)},onPlayerPlayMediaSource:function(e){_("onPlayerPlayMediaSource",e)},onPlayerInterceptSuccess:function(e){_("onPlayerInterceptSuccess",e)},onPlayerInterceptError:function(e){_("onPlayerInterceptError",e)},onPlayerSizeChanged:function(e,n){_("onPlayerSizeChanged",e,n)},onPlayerPreparing:function(){_("onPlayerPreparing")},onPlayerPrepared:function(){_("onPlayerPrepared")},onPlayerBufferStart:function(){_("onPlayerBufferStart")},onPlayerBufferEnd:function(){_("onPlayerBufferEnd")},onPlayerPlaying:function(){_("onPlayerPlaying")},onPlayerProgressChanged:function(e){_("onPlayerProgressChanged",e)},onPlayerDurationChanged:function(e){_("onPlayerDurationChanged",e)},onPlayerBufferPercentChanged:function(e){_("onPlayerBufferPercentChanged",e)},onPlayerSeekStart:function(){_("onPlayerSeekStart")},onPlayerSeekCompleted:function(){_("onPlayerSeekCompleted")},onPlayerPaused:function(){_("onPlayerPaused")},onPlayerResumed:function(){_("onPlayerResumed")},onPlayerStopped:function(){_("onPlayerStopped")},onPlayerCompleted:function(){_("onPlayerCompleted")},onPlayerControlled:function(e){_("onPlayerControlled",e)},onPlayerError:function(e){_("onPlayerError",e)},onPlayerInfo:function(e){_("onPlayerInfo",e)},onPlayerNoMediaSourceCanPlay:function(e){_("onPlayerNoMediaSourceCanPlay",e)},onPlayerVolumeChanged:function(e,n){_("onPlayerVolumeChanged",e,n)},onPlayerLeftVolumeChanged:function(e){_("onPlayerLeftVolumeChanged",e)},onPlayerRightVolumeChanged:function(e){_("onPlayerRightVolumeChanged",e)},onPlayerDefinitionListChanged:function(e){_("onPlayerDefinitionListChanged",e)},onPlayerDefinitionChanged:function(e){_("onPlayerDefinitionChanged",e)},onPlayerPlayRateListChanged:function(e){_("onPlayerPlayRateListChanged",e)},onPlayerPlayRateChanged:function(e){_("onPlayerPlayRateChanged",e)},onPlayerDecodeListChanged:function(e){_("onPlayerDecodeListChanged",e)},onPlayerDecodeChanged:function(e){_("onPlayerDecodeChanged",e)},onPlayerAspectRatioListChanged:function(e){_("onPlayerAspectRatioListChanged",e)},onPlayerAspectRatioChanged:function(e){_("onPlayerAspectRatioChanged",e)},onPlayerPlayMediaSourceListModeListChanged:function(e){_("onPlayerPlayMediaSourceListModeListChanged",e)},onPlayerPlayMediaSourceListModeChanged:function(e){_("onPlayerPlayMediaSourceListModeChanged",e)},onPlayerRenderListChanged:function(e){_("onPlayerRenderListChanged",e)},onPlayerRenderChanged:function(e){_("onPlayerRenderChanged",e)},onPlayerViewChanged:function(){_("onPlayerViewChanged")},onPlayerClickable:function(e){_("onPlayerClickable",e)},onPlayerRelease:function(){_("onPlayerRelease")},onPlayerReset:function(){_("onPlayerReset")}}}(),G=function(){let e,n=!0,E=[];function _(e,...n){try{E.length>0&&E.map(E=>{try{E&&E[e](...n)}catch(e){}})}catch(e){}}return{install:function(e){e.provide(g,this)},init:function(...e){return Promise.resolve()},addListener:function(n){if(!E.some(e=>e.getId()===n.getId())){E.push(n);try{e&&"function"==typeof n.setPlayer&&n.setPlayer(e)}catch(e){}}},removeListener:function(e){const n=E.findIndex(n=>n.getId()===e.getId());-1!==n&&E.splice(n,1)},setEnabled:function(e){n=e},isEnabled:function(){return n},setPlayer:function(n){e=n;for(const n of E)try{"function"==typeof n.setPlayer&&n.setPlayer(e)}catch(e){}},getPlayer:function(){return e},onPlayerInitialized:function(e){_("onPlayerInitialized",e)},onPlayerPlayMediaSourceList:function(e){_("onPlayerPlayMediaSourceList",e)},onPlayerPlayMediaSource:function(e){_("onPlayerPlayMediaSource",e)},onPlayerInterceptSuccess:function(e){_("onPlayerInterceptSuccess",e)},onPlayerInterceptError:function(e){_("onPlayerInterceptError",e)},onPlayerSizeChanged:function(e,n){_("onPlayerViewSizeChanged",e,n)},onPlayerPreparing:function(){_("onPlayerPreparing")},onPlayerPrepared:function(){_("onPlayerPrepared")},onPlayerBufferStart:function(){_("onPlayerBufferStart")},onPlayerBufferEnd:function(){_("onPlayerBufferEnd")},onPlayerPlaying:function(){_("onPlayerPlaying")},onPlayerProgressChanged:function(e){_("onPlayerProgressChanged",e)},onPlayerDurationChanged:function(e){_("onPlayerDurationChanged",e)},onPlayerBufferPercentChanged:function(e){_("onPlayerBufferPercentChanged",e)},onPlayerSeekStart:function(){_("onPlayerSeekStart")},onPlayerSeekCompleted:function(){_("onPlayerSeekCompleted")},onPlayerPaused:function(){_("onPlayerPaused")},onPlayerResumed:function(){_("onPlayerResumed")},onPlayerStopped:function(){_("onPlayerStopped")},onPlayerCompleted:function(){_("onPlayerCompleted")},onPlayerControlled:function(e){_("onPlayerControlled",e)},onPlayerError:function(e){_("onPlayerError",e)},onPlayerInfo:function(e){_("onPlayerInfo",e)},onPlayerNoMediaSourceCanPlay:function(e){_("onPlayerNoMediaSourceCanPlay",e)},onPlayerVolumeChanged:function(e,n){_("onPlayerVolumeChanged",e,n)},onPlayerLeftVolumeChanged:function(e){_("onPlayerLeftVolumeChanged",e)},onPlayerRightVolumeChanged:function(e){_("onPlayerRightVolumeChanged",e)},onPlayerDefinitionListChanged:function(e){_("onPlayerDefinitionListChanged",e)},onPlayerDefinitionChanged:function(e){_("onPlayerDefinitionChanged",e)},onPlayerPlayRateListChanged:function(e){_("onPlayerPlayRateListChanged",e)},onPlayerPlayRateChanged:function(e){_("onPlayerPlayRateChanged",e)},onPlayerDecodeListChanged:function(e){_("onPlayerDecodeListChanged",e)},onPlayerDecodeChanged:function(e){_("onPlayerDecodeChanged",e)},onPlayerAspectRatioListChanged:function(e){_("onPlayerAspectRatioListChanged",e)},onPlayerAspectRatioChanged:function(e){_("onPlayerAspectRatioChanged",e)},onPlayerPlayMediaSourceListModeListChanged:function(e){_("onPlayerPlayMediaSourceListModeListChanged",e)},onPlayerPlayMediaSourceListModeChanged:function(e){_("onPlayerPlayMediaSourceListModeChanged",e)},onPlayerRenderListChanged:function(e){_("onPlayerRenderListChanged",e)},onPlayerRenderChanged:function(e){_("onPlayerRenderChanged",e)},onPlayerViewChanged:function(){_("onPlayerViewChanged")},onPlayerClickable:function(e){_("onPlayerViewClickable",e)},onPlayerRelease:function(){_("onPlayerRelease")},onPlayerReset:function(){_("onPlayerReset")}}}(),B=function(){let e=l.ES_PLAYER_PLAY_MODE_ONCE;return{install:function(e){e.provide(I,this)},init:function(...e){return Promise.resolve()},getPlayMode:function(){return e},setPlayMode:function(n){e=n}}}(),K=function(){let e=null;return{install:function(e){e.provide(N,this)},init:function(...e){return Promise.resolve()},setCache:function(n){e=n},getCache:function(){return e}}}(),b=function(){let e;return{install:function(e){e.provide(h,this)},init:function(...n){return e=n[0],Promise.resolve()},getPlayerDevice:function(){return e},isPlayerDevice:function(n){return!(!e||!e.deviceType)&&e.deviceType.includes(n)}}}(),Z=function(){let e,n=T.ES_PLAYER_TYPE_SYSTEM;return{install:function(e){e.provide(p,this)},init:function(...E){return e=E[0],new Promise((E,_)=>{n=e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_639)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_628)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_638)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_648)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_5508)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_9632)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_CH_9255P)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_TCL_901)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_TCL_811)||e.isPlayerDevice(V.ES_PLAYER_DEVICE_TYPE_TCL_MT07)?T.ES_PLAYER_TYPE_SYSTEM:T.ES_PLAYER_TYPE_IJK,E(!0)})},setPlayerType:function(e){n=e},getPlayerType:function(){return n}}}();let w;return{install:function(_){_.provide(u,this),_.use(E),_.use(r),_.use(a),_.use(R),_.use(O),_.use(M),_.use(m),_.use(v),_.use(H),_.use(G),_.use(B),_.use(e),_.use(K),_.use(b),_.use(n),_.use(Z)},init:function(_){return w=_,Promise.resolve().then(()=>e.init(_.debug)).then(()=>b.init(_.device)).then(()=>n.init()).then(()=>E.init(n,e)).then(()=>r.init()).then(()=>a.init()).then(()=>R.init()).then(()=>O.init()).then(()=>M.init(b)).then(()=>Z.init(b)).then(()=>m.init(_.display)).then(()=>v.init()).then(()=>H.init()).then(()=>G.init()).then(()=>B.init()).then(()=>K.init())},getPlayerConfiguration:function(){return w}}}function B(){return n(u)}function K(){return n(L)}function b(){return n(c)}function Z(){return n(Y)}function w(){return n(y)}function X(){return n(C)}function k(){return n(d)}function z(){return n(f)}function x(){return n(D)}function J(){return n(s)}function j(){return n(I)}function q(){return n(g)}function Q(){return n(O)}function $(){return n(N)}function ee(){return n(h)}function ne(){return n(M)}function Ee(){return n(p)}!function(e){e[e.VERBOSE=2]="VERBOSE",e[e.DEBUG=3]="DEBUG",e[e.INFO=4]="INFO",e[e.WARN=5]="WARN",e[e.ERROR=6]="ERROR"}(F||(F={})),function(e){e.ES_PLAYER_DEVICE_TYPE_CH_9632="ZLM97Gi",e.ES_PLAYER_DEVICE_TYPE_CH_639="ZLS58Gi4X",e.ES_PLAYER_DEVICE_TYPE_CH_848="ZLS82GiT",e.ES_PLAYER_DEVICE_TYPE_CH_628="ZLS59GiD",e.ES_PLAYER_DEVICE_TYPE_CH_638="ZLS58Gi",e.ES_PLAYER_DEVICE_TYPE_CH_648="ZLS73GiH",e.ES_PLAYER_DEVICE_TYPE_CH_838="ZLS70Hi",e.ES_PLAYER_DEVICE_TYPE_CH_351P="XCH96B",e.ES_PLAYER_DEVICE_TYPE_CH_551P="ZLH74Gi2G",e.ES_PLAYER_DEVICE_TYPE_CH_551PR="ZLH74",e.ES_PLAYER_DEVICE_TYPE_CH_9255P="XCM105B",e.ES_PLAYER_DEVICE_TYPE_CH_5508="ZLM60HiS2",e.ES_PLAYER_DEVICE_TYPE_CH_5520="ZLM65HiS2",e.ES_PLAYER_DEVICE_TYPE_TCL_828="MS828",e.ES_PLAYER_DEVICE_TYPE_TCL_838P="MS838P",e.ES_PLAYER_DEVICE_TYPE_TCL_MT07="MT07",e.ES_PLAYER_DEVICE_TYPE_TCL_RT95="RT95",e.ES_PLAYER_DEVICE_TYPE_TCL_AM6C="AM6C",e.ES_PLAYER_DEVICE_TYPE_TCL_901="MS901",e.ES_PLAYER_DEVICE_TYPE_TCL_960="T960",e.ES_PLAYER_DEVICE_TYPE_TCL_962="T962",e.ES_PLAYER_DEVICE_TYPE_TCL_972="x32a0",e.ES_PLAYER_DEVICE_TYPE_TCL_848="MT848C-P5",e.ES_PLAYER_DEVICE_TYPE_TCL_963="T963-F9",e.ES_PLAYER_DEVICE_TYPE_TCL_920="T920-F6F",e.ES_PLAYER_DEVICE_TYPE_TCL_938="MS938-X6",e.ES_PLAYER_DEVICE_TYPE_TCL_838C="MS838C",e.ES_PLAYER_DEVICE_TYPE_TCL_811="V811"}(V||(V={}));class _e{getId(){return""}setEnabled(e){}isEnabled(){return!1}setPlayer(e){}getPlayer(){return null}onPlayerInitialized(e){}onPlayerPlayMediaSourceList(e){}onPlayerPlayMediaSource(e){}onPlayerInterceptSuccess(e){}onPlayerInterceptError(e){}onPlayerSizeChanged(e,n){}onPlayerPreparing(){}onPlayerPrepared(){}onPlayerBufferStart(){}onPlayerBufferEnd(){}onPlayerPlaying(){}onPlayerProgressChanged(e){}onPlayerDurationChanged(e){}onPlayerBufferPercentChanged(e){}onPlayerSeekStart(){}onPlayerSeekCompleted(){}onPlayerPaused(){}onPlayerResumed(){}onPlayerStopped(){}onPlayerCompleted(){}onPlayerControlled(e){}onPlayerError(e){}onPlayerInfo(e){}onPlayerNoMediaSourceCanPlay(e){}onPlayerVolumeChanged(e,n){}onPlayerLeftVolumeChanged(e){}onPlayerRightVolumeChanged(e){}onPlayerDefinitionListChanged(e){}onPlayerDefinitionChanged(e){}onPlayerPlayRateListChanged(e){}onPlayerPlayRateChanged(e){}onPlayerDecodeListChanged(e){}onPlayerDecodeChanged(e){}onPlayerAspectRatioListChanged(e){}onPlayerAspectRatioChanged(e){}onPlayerPlayMediaSourceListModeListChanged(e){}onPlayerPlayMediaSourceListModeChanged(e){}onPlayerRenderListChanged(e){}onPlayerRenderChanged(e){}onPlayerViewChanged(){}onPlayerViewSizeChanged(e,n){}onPlayerClickable(e){}onPlayerReset(){}onPlayerRelease(){}}!function(e){e[e.MEDIA_INFO_AUDIO_DATA_SWITCH_COMPLETE=10101]="MEDIA_INFO_AUDIO_DATA_SWITCH_COMPLETE",e[e.MEDIA_INFO_VIDEO_DATA_SWITCH_COMPLETE=10102]="MEDIA_INFO_VIDEO_DATA_SWITCH_COMPLETE",e[e.MEDIA_INFO_AUDIO_RENDER_SWITCH_COMPLETE=10103]="MEDIA_INFO_AUDIO_RENDER_SWITCH_COMPLETE",e[e.MEDIA_INFO_VIDEO_RENDER_SWITCH_COMPLETE=10104]="MEDIA_INFO_VIDEO_RENDER_SWITCH_COMPLETE",e[e.MEDIA_INFO_MULTIPLE_HLS_FIRST_CHOOSE=10105]="MEDIA_INFO_MULTIPLE_HLS_FIRST_CHOOSE"}(m||(m={})),function(e){e[e.ES_PLAYER_OPTION_TYPE_INT=0]="ES_PLAYER_OPTION_TYPE_INT",e[e.ES_PLAYER_OPTION_TYPE_STRING=1]="ES_PLAYER_OPTION_TYPE_STRING"}(v||(v={})),function(e){e[e.ES_PLAYER_OPTION_CATEGORY_FORMAT=1]="ES_PLAYER_OPTION_CATEGORY_FORMAT",e[e.ES_PLAYER_OPTION_CATEGORY_CODEC=2]="ES_PLAYER_OPTION_CATEGORY_CODEC",e[e.ES_PLAYER_OPTION_CATEGORY_SWS=3]="ES_PLAYER_OPTION_CATEGORY_SWS",e[e.ES_PLAYER_OPTION_CATEGORY_PLAYER=4]="ES_PLAYER_OPTION_CATEGORY_PLAYER"}(H||(H={}));const te=-2;var oe,Pe,re;!function(e){e[e.VIDEO=1]="VIDEO",e[e.AUDIO=2]="AUDIO",e[e.SUBTITLE=3]="SUBTITLE"}(oe||(oe={})),function(e){e[e.GRAPH=0]="GRAPH",e[e.TEXT=1]="TEXT"}(Pe||(Pe={})),function(e){e[e.ES_PLAYER_TRACK_TYPE_VIDEO=1]="ES_PLAYER_TRACK_TYPE_VIDEO",e[e.ES_PLAYER_TRACK_TYPE_AUDIO=2]="ES_PLAYER_TRACK_TYPE_AUDIO",e[e.ES_PLAYER_TRACK_TYPE_SUBTITLE=3]="ES_PLAYER_TRACK_TYPE_SUBTITLE"}(re||(re={}));export{P as ESPlayerAspectRatio,_ as ESPlayerDecode,t as ESPlayerDefinition,A as ESPlayerDefinitionStrategy,V as ESPlayerDeviceType,a as ESPlayerErrors,_e as ESPlayerEventDefaultListener,m as ESPlayerInfoCode,R as ESPlayerInterceptorType,F as ESPlayerLogLevel,H as ESPlayerOptionCategory,v as ESPlayerOptionType,l as ESPlayerPlayMode,o as ESPlayerRate,i as ESPlayerRender,E as ESPlayerState,re as ESPlayerTrackType,T as ESPlayerType,S as ESPlayerVolume,r as ESPlayerWindowType,te as HLS_ADAPTIVE_NUMBER,Pe as SubType,oe as TrackType,G as createESPlayer,B as useESPlayer,b as useESPlayerAspectRatioManager,$ as useESPlayerCacheManager,X as useESPlayerDecodeManager,K as useESPlayerDefinitionManager,ee as useESPlayerDeviceManager,k as useESPlayerDisplayManager,J as useESPlayerEventManager,x as useESPlayerInterceptorManager,ne as useESPlayerLocalStorageManager,Q as useESPlayerLog,j as useESPlayerPlayModeManager,z as useESPlayerRateManager,Z as useESPlayerRenderManager,Ee as useESPlayerTypeManager,q as useESPlayerViewManager,w as useESPlayerVolumeManager};