xgplayer 3.0.0-alpha.99-11 → 3.0.0-codec.110
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/CHANGELOG.md +133 -0
- package/package.json +13 -11
- package/types/index.d.ts +480 -204
- package/browser/index.min.js +0 -1
- package/browser/xgplayer.min.css +0 -1
- package/dist/index.min.js +0 -1
- package/dist/xgplayer.css +0 -1921
- package/dist/xgplayer.live.css +0 -1840
- package/dist/xgplayer.live.min.css +0 -1
- package/dist/xgplayer.min.css +0 -1
- package/dist/xgplayer.mobile.css +0 -1585
- package/dist/xgplayer.mobile.min.css +0 -1
- package/dist/xgplayer.vod.css +0 -1921
- package/dist/xgplayer.vod.min.css +0 -1
- package/es/constant.d.ts +0 -3
- package/es/constant.js +0 -3
- package/es/defaultConfig.d.ts +0 -197
- package/es/defaultConfig.js +0 -213
- package/es/error.d.ts +0 -112
- package/es/error.js +0 -155
- package/es/events.d.ts +0 -48
- package/es/events.js +0 -56
- package/es/index-umd.d.ts +0 -57
- package/es/index-umd.js +0 -64
- package/es/index.d.ts +0 -11
- package/es/index.js +0 -11
- package/es/lang/en.d.ts +0 -91
- package/es/lang/en.js +0 -76
- package/es/lang/i18n.d.ts +0 -19
- package/es/lang/i18n.js +0 -125
- package/es/lang/index.d.ts +0 -2
- package/es/lang/index.js +0 -2
- package/es/lang/jp.d.ts +0 -91
- package/es/lang/jp.js +0 -76
- package/es/lang/zh-cn.d.ts +0 -91
- package/es/lang/zh-cn.js +0 -76
- package/es/lang/zh-hk.d.ts +0 -91
- package/es/lang/zh-hk.js +0 -76
- package/es/player.d.ts +0 -591
- package/es/player.js +0 -2263
- package/es/plugin/basePlugin.d.ts +0 -167
- package/es/plugin/basePlugin.js +0 -435
- package/es/plugin/hooksDescriptor.d.ts +0 -59
- package/es/plugin/hooksDescriptor.js +0 -216
- package/es/plugin/index.d.ts +0 -12
- package/es/plugin/index.js +0 -10
- package/es/plugin/plugin.d.ts +0 -201
- package/es/plugin/plugin.js +0 -833
- package/es/plugin/pluginsManager.d.ts +0 -93
- package/es/plugin/pluginsManager.js +0 -394
- package/es/plugin/preset.d.ts +0 -1
- package/es/plugin/preset.js +0 -54
- package/es/plugin/resizeObserver.d.ts +0 -3
- package/es/plugin/resizeObserver.js +0 -147
- package/es/plugins/assets/back.svg +0 -5
- package/es/plugins/assets/download.svg +0 -14
- package/es/plugins/assets/exitCssFull.svg +0 -3
- package/es/plugins/assets/exitFull.svg +0 -3
- package/es/plugins/assets/loading.svg +0 -3
- package/es/plugins/assets/mobile/mPause.svg +0 -17
- package/es/plugins/assets/mobile/mPlay.svg +0 -19
- package/es/plugins/assets/mobile/mPlayNext.svg +0 -17
- package/es/plugins/assets/panel.svg +0 -4
- package/es/plugins/assets/pause.svg +0 -3
- package/es/plugins/assets/pipIcon.svg +0 -5
- package/es/plugins/assets/pipIconExit.svg +0 -8
- package/es/plugins/assets/play.svg +0 -3
- package/es/plugins/assets/playNext.svg +0 -3
- package/es/plugins/assets/replay.svg +0 -3
- package/es/plugins/assets/requestCssFull.svg +0 -3
- package/es/plugins/assets/requestFull.svg +0 -3
- package/es/plugins/assets/rotate.svg +0 -11
- package/es/plugins/assets/seekicon.svg +0 -7
- package/es/plugins/assets/volumeLarge.svg +0 -4
- package/es/plugins/assets/volumeMuted.svg +0 -4
- package/es/plugins/assets/volumeSmall.svg +0 -4
- package/es/plugins/common/index.css +0 -128
- package/es/plugins/common/optionList.d.ts +0 -14
- package/es/plugins/common/optionList.js +0 -128
- package/es/plugins/common/optionsIcon.css +0 -125
- package/es/plugins/common/optionsIcon.d.ts +0 -30
- package/es/plugins/common/optionsIcon.js +0 -264
- package/es/plugins/common/thumbnail.css +0 -2
- package/es/plugins/common/thumbnail.d.ts +0 -60
- package/es/plugins/common/thumbnail.js +0 -241
- package/es/plugins/controls/index.css +0 -151
- package/es/plugins/controls/index.d.ts +0 -55
- package/es/plugins/controls/index.js +0 -312
- package/es/plugins/cssFullScreen/index.css +0 -11
- package/es/plugins/cssFullScreen/index.d.ts +0 -27
- package/es/plugins/cssFullScreen/index.js +0 -166
- package/es/plugins/danmu/danmuIcon.d.ts +0 -13
- package/es/plugins/danmu/danmuIcon.js +0 -122
- package/es/plugins/danmu/danmuPanel.d.ts +0 -38
- package/es/plugins/danmu/danmuPanel.js +0 -127
- package/es/plugins/danmu/index.css +0 -553
- package/es/plugins/danmu/index.d.ts +0 -94
- package/es/plugins/danmu/index.js +0 -426
- package/es/plugins/definition/index.css +0 -3
- package/es/plugins/definition/index.d.ts +0 -53
- package/es/plugins/definition/index.js +0 -289
- package/es/plugins/download/index.css +0 -10
- package/es/plugins/download/index.d.ts +0 -26
- package/es/plugins/download/index.js +0 -147
- package/es/plugins/dynamicBg/index.css +0 -15
- package/es/plugins/dynamicBg/index.d.ts +0 -63
- package/es/plugins/dynamicBg/index.js +0 -411
- package/es/plugins/enter/index.css +0 -130
- package/es/plugins/enter/index.d.ts +0 -18
- package/es/plugins/enter/index.js +0 -86
- package/es/plugins/error/index.css +0 -32
- package/es/plugins/error/index.d.ts +0 -8
- package/es/plugins/error/index.js +0 -112
- package/es/plugins/fullscreen/backicon.d.ts +0 -9
- package/es/plugins/fullscreen/backicon.js +0 -102
- package/es/plugins/fullscreen/index.css +0 -21
- package/es/plugins/fullscreen/index.d.ts +0 -59
- package/es/plugins/fullscreen/index.js +0 -364
- package/es/plugins/keyboard/index.d.ts +0 -68
- package/es/plugins/keyboard/index.js +0 -385
- package/es/plugins/loading/index.css +0 -82
- package/es/plugins/loading/index.d.ts +0 -7
- package/es/plugins/loading/index.js +0 -71
- package/es/plugins/logger/index.d.ts +0 -30
- package/es/plugins/logger/index.js +0 -237
- package/es/plugins/miniScreen/index.css +0 -164
- package/es/plugins/miniScreen/index.d.ts +0 -56
- package/es/plugins/miniScreen/index.js +0 -298
- package/es/plugins/miniScreen/miniScreenIcon.d.ts +0 -10
- package/es/plugins/miniScreen/miniScreenIcon.js +0 -82
- package/es/plugins/mobile/index.css +0 -134
- package/es/plugins/mobile/index.d.ts +0 -119
- package/es/plugins/mobile/index.js +0 -858
- package/es/plugins/mobile/touch.d.ts +0 -43
- package/es/plugins/mobile/touch.js +0 -277
- package/es/plugins/netAdaption/index.d.ts +0 -5
- package/es/plugins/netAdaption/index.js +0 -76
- package/es/plugins/pc/index.css +0 -2
- package/es/plugins/pc/index.d.ts +0 -16
- package/es/plugins/pc/index.js +0 -272
- package/es/plugins/pip/index.css +0 -11
- package/es/plugins/pip/index.d.ts +0 -25
- package/es/plugins/pip/index.js +0 -293
- package/es/plugins/play/index.css +0 -11
- package/es/plugins/play/index.d.ts +0 -12
- package/es/plugins/play/index.js +0 -148
- package/es/plugins/playNext/index.css +0 -16
- package/es/plugins/playNext/index.d.ts +0 -15
- package/es/plugins/playNext/index.js +0 -139
- package/es/plugins/playbackRate/index.css +0 -3
- package/es/plugins/playbackRate/index.d.ts +0 -28
- package/es/plugins/playbackRate/index.js +0 -174
- package/es/plugins/poster/index.css +0 -33
- package/es/plugins/poster/index.d.ts +0 -24
- package/es/plugins/poster/index.js +0 -155
- package/es/plugins/progress/index.css +0 -212
- package/es/plugins/progress/index.d.ts +0 -151
- package/es/plugins/progress/index.js +0 -796
- package/es/plugins/progress/innerList.d.ts +0 -37
- package/es/plugins/progress/innerList.js +0 -232
- package/es/plugins/progress/miniProgress.d.ts +0 -8
- package/es/plugins/progress/miniProgress.js +0 -84
- package/es/plugins/progressPreview/dotsApi.d.ts +0 -1
- package/es/plugins/progressPreview/dotsApi.js +0 -260
- package/es/plugins/progressPreview/index.css +0 -152
- package/es/plugins/progressPreview/index.d.ts +0 -64
- package/es/plugins/progressPreview/index.js +0 -407
- package/es/plugins/prompt/index.css +0 -47
- package/es/plugins/prompt/index.d.ts +0 -21
- package/es/plugins/prompt/index.js +0 -148
- package/es/plugins/replay/index.css +0 -39
- package/es/plugins/replay/index.d.ts +0 -11
- package/es/plugins/replay/index.js +0 -144
- package/es/plugins/rotate/index.css +0 -0
- package/es/plugins/rotate/index.d.ts +0 -16
- package/es/plugins/rotate/index.js +0 -190
- package/es/plugins/screenShot/index.css +0 -2
- package/es/plugins/screenShot/index.d.ts +0 -25
- package/es/plugins/screenShot/index.js +0 -177
- package/es/plugins/start/index.css +0 -98
- package/es/plugins/start/index.d.ts +0 -26
- package/es/plugins/start/index.js +0 -310
- package/es/plugins/time/index.css +0 -24
- package/es/plugins/time/index.d.ts +0 -24
- package/es/plugins/time/index.js +0 -252
- package/es/plugins/track/index.css +0 -5
- package/es/plugins/track/index.d.ts +0 -79
- package/es/plugins/track/index.js +0 -404
- package/es/plugins/volume/index.css +0 -89
- package/es/plugins/volume/index.d.ts +0 -42
- package/es/plugins/volume/index.js +0 -322
- package/es/presets/default-en.d.ts +0 -30
- package/es/presets/default-en.js +0 -84
- package/es/presets/default.css +0 -1921
- package/es/presets/default.d.ts +0 -105
- package/es/presets/default.js +0 -89
- package/es/presets/live.css +0 -1840
- package/es/presets/live.d.ts +0 -94
- package/es/presets/live.js +0 -52
- package/es/presets/mobile.css +0 -1585
- package/es/presets/mobile.d.ts +0 -103
- package/es/presets/mobile.js +0 -41
- package/es/proxy.d.ts +0 -311
- package/es/proxy.js +0 -932
- package/es/stateClassMap.d.ts +0 -30
- package/es/stateClassMap.js +0 -30
- package/es/style/common/animation.css +0 -27
- package/es/style/common/svg-url.css +0 -0
- package/es/style/common.css +0 -276
- package/es/style/index.css +0 -405
- package/es/style/variable.css +0 -0
- package/es/utils/database.d.ts +0 -31
- package/es/utils/database.js +0 -147
- package/es/utils/debug.d.ts +0 -10
- package/es/utils/debug.js +0 -53
- package/es/utils/draggabilly.d.ts +0 -54
- package/es/utils/draggabilly.js +0 -548
- package/es/utils/sniffer.d.ts +0 -21
- package/es/utils/sniffer.js +0 -113
- package/es/utils/url.d.ts +0 -1
- package/es/utils/url.js +0 -10
- package/es/utils/util.d.ts +0 -241
- package/es/utils/util.js +0 -875
- package/es/utils/xgplayerTimeRange.d.ts +0 -7
- package/es/utils/xgplayerTimeRange.js +0 -34
- package/es/version.d.ts +0 -5
- package/es/version.js +0 -5
- package/es/xgplayer.d.ts +0 -16
- package/es/xgplayer.js +0 -34
- package/lib/constant.js +0 -12
- package/lib/defaultConfig.js +0 -220
- package/lib/error.js +0 -166
- package/lib/events.js +0 -110
- package/lib/index-umd.js +0 -87
- package/lib/index.js +0 -90
- package/lib/lang/en.js +0 -83
- package/lib/lang/i18n.js +0 -136
- package/lib/lang/index.js +0 -13
- package/lib/lang/jp.js +0 -83
- package/lib/lang/zh-cn.js +0 -83
- package/lib/lang/zh-hk.js +0 -83
- package/lib/player.js +0 -2367
- package/lib/plugin/basePlugin.js +0 -482
- package/lib/plugin/hooksDescriptor.js +0 -227
- package/lib/plugin/index.js +0 -94
- package/lib/plugin/plugin.js +0 -851
- package/lib/plugin/pluginsManager.js +0 -402
- package/lib/plugin/preset.js +0 -63
- package/lib/plugin/resizeObserver.js +0 -154
- package/lib/plugins/assets/back.svg +0 -5
- package/lib/plugins/assets/download.svg +0 -14
- package/lib/plugins/assets/exitCssFull.svg +0 -3
- package/lib/plugins/assets/exitFull.svg +0 -3
- package/lib/plugins/assets/loading.svg +0 -3
- package/lib/plugins/assets/mobile/mPause.svg +0 -17
- package/lib/plugins/assets/mobile/mPlay.svg +0 -19
- package/lib/plugins/assets/mobile/mPlayNext.svg +0 -17
- package/lib/plugins/assets/panel.svg +0 -4
- package/lib/plugins/assets/pause.svg +0 -3
- package/lib/plugins/assets/pipIcon.svg +0 -5
- package/lib/plugins/assets/pipIconExit.svg +0 -8
- package/lib/plugins/assets/play.svg +0 -3
- package/lib/plugins/assets/playNext.svg +0 -3
- package/lib/plugins/assets/replay.svg +0 -3
- package/lib/plugins/assets/requestCssFull.svg +0 -3
- package/lib/plugins/assets/requestFull.svg +0 -3
- package/lib/plugins/assets/rotate.svg +0 -11
- package/lib/plugins/assets/seekicon.svg +0 -7
- package/lib/plugins/assets/volumeLarge.svg +0 -4
- package/lib/plugins/assets/volumeMuted.svg +0 -4
- package/lib/plugins/assets/volumeSmall.svg +0 -4
- package/lib/plugins/common/index.css +0 -128
- package/lib/plugins/common/optionList.js +0 -145
- package/lib/plugins/common/optionsIcon.css +0 -125
- package/lib/plugins/common/optionsIcon.js +0 -278
- package/lib/plugins/common/thumbnail.css +0 -2
- package/lib/plugins/common/thumbnail.js +0 -253
- package/lib/plugins/controls/index.css +0 -151
- package/lib/plugins/controls/index.js +0 -326
- package/lib/plugins/cssFullScreen/index.css +0 -11
- package/lib/plugins/cssFullScreen/index.js +0 -178
- package/lib/plugins/danmu/danmuIcon.js +0 -135
- package/lib/plugins/danmu/danmuPanel.js +0 -140
- package/lib/plugins/danmu/index.css +0 -553
- package/lib/plugins/danmu/index.js +0 -456
- package/lib/plugins/definition/index.css +0 -3
- package/lib/plugins/definition/index.js +0 -299
- package/lib/plugins/download/index.css +0 -10
- package/lib/plugins/download/index.js +0 -162
- package/lib/plugins/dynamicBg/index.css +0 -15
- package/lib/plugins/dynamicBg/index.js +0 -428
- package/lib/plugins/enter/index.css +0 -130
- package/lib/plugins/enter/index.js +0 -99
- package/lib/plugins/error/index.css +0 -32
- package/lib/plugins/error/index.js +0 -123
- package/lib/plugins/fullscreen/backicon.js +0 -114
- package/lib/plugins/fullscreen/index.css +0 -21
- package/lib/plugins/fullscreen/index.js +0 -379
- package/lib/plugins/keyboard/index.js +0 -393
- package/lib/plugins/loading/index.css +0 -82
- package/lib/plugins/loading/index.js +0 -84
- package/lib/plugins/logger/index.js +0 -252
- package/lib/plugins/miniScreen/index.css +0 -164
- package/lib/plugins/miniScreen/index.js +0 -323
- package/lib/plugins/miniScreen/miniScreenIcon.js +0 -94
- package/lib/plugins/mobile/index.css +0 -134
- package/lib/plugins/mobile/index.js +0 -874
- package/lib/plugins/mobile/touch.js +0 -285
- package/lib/plugins/netAdaption/index.js +0 -84
- package/lib/plugins/pc/index.css +0 -2
- package/lib/plugins/pc/index.js +0 -281
- package/lib/plugins/pip/index.css +0 -11
- package/lib/plugins/pip/index.js +0 -308
- package/lib/plugins/play/index.css +0 -11
- package/lib/plugins/play/index.js +0 -161
- package/lib/plugins/playNext/index.css +0 -16
- package/lib/plugins/playNext/index.js +0 -148
- package/lib/plugins/playbackRate/index.css +0 -3
- package/lib/plugins/playbackRate/index.js +0 -184
- package/lib/plugins/poster/index.css +0 -33
- package/lib/plugins/poster/index.js +0 -168
- package/lib/plugins/progress/index.css +0 -212
- package/lib/plugins/progress/index.js +0 -819
- package/lib/plugins/progress/innerList.js +0 -241
- package/lib/plugins/progress/miniProgress.js +0 -94
- package/lib/plugins/progressPreview/dotsApi.js +0 -271
- package/lib/plugins/progressPreview/index.css +0 -152
- package/lib/plugins/progressPreview/index.js +0 -431
- package/lib/plugins/prompt/index.css +0 -47
- package/lib/plugins/prompt/index.js +0 -163
- package/lib/plugins/replay/index.css +0 -39
- package/lib/plugins/replay/index.js +0 -159
- package/lib/plugins/rotate/index.css +0 -0
- package/lib/plugins/rotate/index.js +0 -203
- package/lib/plugins/screenShot/index.css +0 -2
- package/lib/plugins/screenShot/index.js +0 -188
- package/lib/plugins/start/index.css +0 -98
- package/lib/plugins/start/index.js +0 -326
- package/lib/plugins/time/index.css +0 -24
- package/lib/plugins/time/index.js +0 -273
- package/lib/plugins/track/index.css +0 -5
- package/lib/plugins/track/index.js +0 -415
- package/lib/plugins/volume/index.css +0 -89
- package/lib/plugins/volume/index.js +0 -340
- package/lib/presets/default-en.js +0 -121
- package/lib/presets/default.css +0 -1921
- package/lib/presets/default.js +0 -127
- package/lib/presets/live.css +0 -1840
- package/lib/presets/live.js +0 -77
- package/lib/presets/mobile.css +0 -1585
- package/lib/presets/mobile.js +0 -73
- package/lib/proxy.js +0 -950
- package/lib/stateClassMap.js +0 -37
- package/lib/style/common/animation.css +0 -27
- package/lib/style/common/svg-url.css +0 -0
- package/lib/style/common.css +0 -276
- package/lib/style/index.css +0 -405
- package/lib/style/variable.css +0 -0
- package/lib/utils/database.js +0 -155
- package/lib/utils/debug.js +0 -59
- package/lib/utils/draggabilly.js +0 -557
- package/lib/utils/sniffer.js +0 -121
- package/lib/utils/url.js +0 -19
- package/lib/utils/util.js +0 -888
- package/lib/utils/xgplayerTimeRange.js +0 -41
- package/lib/version.js +0 -13
- package/lib/xgplayer.js +0 -90
- package/xgplayer3/dist/index.min.js +0 -1
- package/xgplayer3/dist/xgplayer.css +0 -1921
- package/xgplayer3/dist/xgplayer.live.css +0 -1840
- package/xgplayer3/dist/xgplayer.live.min.css +0 -1
- package/xgplayer3/dist/xgplayer.min.css +0 -1
- package/xgplayer3/dist/xgplayer.mobile.css +0 -1585
- package/xgplayer3/dist/xgplayer.mobile.min.css +0 -1
- package/xgplayer3/dist/xgplayer.vod.css +0 -1921
- package/xgplayer3/dist/xgplayer.vod.min.css +0 -1
- package/xgplayer3/es/constant.d.ts +0 -3
- package/xgplayer3/es/constant.js +0 -3
- package/xgplayer3/es/defaultConfig.d.ts +0 -197
- package/xgplayer3/es/defaultConfig.js +0 -213
- package/xgplayer3/es/error.d.ts +0 -112
- package/xgplayer3/es/error.js +0 -154
- package/xgplayer3/es/events.d.ts +0 -48
- package/xgplayer3/es/events.js +0 -56
- package/xgplayer3/es/index-umd.d.ts +0 -57
- package/xgplayer3/es/index-umd.js +0 -64
- package/xgplayer3/es/index.d.ts +0 -11
- package/xgplayer3/es/index.js +0 -11
- package/xgplayer3/es/lang/en.d.ts +0 -91
- package/xgplayer3/es/lang/en.js +0 -76
- package/xgplayer3/es/lang/i18n.d.ts +0 -19
- package/xgplayer3/es/lang/i18n.js +0 -125
- package/xgplayer3/es/lang/index.d.ts +0 -2
- package/xgplayer3/es/lang/index.js +0 -2
- package/xgplayer3/es/lang/jp.d.ts +0 -91
- package/xgplayer3/es/lang/jp.js +0 -76
- package/xgplayer3/es/lang/zh-cn.d.ts +0 -91
- package/xgplayer3/es/lang/zh-cn.js +0 -76
- package/xgplayer3/es/lang/zh-hk.d.ts +0 -91
- package/xgplayer3/es/lang/zh-hk.js +0 -76
- package/xgplayer3/es/player.d.ts +0 -609
- package/xgplayer3/es/player.js +0 -2335
- package/xgplayer3/es/plugin/basePlugin.d.ts +0 -167
- package/xgplayer3/es/plugin/basePlugin.js +0 -429
- package/xgplayer3/es/plugin/hooksDescriptor.d.ts +0 -59
- package/xgplayer3/es/plugin/hooksDescriptor.js +0 -216
- package/xgplayer3/es/plugin/index.d.ts +0 -12
- package/xgplayer3/es/plugin/index.js +0 -10
- package/xgplayer3/es/plugin/plugin.d.ts +0 -201
- package/xgplayer3/es/plugin/plugin.js +0 -833
- package/xgplayer3/es/plugin/pluginsManager.d.ts +0 -93
- package/xgplayer3/es/plugin/pluginsManager.js +0 -394
- package/xgplayer3/es/plugin/preset.d.ts +0 -1
- package/xgplayer3/es/plugin/preset.js +0 -54
- package/xgplayer3/es/plugin/resizeObserver.d.ts +0 -3
- package/xgplayer3/es/plugin/resizeObserver.js +0 -147
- package/xgplayer3/es/plugins/assets/back.svg +0 -5
- package/xgplayer3/es/plugins/assets/download.svg +0 -14
- package/xgplayer3/es/plugins/assets/exitCssFull.svg +0 -3
- package/xgplayer3/es/plugins/assets/exitFull.svg +0 -3
- package/xgplayer3/es/plugins/assets/loading.svg +0 -3
- package/xgplayer3/es/plugins/assets/mobile/mPause.svg +0 -17
- package/xgplayer3/es/plugins/assets/mobile/mPlay.svg +0 -19
- package/xgplayer3/es/plugins/assets/mobile/mPlayNext.svg +0 -17
- package/xgplayer3/es/plugins/assets/panel.svg +0 -4
- package/xgplayer3/es/plugins/assets/pause.svg +0 -3
- package/xgplayer3/es/plugins/assets/pipIcon.svg +0 -5
- package/xgplayer3/es/plugins/assets/pipIconExit.svg +0 -8
- package/xgplayer3/es/plugins/assets/play.svg +0 -3
- package/xgplayer3/es/plugins/assets/playNext.svg +0 -3
- package/xgplayer3/es/plugins/assets/replay.svg +0 -3
- package/xgplayer3/es/plugins/assets/requestCssFull.svg +0 -3
- package/xgplayer3/es/plugins/assets/requestFull.svg +0 -3
- package/xgplayer3/es/plugins/assets/rotate.svg +0 -11
- package/xgplayer3/es/plugins/assets/seekicon.svg +0 -7
- package/xgplayer3/es/plugins/assets/volumeLarge.svg +0 -4
- package/xgplayer3/es/plugins/assets/volumeMuted.svg +0 -4
- package/xgplayer3/es/plugins/assets/volumeSmall.svg +0 -4
- package/xgplayer3/es/plugins/common/index.css +0 -128
- package/xgplayer3/es/plugins/common/optionList.d.ts +0 -14
- package/xgplayer3/es/plugins/common/optionList.js +0 -128
- package/xgplayer3/es/plugins/common/optionsIcon.css +0 -125
- package/xgplayer3/es/plugins/common/optionsIcon.d.ts +0 -30
- package/xgplayer3/es/plugins/common/optionsIcon.js +0 -264
- package/xgplayer3/es/plugins/common/thumbnail.css +0 -2
- package/xgplayer3/es/plugins/common/thumbnail.d.ts +0 -60
- package/xgplayer3/es/plugins/common/thumbnail.js +0 -241
- package/xgplayer3/es/plugins/controls/index.css +0 -151
- package/xgplayer3/es/plugins/controls/index.d.ts +0 -55
- package/xgplayer3/es/plugins/controls/index.js +0 -312
- package/xgplayer3/es/plugins/cssFullScreen/index.css +0 -11
- package/xgplayer3/es/plugins/cssFullScreen/index.d.ts +0 -27
- package/xgplayer3/es/plugins/cssFullScreen/index.js +0 -166
- package/xgplayer3/es/plugins/danmu/danmuIcon.d.ts +0 -13
- package/xgplayer3/es/plugins/danmu/danmuIcon.js +0 -122
- package/xgplayer3/es/plugins/danmu/danmuPanel.d.ts +0 -38
- package/xgplayer3/es/plugins/danmu/danmuPanel.js +0 -127
- package/xgplayer3/es/plugins/danmu/index.css +0 -553
- package/xgplayer3/es/plugins/danmu/index.d.ts +0 -94
- package/xgplayer3/es/plugins/danmu/index.js +0 -426
- package/xgplayer3/es/plugins/definition/index.css +0 -3
- package/xgplayer3/es/plugins/definition/index.d.ts +0 -53
- package/xgplayer3/es/plugins/definition/index.js +0 -289
- package/xgplayer3/es/plugins/download/index.css +0 -10
- package/xgplayer3/es/plugins/download/index.d.ts +0 -26
- package/xgplayer3/es/plugins/download/index.js +0 -147
- package/xgplayer3/es/plugins/dynamicBg/index.css +0 -15
- package/xgplayer3/es/plugins/dynamicBg/index.d.ts +0 -63
- package/xgplayer3/es/plugins/dynamicBg/index.js +0 -411
- package/xgplayer3/es/plugins/enter/index.css +0 -130
- package/xgplayer3/es/plugins/enter/index.d.ts +0 -18
- package/xgplayer3/es/plugins/enter/index.js +0 -86
- package/xgplayer3/es/plugins/error/index.css +0 -32
- package/xgplayer3/es/plugins/error/index.d.ts +0 -8
- package/xgplayer3/es/plugins/error/index.js +0 -112
- package/xgplayer3/es/plugins/fullscreen/backicon.d.ts +0 -9
- package/xgplayer3/es/plugins/fullscreen/backicon.js +0 -102
- package/xgplayer3/es/plugins/fullscreen/index.css +0 -21
- package/xgplayer3/es/plugins/fullscreen/index.d.ts +0 -59
- package/xgplayer3/es/plugins/fullscreen/index.js +0 -364
- package/xgplayer3/es/plugins/keyboard/index.d.ts +0 -68
- package/xgplayer3/es/plugins/keyboard/index.js +0 -385
- package/xgplayer3/es/plugins/loading/index.css +0 -82
- package/xgplayer3/es/plugins/loading/index.d.ts +0 -7
- package/xgplayer3/es/plugins/loading/index.js +0 -71
- package/xgplayer3/es/plugins/logger/index.d.ts +0 -30
- package/xgplayer3/es/plugins/logger/index.js +0 -237
- package/xgplayer3/es/plugins/miniScreen/index.css +0 -164
- package/xgplayer3/es/plugins/miniScreen/index.d.ts +0 -56
- package/xgplayer3/es/plugins/miniScreen/index.js +0 -298
- package/xgplayer3/es/plugins/miniScreen/miniScreenIcon.d.ts +0 -10
- package/xgplayer3/es/plugins/miniScreen/miniScreenIcon.js +0 -82
- package/xgplayer3/es/plugins/mobile/index.css +0 -134
- package/xgplayer3/es/plugins/mobile/index.d.ts +0 -119
- package/xgplayer3/es/plugins/mobile/index.js +0 -858
- package/xgplayer3/es/plugins/mobile/touch.d.ts +0 -43
- package/xgplayer3/es/plugins/mobile/touch.js +0 -277
- package/xgplayer3/es/plugins/netAdaption/index.d.ts +0 -5
- package/xgplayer3/es/plugins/netAdaption/index.js +0 -76
- package/xgplayer3/es/plugins/pc/index.css +0 -2
- package/xgplayer3/es/plugins/pc/index.d.ts +0 -16
- package/xgplayer3/es/plugins/pc/index.js +0 -272
- package/xgplayer3/es/plugins/pip/index.css +0 -11
- package/xgplayer3/es/plugins/pip/index.d.ts +0 -25
- package/xgplayer3/es/plugins/pip/index.js +0 -293
- package/xgplayer3/es/plugins/play/index.css +0 -11
- package/xgplayer3/es/plugins/play/index.d.ts +0 -12
- package/xgplayer3/es/plugins/play/index.js +0 -148
- package/xgplayer3/es/plugins/playNext/index.css +0 -16
- package/xgplayer3/es/plugins/playNext/index.d.ts +0 -15
- package/xgplayer3/es/plugins/playNext/index.js +0 -139
- package/xgplayer3/es/plugins/playbackRate/index.css +0 -3
- package/xgplayer3/es/plugins/playbackRate/index.d.ts +0 -28
- package/xgplayer3/es/plugins/playbackRate/index.js +0 -174
- package/xgplayer3/es/plugins/poster/index.css +0 -33
- package/xgplayer3/es/plugins/poster/index.d.ts +0 -24
- package/xgplayer3/es/plugins/poster/index.js +0 -155
- package/xgplayer3/es/plugins/progress/index.css +0 -212
- package/xgplayer3/es/plugins/progress/index.d.ts +0 -151
- package/xgplayer3/es/plugins/progress/index.js +0 -795
- package/xgplayer3/es/plugins/progress/innerList.d.ts +0 -37
- package/xgplayer3/es/plugins/progress/innerList.js +0 -232
- package/xgplayer3/es/plugins/progress/miniProgress.d.ts +0 -8
- package/xgplayer3/es/plugins/progress/miniProgress.js +0 -84
- package/xgplayer3/es/plugins/progressPreview/dotsApi.d.ts +0 -1
- package/xgplayer3/es/plugins/progressPreview/dotsApi.js +0 -260
- package/xgplayer3/es/plugins/progressPreview/index.css +0 -152
- package/xgplayer3/es/plugins/progressPreview/index.d.ts +0 -64
- package/xgplayer3/es/plugins/progressPreview/index.js +0 -407
- package/xgplayer3/es/plugins/prompt/index.css +0 -47
- package/xgplayer3/es/plugins/prompt/index.d.ts +0 -21
- package/xgplayer3/es/plugins/prompt/index.js +0 -148
- package/xgplayer3/es/plugins/replay/index.css +0 -39
- package/xgplayer3/es/plugins/replay/index.d.ts +0 -11
- package/xgplayer3/es/plugins/replay/index.js +0 -144
- package/xgplayer3/es/plugins/rotate/index.css +0 -0
- package/xgplayer3/es/plugins/rotate/index.d.ts +0 -16
- package/xgplayer3/es/plugins/rotate/index.js +0 -190
- package/xgplayer3/es/plugins/screenShot/index.css +0 -2
- package/xgplayer3/es/plugins/screenShot/index.d.ts +0 -25
- package/xgplayer3/es/plugins/screenShot/index.js +0 -177
- package/xgplayer3/es/plugins/start/index.css +0 -98
- package/xgplayer3/es/plugins/start/index.d.ts +0 -26
- package/xgplayer3/es/plugins/start/index.js +0 -310
- package/xgplayer3/es/plugins/time/index.css +0 -24
- package/xgplayer3/es/plugins/time/index.d.ts +0 -24
- package/xgplayer3/es/plugins/time/index.js +0 -252
- package/xgplayer3/es/plugins/track/index.css +0 -5
- package/xgplayer3/es/plugins/track/index.d.ts +0 -66
- package/xgplayer3/es/plugins/track/index.js +0 -346
- package/xgplayer3/es/plugins/volume/index.css +0 -89
- package/xgplayer3/es/plugins/volume/index.d.ts +0 -42
- package/xgplayer3/es/plugins/volume/index.js +0 -317
- package/xgplayer3/es/presets/default-en.d.ts +0 -30
- package/xgplayer3/es/presets/default-en.js +0 -84
- package/xgplayer3/es/presets/default.css +0 -1921
- package/xgplayer3/es/presets/default.d.ts +0 -105
- package/xgplayer3/es/presets/default.js +0 -89
- package/xgplayer3/es/presets/live.css +0 -1840
- package/xgplayer3/es/presets/live.d.ts +0 -94
- package/xgplayer3/es/presets/live.js +0 -52
- package/xgplayer3/es/presets/mobile.css +0 -1585
- package/xgplayer3/es/presets/mobile.d.ts +0 -103
- package/xgplayer3/es/presets/mobile.js +0 -41
- package/xgplayer3/es/proxy.d.ts +0 -283
- package/xgplayer3/es/proxy.js +0 -819
- package/xgplayer3/es/stateClassMap.d.ts +0 -30
- package/xgplayer3/es/stateClassMap.js +0 -30
- package/xgplayer3/es/style/common/animation.css +0 -27
- package/xgplayer3/es/style/common/svg-url.css +0 -0
- package/xgplayer3/es/style/common.css +0 -276
- package/xgplayer3/es/style/index.css +0 -405
- package/xgplayer3/es/style/variable.css +0 -0
- package/xgplayer3/es/utils/database.d.ts +0 -31
- package/xgplayer3/es/utils/database.js +0 -147
- package/xgplayer3/es/utils/debug.d.ts +0 -10
- package/xgplayer3/es/utils/debug.js +0 -53
- package/xgplayer3/es/utils/draggabilly.d.ts +0 -54
- package/xgplayer3/es/utils/draggabilly.js +0 -548
- package/xgplayer3/es/utils/sniffer.d.ts +0 -21
- package/xgplayer3/es/utils/sniffer.js +0 -113
- package/xgplayer3/es/utils/url.d.ts +0 -1
- package/xgplayer3/es/utils/url.js +0 -10
- package/xgplayer3/es/utils/util.d.ts +0 -241
- package/xgplayer3/es/utils/util.js +0 -875
- package/xgplayer3/es/utils/xgplayerTimeRange.d.ts +0 -7
- package/xgplayer3/es/utils/xgplayerTimeRange.js +0 -34
- package/xgplayer3/es/version.d.ts +0 -5
- package/xgplayer3/es/version.js +0 -5
- package/xgplayer3/es/xgplayer.d.ts +0 -16
- package/xgplayer3/es/xgplayer.js +0 -34
- package/xgplayer3/lib/constant.js +0 -12
- package/xgplayer3/lib/defaultConfig.js +0 -220
- package/xgplayer3/lib/error.js +0 -165
- package/xgplayer3/lib/events.js +0 -110
- package/xgplayer3/lib/index-umd.js +0 -87
- package/xgplayer3/lib/index.js +0 -90
- package/xgplayer3/lib/lang/en.js +0 -83
- package/xgplayer3/lib/lang/i18n.js +0 -136
- package/xgplayer3/lib/lang/index.js +0 -13
- package/xgplayer3/lib/lang/jp.js +0 -83
- package/xgplayer3/lib/lang/zh-cn.js +0 -83
- package/xgplayer3/lib/lang/zh-hk.js +0 -83
- package/xgplayer3/lib/player.js +0 -2439
- package/xgplayer3/lib/plugin/basePlugin.js +0 -476
- package/xgplayer3/lib/plugin/hooksDescriptor.js +0 -227
- package/xgplayer3/lib/plugin/index.js +0 -94
- package/xgplayer3/lib/plugin/plugin.js +0 -851
- package/xgplayer3/lib/plugin/pluginsManager.js +0 -402
- package/xgplayer3/lib/plugin/preset.js +0 -63
- package/xgplayer3/lib/plugin/resizeObserver.js +0 -154
- package/xgplayer3/lib/plugins/assets/back.svg +0 -5
- package/xgplayer3/lib/plugins/assets/download.svg +0 -14
- package/xgplayer3/lib/plugins/assets/exitCssFull.svg +0 -3
- package/xgplayer3/lib/plugins/assets/exitFull.svg +0 -3
- package/xgplayer3/lib/plugins/assets/loading.svg +0 -3
- package/xgplayer3/lib/plugins/assets/mobile/mPause.svg +0 -17
- package/xgplayer3/lib/plugins/assets/mobile/mPlay.svg +0 -19
- package/xgplayer3/lib/plugins/assets/mobile/mPlayNext.svg +0 -17
- package/xgplayer3/lib/plugins/assets/panel.svg +0 -4
- package/xgplayer3/lib/plugins/assets/pause.svg +0 -3
- package/xgplayer3/lib/plugins/assets/pipIcon.svg +0 -5
- package/xgplayer3/lib/plugins/assets/pipIconExit.svg +0 -8
- package/xgplayer3/lib/plugins/assets/play.svg +0 -3
- package/xgplayer3/lib/plugins/assets/playNext.svg +0 -3
- package/xgplayer3/lib/plugins/assets/replay.svg +0 -3
- package/xgplayer3/lib/plugins/assets/requestCssFull.svg +0 -3
- package/xgplayer3/lib/plugins/assets/requestFull.svg +0 -3
- package/xgplayer3/lib/plugins/assets/rotate.svg +0 -11
- package/xgplayer3/lib/plugins/assets/seekicon.svg +0 -7
- package/xgplayer3/lib/plugins/assets/volumeLarge.svg +0 -4
- package/xgplayer3/lib/plugins/assets/volumeMuted.svg +0 -4
- package/xgplayer3/lib/plugins/assets/volumeSmall.svg +0 -4
- package/xgplayer3/lib/plugins/common/index.css +0 -128
- package/xgplayer3/lib/plugins/common/optionList.js +0 -145
- package/xgplayer3/lib/plugins/common/optionsIcon.css +0 -125
- package/xgplayer3/lib/plugins/common/optionsIcon.js +0 -278
- package/xgplayer3/lib/plugins/common/thumbnail.css +0 -2
- package/xgplayer3/lib/plugins/common/thumbnail.js +0 -253
- package/xgplayer3/lib/plugins/controls/index.css +0 -151
- package/xgplayer3/lib/plugins/controls/index.js +0 -326
- package/xgplayer3/lib/plugins/cssFullScreen/index.css +0 -11
- package/xgplayer3/lib/plugins/cssFullScreen/index.js +0 -178
- package/xgplayer3/lib/plugins/danmu/danmuIcon.js +0 -135
- package/xgplayer3/lib/plugins/danmu/danmuPanel.js +0 -140
- package/xgplayer3/lib/plugins/danmu/index.css +0 -553
- package/xgplayer3/lib/plugins/danmu/index.js +0 -456
- package/xgplayer3/lib/plugins/definition/index.css +0 -3
- package/xgplayer3/lib/plugins/definition/index.js +0 -299
- package/xgplayer3/lib/plugins/download/index.css +0 -10
- package/xgplayer3/lib/plugins/download/index.js +0 -162
- package/xgplayer3/lib/plugins/dynamicBg/index.css +0 -15
- package/xgplayer3/lib/plugins/dynamicBg/index.js +0 -428
- package/xgplayer3/lib/plugins/enter/index.css +0 -130
- package/xgplayer3/lib/plugins/enter/index.js +0 -99
- package/xgplayer3/lib/plugins/error/index.css +0 -32
- package/xgplayer3/lib/plugins/error/index.js +0 -123
- package/xgplayer3/lib/plugins/fullscreen/backicon.js +0 -114
- package/xgplayer3/lib/plugins/fullscreen/index.css +0 -21
- package/xgplayer3/lib/plugins/fullscreen/index.js +0 -379
- package/xgplayer3/lib/plugins/keyboard/index.js +0 -393
- package/xgplayer3/lib/plugins/loading/index.css +0 -82
- package/xgplayer3/lib/plugins/loading/index.js +0 -84
- package/xgplayer3/lib/plugins/logger/index.js +0 -252
- package/xgplayer3/lib/plugins/miniScreen/index.css +0 -164
- package/xgplayer3/lib/plugins/miniScreen/index.js +0 -323
- package/xgplayer3/lib/plugins/miniScreen/miniScreenIcon.js +0 -94
- package/xgplayer3/lib/plugins/mobile/index.css +0 -134
- package/xgplayer3/lib/plugins/mobile/index.js +0 -874
- package/xgplayer3/lib/plugins/mobile/touch.js +0 -285
- package/xgplayer3/lib/plugins/netAdaption/index.js +0 -84
- package/xgplayer3/lib/plugins/pc/index.css +0 -2
- package/xgplayer3/lib/plugins/pc/index.js +0 -281
- package/xgplayer3/lib/plugins/pip/index.css +0 -11
- package/xgplayer3/lib/plugins/pip/index.js +0 -308
- package/xgplayer3/lib/plugins/play/index.css +0 -11
- package/xgplayer3/lib/plugins/play/index.js +0 -161
- package/xgplayer3/lib/plugins/playNext/index.css +0 -16
- package/xgplayer3/lib/plugins/playNext/index.js +0 -148
- package/xgplayer3/lib/plugins/playbackRate/index.css +0 -3
- package/xgplayer3/lib/plugins/playbackRate/index.js +0 -184
- package/xgplayer3/lib/plugins/poster/index.css +0 -33
- package/xgplayer3/lib/plugins/poster/index.js +0 -168
- package/xgplayer3/lib/plugins/progress/index.css +0 -212
- package/xgplayer3/lib/plugins/progress/index.js +0 -818
- package/xgplayer3/lib/plugins/progress/innerList.js +0 -241
- package/xgplayer3/lib/plugins/progress/miniProgress.js +0 -94
- package/xgplayer3/lib/plugins/progressPreview/dotsApi.js +0 -271
- package/xgplayer3/lib/plugins/progressPreview/index.css +0 -152
- package/xgplayer3/lib/plugins/progressPreview/index.js +0 -431
- package/xgplayer3/lib/plugins/prompt/index.css +0 -47
- package/xgplayer3/lib/plugins/prompt/index.js +0 -163
- package/xgplayer3/lib/plugins/replay/index.css +0 -39
- package/xgplayer3/lib/plugins/replay/index.js +0 -159
- package/xgplayer3/lib/plugins/rotate/index.css +0 -0
- package/xgplayer3/lib/plugins/rotate/index.js +0 -203
- package/xgplayer3/lib/plugins/screenShot/index.css +0 -2
- package/xgplayer3/lib/plugins/screenShot/index.js +0 -188
- package/xgplayer3/lib/plugins/start/index.css +0 -98
- package/xgplayer3/lib/plugins/start/index.js +0 -326
- package/xgplayer3/lib/plugins/time/index.css +0 -24
- package/xgplayer3/lib/plugins/time/index.js +0 -273
- package/xgplayer3/lib/plugins/track/index.css +0 -5
- package/xgplayer3/lib/plugins/track/index.js +0 -357
- package/xgplayer3/lib/plugins/volume/index.css +0 -89
- package/xgplayer3/lib/plugins/volume/index.js +0 -335
- package/xgplayer3/lib/presets/default-en.js +0 -121
- package/xgplayer3/lib/presets/default.css +0 -1921
- package/xgplayer3/lib/presets/default.js +0 -127
- package/xgplayer3/lib/presets/live.css +0 -1840
- package/xgplayer3/lib/presets/live.js +0 -77
- package/xgplayer3/lib/presets/mobile.css +0 -1585
- package/xgplayer3/lib/presets/mobile.js +0 -73
- package/xgplayer3/lib/proxy.js +0 -837
- package/xgplayer3/lib/stateClassMap.js +0 -37
- package/xgplayer3/lib/style/common/animation.css +0 -27
- package/xgplayer3/lib/style/common/svg-url.css +0 -0
- package/xgplayer3/lib/style/common.css +0 -276
- package/xgplayer3/lib/style/index.css +0 -405
- package/xgplayer3/lib/style/variable.css +0 -0
- package/xgplayer3/lib/utils/database.js +0 -155
- package/xgplayer3/lib/utils/debug.js +0 -59
- package/xgplayer3/lib/utils/draggabilly.js +0 -557
- package/xgplayer3/lib/utils/sniffer.js +0 -121
- package/xgplayer3/lib/utils/url.js +0 -19
- package/xgplayer3/lib/utils/util.js +0 -888
- package/xgplayer3/lib/utils/xgplayerTimeRange.js +0 -41
- package/xgplayer3/lib/version.js +0 -13
- package/xgplayer3/lib/xgplayer.js +0 -90
|
@@ -1,818 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _plugin = _interopRequireWildcard(require("../../plugin"));
|
|
9
|
-
|
|
10
|
-
var _innerList = _interopRequireDefault(require("./innerList"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
19
|
-
|
|
20
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
-
|
|
22
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
23
|
-
|
|
24
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
25
|
-
|
|
26
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
|
-
|
|
28
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
-
|
|
30
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
31
|
-
|
|
32
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
33
|
-
|
|
34
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
-
|
|
36
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
|
-
|
|
38
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
-
|
|
40
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @typedef {{
|
|
44
|
-
* position?:string,
|
|
45
|
-
* disable?: boolean,
|
|
46
|
-
* isDragingSeek?: boolean, // 是否在拖拽的过程中更新currentTime
|
|
47
|
-
* closeMoveSeek?: boolean, // 是否关闭滑块seek能力
|
|
48
|
-
* isPauseMoving?: boolean, // 是否在move的时候暂停视频内容
|
|
49
|
-
* isCloseClickSeek?: boolean, // 是否关闭点击进度条的时候seek
|
|
50
|
-
* fragments?: Array<{percent: number}>,
|
|
51
|
-
* miniMoveStep?: number,
|
|
52
|
-
* miniStartStep?: number,
|
|
53
|
-
* onMoveStart?: () => any, // 手势开始移动回调,
|
|
54
|
-
* onMoveEnd?: () => any, // 手势移动结束回调
|
|
55
|
-
* [propName: string]: any
|
|
56
|
-
* }} IProgressConfig
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* 进度条组件
|
|
61
|
-
*/
|
|
62
|
-
var Progress = /*#__PURE__*/function (_Plugin) {
|
|
63
|
-
_inherits(Progress, _Plugin);
|
|
64
|
-
|
|
65
|
-
var _super = _createSuper(Progress);
|
|
66
|
-
|
|
67
|
-
function Progress(args) {
|
|
68
|
-
var _this;
|
|
69
|
-
|
|
70
|
-
_classCallCheck(this, Progress);
|
|
71
|
-
|
|
72
|
-
_this = _super.call(this, args);
|
|
73
|
-
/**
|
|
74
|
-
* @readonly
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
_defineProperty(_assertThisInitialized(_this), "onMoveOnly", function (e) {
|
|
78
|
-
var _assertThisInitialize = _assertThisInitialized(_this),
|
|
79
|
-
pos = _assertThisInitialize.pos,
|
|
80
|
-
config = _assertThisInitialize.config,
|
|
81
|
-
player = _assertThisInitialize.player;
|
|
82
|
-
|
|
83
|
-
_plugin.Util.event(e);
|
|
84
|
-
|
|
85
|
-
var _ePos = _plugin.Util.getEventPos(e, player.zoom);
|
|
86
|
-
|
|
87
|
-
var x = player.rotateDeg === 90 ? _ePos.clientY : _ePos.clientX;
|
|
88
|
-
|
|
89
|
-
if (pos.moving && Math.abs(pos.x - x) < config.miniMoveStep) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
pos.moving = true;
|
|
94
|
-
pos.x = x;
|
|
95
|
-
|
|
96
|
-
var ret = _this.computeTime(e);
|
|
97
|
-
|
|
98
|
-
_this.triggerCallbacks('dragmove', ret);
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
_defineProperty(_assertThisInitialized(_this), "onBodyClick", function (e) {
|
|
102
|
-
e.preventDefault();
|
|
103
|
-
e.stopPropagation();
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
_defineProperty(_assertThisInitialized(_this), "onMouseDown", function (e) {
|
|
107
|
-
var _assertThisInitialize2 = _assertThisInitialized(_this),
|
|
108
|
-
player = _assertThisInitialize2.player,
|
|
109
|
-
pos = _assertThisInitialize2.pos,
|
|
110
|
-
config = _assertThisInitialize2.config,
|
|
111
|
-
playerConfig = _assertThisInitialize2.playerConfig;
|
|
112
|
-
|
|
113
|
-
var _ePos = _plugin.Util.getEventPos(e, player.zoom);
|
|
114
|
-
|
|
115
|
-
var x = player.rotateDeg === 90 ? _ePos.clientY : _ePos.clientX;
|
|
116
|
-
|
|
117
|
-
if (player.isMini || config.closeMoveSeek || !playerConfig.allowSeekAfterEnded && player.ended) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
e.stopPropagation();
|
|
122
|
-
e.preventDefault();
|
|
123
|
-
|
|
124
|
-
_this.focus();
|
|
125
|
-
|
|
126
|
-
_plugin.Util.checkIsFunction(playerConfig.disableSwipeHandler) && playerConfig.disableSwipeHandler();
|
|
127
|
-
_plugin.Util.checkIsFunction(config.onMoveStart) && config.onMoveStart();
|
|
128
|
-
|
|
129
|
-
_plugin.Util.event(e);
|
|
130
|
-
|
|
131
|
-
pos.x = x;
|
|
132
|
-
pos.isDown = true;
|
|
133
|
-
pos.moving = false; // 交互开始 禁止控制栏的自动隐藏功能
|
|
134
|
-
|
|
135
|
-
player.focus({
|
|
136
|
-
autoHide: false
|
|
137
|
-
});
|
|
138
|
-
_this.isProgressMoving = true;
|
|
139
|
-
|
|
140
|
-
_plugin.Util.addClass(_this.progressBtn, 'active');
|
|
141
|
-
|
|
142
|
-
var ret = _this.computeTime(e);
|
|
143
|
-
|
|
144
|
-
_this._state.time = ret.currentTime;
|
|
145
|
-
|
|
146
|
-
_this.updateWidth(ret.currentTime, ret.percent, 0);
|
|
147
|
-
|
|
148
|
-
if (_this.isMobile) {
|
|
149
|
-
_this.bind('touchmove', _this.onMouseMove);
|
|
150
|
-
|
|
151
|
-
_this.bind('touchend', _this.onMouseUp);
|
|
152
|
-
} else {
|
|
153
|
-
_this.unbind('mousemove', _this.onMoveOnly);
|
|
154
|
-
|
|
155
|
-
document.addEventListener('mousemove', _this.onMouseMove, false);
|
|
156
|
-
document.addEventListener('mouseup', _this.onMouseUp, false); // 避免触发videoClick 暂停/播放切换
|
|
157
|
-
|
|
158
|
-
player.root.addEventListener('click', _this.onBodyClick, false); // this.bind('mouseup', this.onMouseUp, false)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return true;
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
_defineProperty(_assertThisInitialized(_this), "onMouseUp", function (e) {
|
|
165
|
-
var _assertThisInitialize3 = _assertThisInitialized(_this),
|
|
166
|
-
player = _assertThisInitialize3.player,
|
|
167
|
-
config = _assertThisInitialize3.config,
|
|
168
|
-
pos = _assertThisInitialize3.pos,
|
|
169
|
-
playerConfig = _assertThisInitialize3.playerConfig,
|
|
170
|
-
_state = _assertThisInitialize3._state;
|
|
171
|
-
|
|
172
|
-
e.stopPropagation();
|
|
173
|
-
e.preventDefault();
|
|
174
|
-
_plugin.Util.checkIsFunction(playerConfig.enableSwipeHandler) && playerConfig.enableSwipeHandler();
|
|
175
|
-
_plugin.Util.checkIsFunction(config.onMoveEnd) && config.onMoveEnd();
|
|
176
|
-
|
|
177
|
-
_plugin.Util.event(e);
|
|
178
|
-
|
|
179
|
-
_plugin.Util.removeClass(_this.progressBtn, 'active');
|
|
180
|
-
|
|
181
|
-
var ret = _this.computeTime(e);
|
|
182
|
-
|
|
183
|
-
if (pos.moving) {
|
|
184
|
-
_this.updateWidth(ret.currentTime, ret.percent, 2);
|
|
185
|
-
|
|
186
|
-
_this.triggerCallbacks('dragend', ret);
|
|
187
|
-
} else {
|
|
188
|
-
// this.updateWidth(ret.currentTime, ret.percent, 2)
|
|
189
|
-
_this.triggerCallbacks('click', ret);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
pos.moving = false;
|
|
193
|
-
pos.isDown = false;
|
|
194
|
-
pos.x = 0;
|
|
195
|
-
pos.y = 0;
|
|
196
|
-
_state.time = 0;
|
|
197
|
-
|
|
198
|
-
if (_this.isMobile) {
|
|
199
|
-
_this.unbind('touchmove', _this.onMouseMove);
|
|
200
|
-
|
|
201
|
-
_this.unbind('touchend', _this.onMouseUp); // 交互结束 恢复控制栏的隐藏流程
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
_this.blur();
|
|
205
|
-
} else {
|
|
206
|
-
document.removeEventListener('mousemove', _this.onMouseMove, false);
|
|
207
|
-
document.removeEventListener('mouseup', _this.onMouseUp, false);
|
|
208
|
-
player.root.removeEventListener('click', _this.onBodyClick, false);
|
|
209
|
-
|
|
210
|
-
if (!pos.isEnter) {
|
|
211
|
-
_this.onMouseLeave(e);
|
|
212
|
-
} else {
|
|
213
|
-
!playerConfig.isMobileSimulateMode && _this.bind('mousemove', _this.onMoveOnly);
|
|
214
|
-
}
|
|
215
|
-
} // 延迟复位,状态复位要在dom相关时间回调执行之后
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
_plugin.Util.setTimeout(_assertThisInitialized(_this), function () {
|
|
219
|
-
_this.resetSeekState();
|
|
220
|
-
}, 10); // 交互结束 恢复控制栏的隐藏流程
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
player.focus();
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
_defineProperty(_assertThisInitialized(_this), "onMouseMove", function (e) {
|
|
227
|
-
var _assertThisInitialize4 = _assertThisInitialized(_this),
|
|
228
|
-
pos = _assertThisInitialize4.pos,
|
|
229
|
-
player = _assertThisInitialize4.player,
|
|
230
|
-
config = _assertThisInitialize4.config,
|
|
231
|
-
_state = _assertThisInitialize4._state;
|
|
232
|
-
|
|
233
|
-
if (_this.isMobile) {
|
|
234
|
-
e.stopPropagation();
|
|
235
|
-
e.preventDefault();
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
_plugin.Util.event(e);
|
|
239
|
-
|
|
240
|
-
var _ePos = _plugin.Util.getEventPos(e, player.zoom);
|
|
241
|
-
|
|
242
|
-
var x = player.rotateDeg === 90 ? _ePos.clientY : _ePos.clientX;
|
|
243
|
-
var diff = Math.abs(pos.x - x);
|
|
244
|
-
|
|
245
|
-
if (pos.moving && diff < config.miniMoveStep || !pos.moving && diff < config.miniStartStep) {
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
pos.x = x;
|
|
250
|
-
|
|
251
|
-
var ret = _this.computeTime(e);
|
|
252
|
-
|
|
253
|
-
if (_state.time < ret.currentTime) {
|
|
254
|
-
ret.forward = true;
|
|
255
|
-
} else {
|
|
256
|
-
ret.forward = false;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
_state.time = ret.currentTime;
|
|
260
|
-
|
|
261
|
-
if (pos.isDown && !pos.moving) {
|
|
262
|
-
pos.moving = true;
|
|
263
|
-
config.isPauseMoving && player.pause();
|
|
264
|
-
|
|
265
|
-
_this.triggerCallbacks('dragstart', ret);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
_this.updateWidth(ret.currentTime, ret.percent, 1);
|
|
269
|
-
|
|
270
|
-
_this.triggerCallbacks('dragmove', ret);
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
_defineProperty(_assertThisInitialized(_this), "onMouseEnter", function (e) {
|
|
274
|
-
var _assertThisInitialize5 = _assertThisInitialized(_this),
|
|
275
|
-
player = _assertThisInitialize5.player,
|
|
276
|
-
pos = _assertThisInitialize5.pos;
|
|
277
|
-
|
|
278
|
-
if (pos.isDown || pos.isEnter || player.isMini || !player.config.allowSeekAfterEnded && player.ended) {
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
pos.isEnter = true;
|
|
283
|
-
|
|
284
|
-
_this.bind('mousemove', _this.onMoveOnly);
|
|
285
|
-
|
|
286
|
-
_this.bind('mouseleave', _this.onMouseLeave);
|
|
287
|
-
|
|
288
|
-
_this.focus();
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
_defineProperty(_assertThisInitialized(_this), "onMouseLeave", function (e) {
|
|
292
|
-
var _assertThisInitialize6 = _assertThisInitialized(_this),
|
|
293
|
-
player = _assertThisInitialize6.player,
|
|
294
|
-
pos = _assertThisInitialize6.pos;
|
|
295
|
-
|
|
296
|
-
pos.isEnter = false;
|
|
297
|
-
|
|
298
|
-
if (player.isMini) {
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
_this.unbind('mousemove', _this.onMoveOnly);
|
|
303
|
-
|
|
304
|
-
if (pos.isDown) {
|
|
305
|
-
_this.unbind('mouseleave', _this.onMouseLeave);
|
|
306
|
-
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
_this.blur();
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
_this.useable = false;
|
|
314
|
-
/**
|
|
315
|
-
* @readonly
|
|
316
|
-
*/
|
|
317
|
-
|
|
318
|
-
_this.isProgressMoving = false;
|
|
319
|
-
/**
|
|
320
|
-
* @private
|
|
321
|
-
*/
|
|
322
|
-
|
|
323
|
-
_this.__dragCallBacks = [];
|
|
324
|
-
/**
|
|
325
|
-
* @private
|
|
326
|
-
*/
|
|
327
|
-
|
|
328
|
-
_this._state = {
|
|
329
|
-
now: -1,
|
|
330
|
-
direc: 0,
|
|
331
|
-
time: 0
|
|
332
|
-
};
|
|
333
|
-
return _this;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
_createClass(Progress, [{
|
|
337
|
-
key: "duration",
|
|
338
|
-
get: function get() {
|
|
339
|
-
return this.playerConfig.customDuration || this.player.duration;
|
|
340
|
-
}
|
|
341
|
-
}, {
|
|
342
|
-
key: "timeOffset",
|
|
343
|
-
get: function get() {
|
|
344
|
-
return this.playerConfig.timeOffset || 0;
|
|
345
|
-
}
|
|
346
|
-
}, {
|
|
347
|
-
key: "changeState",
|
|
348
|
-
value: function changeState() {
|
|
349
|
-
var useable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
350
|
-
this.useable = useable;
|
|
351
|
-
}
|
|
352
|
-
}, {
|
|
353
|
-
key: "beforeCreate",
|
|
354
|
-
value: function beforeCreate(args) {
|
|
355
|
-
if (typeof args.player.config.progress === 'boolean') {
|
|
356
|
-
args.config.disable = !args.player.config.progress;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* @description 创建内部进度条,并挂载到xg-outer上,
|
|
361
|
-
* 并把一些对外API绑定在progress上供外部调用
|
|
362
|
-
*
|
|
363
|
-
*/
|
|
364
|
-
|
|
365
|
-
}, {
|
|
366
|
-
key: "createInner",
|
|
367
|
-
value: function createInner() {
|
|
368
|
-
var _this2 = this;
|
|
369
|
-
|
|
370
|
-
this.innerList = new _innerList.default({
|
|
371
|
-
fragments: this.config.fragments,
|
|
372
|
-
style: this.playerConfig.commonStyle || {}
|
|
373
|
-
});
|
|
374
|
-
this.outer.insertBefore(this.innerList.render(), this.outer.children[0]);
|
|
375
|
-
['findHightLight', 'unHightLight', 'setHightLight', 'findFragment'].map(function (item) {
|
|
376
|
-
_this2[item] = _this2.innerList[item].bind(_this2.innerList);
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
}, {
|
|
380
|
-
key: "afterCreate",
|
|
381
|
-
value: function afterCreate() {
|
|
382
|
-
var _this3 = this;
|
|
383
|
-
|
|
384
|
-
if (this.config.disable || this.playerConfig.isLive) {
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
this.pos = {
|
|
389
|
-
x: 0,
|
|
390
|
-
// 水平方向位移
|
|
391
|
-
y: 0,
|
|
392
|
-
// 垂直方向位移
|
|
393
|
-
moving: false,
|
|
394
|
-
// 是否正在移动
|
|
395
|
-
isDown: false,
|
|
396
|
-
// 是否mouseDown
|
|
397
|
-
isEnter: false // 是否触发了mouseEnter
|
|
398
|
-
|
|
399
|
-
};
|
|
400
|
-
this.outer = this.find('xg-outer');
|
|
401
|
-
this.createInner();
|
|
402
|
-
|
|
403
|
-
if (_plugin.Sniffer.device === 'mobile') {
|
|
404
|
-
this.config.isDragingSeek = false;
|
|
405
|
-
this.isMobile = true;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
this.progressBtn = this.find('.xgplayer-progress-btn');
|
|
409
|
-
this.on(_plugin.Events.TIME_UPDATE, function () {
|
|
410
|
-
_this3.onTimeupdate();
|
|
411
|
-
});
|
|
412
|
-
this.on(_plugin.Events.SEEKED, function () {
|
|
413
|
-
_this3.onTimeupdate();
|
|
414
|
-
|
|
415
|
-
_this3.onCacheUpdate();
|
|
416
|
-
});
|
|
417
|
-
this.on(_plugin.Events.PROGRESS, function () {
|
|
418
|
-
_this3.onCacheUpdate();
|
|
419
|
-
});
|
|
420
|
-
this.on(_plugin.Events.ENDED, function () {
|
|
421
|
-
_this3.onCacheUpdate();
|
|
422
|
-
|
|
423
|
-
_this3._state.now = 0;
|
|
424
|
-
});
|
|
425
|
-
this.on(_plugin.Events.EMPTIED, function () {
|
|
426
|
-
_this3.onReset();
|
|
427
|
-
});
|
|
428
|
-
this.bindDomEvents();
|
|
429
|
-
this.initCustomStyle();
|
|
430
|
-
}
|
|
431
|
-
}, {
|
|
432
|
-
key: "initCustomStyle",
|
|
433
|
-
value: function initCustomStyle() {
|
|
434
|
-
var _ref = this.playerConfig || {},
|
|
435
|
-
commonStyle = _ref.commonStyle;
|
|
436
|
-
|
|
437
|
-
var sliderBtnStyle = commonStyle.sliderBtnStyle;
|
|
438
|
-
var progressBtn = this.progressBtn;
|
|
439
|
-
|
|
440
|
-
if (sliderBtnStyle) {
|
|
441
|
-
if (typeof sliderBtnStyle === 'string') {
|
|
442
|
-
progressBtn.style.boxShadow = sliderBtnStyle;
|
|
443
|
-
} else if (_typeof(sliderBtnStyle) === 'object') {
|
|
444
|
-
Object.keys(sliderBtnStyle).map(function (key) {
|
|
445
|
-
progressBtn.style[key] = sliderBtnStyle[key];
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* 触发某一类回调监听
|
|
452
|
-
* @param { string } type 类型 drag/dragend
|
|
453
|
-
* @param { any} data 具体数据
|
|
454
|
-
*/
|
|
455
|
-
|
|
456
|
-
}, {
|
|
457
|
-
key: "triggerCallbacks",
|
|
458
|
-
value: function triggerCallbacks(type, data) {
|
|
459
|
-
if (this.__dragCallBacks.length > 0) {
|
|
460
|
-
this.__dragCallBacks.map(function (item) {
|
|
461
|
-
if (item && item.handler && item.type === type) {
|
|
462
|
-
try {
|
|
463
|
-
item.handler(data);
|
|
464
|
-
} catch (error) {
|
|
465
|
-
console.error("[XGPLAYER][triggerCallbacks] ".concat(item, " error"), error);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* 供外部插件添加回调
|
|
473
|
-
* @param {string} type 类型 drag/dragend
|
|
474
|
-
* @param {function} handle 回调函数句柄
|
|
475
|
-
*/
|
|
476
|
-
|
|
477
|
-
}, {
|
|
478
|
-
key: "addCallBack",
|
|
479
|
-
value: function addCallBack(type, handle) {
|
|
480
|
-
if (handle && typeof handle === 'function') {
|
|
481
|
-
this.__dragCallBacks.push({
|
|
482
|
-
type: type,
|
|
483
|
-
handler: handle
|
|
484
|
-
});
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* 供外部插件移除回调
|
|
489
|
-
* @param {string} type 类型 drag/dragend
|
|
490
|
-
* @param {Function} event 回调函数句柄
|
|
491
|
-
*/
|
|
492
|
-
|
|
493
|
-
}, {
|
|
494
|
-
key: "removeCallBack",
|
|
495
|
-
value: function removeCallBack(type, event) {
|
|
496
|
-
var __dragCallBacks = this.__dragCallBacks;
|
|
497
|
-
|
|
498
|
-
var _index = -1;
|
|
499
|
-
|
|
500
|
-
__dragCallBacks.map(function (item, index) {
|
|
501
|
-
if (item && item.type === type && item.handler === event) {
|
|
502
|
-
_index = index;
|
|
503
|
-
}
|
|
504
|
-
});
|
|
505
|
-
|
|
506
|
-
if (_index > -1) {
|
|
507
|
-
__dragCallBacks.splice(_index, 1);
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}, {
|
|
511
|
-
key: "bindDomEvents",
|
|
512
|
-
value: function bindDomEvents() {
|
|
513
|
-
var _this$player = this.player,
|
|
514
|
-
controls = _this$player.controls,
|
|
515
|
-
config = _this$player.config;
|
|
516
|
-
|
|
517
|
-
if (this.isMobile) {
|
|
518
|
-
this.bind('touchstart', this.onMouseDown);
|
|
519
|
-
|
|
520
|
-
if (controls) {
|
|
521
|
-
controls.root && controls.root.addEventListener('touchmove', _plugin.Util.stopPropagation);
|
|
522
|
-
controls.center && controls.center.addEventListener('touchend', _plugin.Util.stopPropagation);
|
|
523
|
-
}
|
|
524
|
-
} else {
|
|
525
|
-
this.bind('mousedown', this.onMouseDown);
|
|
526
|
-
!config.isMobileSimulateMode && this.bind('mouseenter', this.onMouseEnter);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
}, {
|
|
530
|
-
key: "focus",
|
|
531
|
-
value: function focus() {
|
|
532
|
-
this.player.controls.pauseAutoHide();
|
|
533
|
-
|
|
534
|
-
_plugin.Util.addClass(this.root, 'active');
|
|
535
|
-
}
|
|
536
|
-
}, {
|
|
537
|
-
key: "blur",
|
|
538
|
-
value: function blur() {
|
|
539
|
-
this.player.controls.recoverAutoHide();
|
|
540
|
-
|
|
541
|
-
_plugin.Util.removeClass(this.root, 'active');
|
|
542
|
-
}
|
|
543
|
-
}, {
|
|
544
|
-
key: "updateWidth",
|
|
545
|
-
value:
|
|
546
|
-
/**
|
|
547
|
-
* @description 根据currenTime和占用百分比更新进度条
|
|
548
|
-
* @param {Number} currentTime 需要更新到的时间
|
|
549
|
-
* @param {Number} percent 更新时间占比
|
|
550
|
-
* @param {Int} type 触发类型 0-down 1-move 2-up
|
|
551
|
-
*/
|
|
552
|
-
function updateWidth(currentTime, percent, type) {
|
|
553
|
-
var config = this.config,
|
|
554
|
-
player = this.player;
|
|
555
|
-
|
|
556
|
-
if (config.isCloseClickSeek && type === 0) {
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
var realTime = currentTime > player.duration ? player.duration - 0.2 : Number(currentTime).toFixed(1); // currentTime = currentTime > player.duration ? player.duration - 0.2 : Number(currentTime).toFixed(1)
|
|
561
|
-
|
|
562
|
-
this.updatePercent(percent);
|
|
563
|
-
this.updateTime(currentTime);
|
|
564
|
-
|
|
565
|
-
if (type === 1 && (!config.isDragingSeek || player.videoConfig.mediaType === 'audio')) {
|
|
566
|
-
return;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
this._state.now = realTime;
|
|
570
|
-
this._state.direc = realTime > player.currentTime ? 0 : 1;
|
|
571
|
-
player.seek(realTime);
|
|
572
|
-
}
|
|
573
|
-
}, {
|
|
574
|
-
key: "computeTime",
|
|
575
|
-
value: function computeTime(e) {
|
|
576
|
-
var player = this.player;
|
|
577
|
-
|
|
578
|
-
var _this$root$getBoundin = this.root.getBoundingClientRect(),
|
|
579
|
-
width = _this$root$getBoundin.width,
|
|
580
|
-
height = _this$root$getBoundin.height,
|
|
581
|
-
top = _this$root$getBoundin.top,
|
|
582
|
-
left = _this$root$getBoundin.left;
|
|
583
|
-
|
|
584
|
-
var _ePos = _plugin.Util.getEventPos(e, player.zoom);
|
|
585
|
-
|
|
586
|
-
var rWidth, rLeft, clientX;
|
|
587
|
-
|
|
588
|
-
if (player.rotateDeg === 90) {
|
|
589
|
-
rWidth = height;
|
|
590
|
-
rLeft = top;
|
|
591
|
-
clientX = _ePos.clientY;
|
|
592
|
-
} else {
|
|
593
|
-
rWidth = width;
|
|
594
|
-
rLeft = left;
|
|
595
|
-
clientX = _ePos.clientX;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
var offset = clientX - rLeft;
|
|
599
|
-
offset = offset > rWidth ? rWidth : offset < 0 ? 0 : offset;
|
|
600
|
-
var percent = offset / rWidth;
|
|
601
|
-
percent = percent < 0 ? 0 : percent > 1 ? 1 : percent;
|
|
602
|
-
var currentTime = parseInt(percent * this.duration * 1000, 10) / 1000;
|
|
603
|
-
return {
|
|
604
|
-
percent: percent,
|
|
605
|
-
currentTime: currentTime,
|
|
606
|
-
offset: offset,
|
|
607
|
-
width: rWidth,
|
|
608
|
-
left: rLeft,
|
|
609
|
-
e: e
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
/**
|
|
613
|
-
* @description 更新时间插件,在拖拽状态下要接管时间插件的更新状态
|
|
614
|
-
* 本位置会和time插件交互
|
|
615
|
-
* @param {number} time 根据拖拽距离计算出的时间
|
|
616
|
-
*/
|
|
617
|
-
|
|
618
|
-
}, {
|
|
619
|
-
key: "updateTime",
|
|
620
|
-
value: function updateTime(time) {
|
|
621
|
-
var player = this.player,
|
|
622
|
-
duration = this.duration;
|
|
623
|
-
|
|
624
|
-
if (time > duration) {
|
|
625
|
-
time = duration;
|
|
626
|
-
} else if (time < 0) {
|
|
627
|
-
time = 0;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
var timeIcon = player.plugins.time;
|
|
631
|
-
|
|
632
|
-
if (timeIcon) {
|
|
633
|
-
timeIcon.updateTime(time);
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
/**
|
|
637
|
-
* @description 复位正在拖拽状态 ,拖拽的时候要避免timeupdate更新
|
|
638
|
-
*/
|
|
639
|
-
|
|
640
|
-
}, {
|
|
641
|
-
key: "resetSeekState",
|
|
642
|
-
value: function resetSeekState() {
|
|
643
|
-
this.isProgressMoving = false;
|
|
644
|
-
var timeIcon = this.player.plugins.time;
|
|
645
|
-
timeIcon && timeIcon.resetActive();
|
|
646
|
-
}
|
|
647
|
-
/**
|
|
648
|
-
* @description 拖拽过程中更新UI
|
|
649
|
-
* @param {number} percent 小于0的小数
|
|
650
|
-
*
|
|
651
|
-
*/
|
|
652
|
-
|
|
653
|
-
}, {
|
|
654
|
-
key: "updatePercent",
|
|
655
|
-
value: function updatePercent(percent, notSeek) {
|
|
656
|
-
this.isProgressMoving = true;
|
|
657
|
-
|
|
658
|
-
if (this.config.disable) {
|
|
659
|
-
return;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
percent = percent > 1 ? 1 : percent < 0 ? 0 : percent;
|
|
663
|
-
this.progressBtn.style.left = "".concat(percent * 100, "%");
|
|
664
|
-
this.innerList.update({
|
|
665
|
-
played: percent * this.duration
|
|
666
|
-
}, this.duration);
|
|
667
|
-
var miniprogress = this.player.plugins.miniprogress;
|
|
668
|
-
miniprogress && miniprogress.update({
|
|
669
|
-
played: percent * this.duration
|
|
670
|
-
}, this.duration);
|
|
671
|
-
}
|
|
672
|
-
/**
|
|
673
|
-
* @description 播放进度更新
|
|
674
|
-
*/
|
|
675
|
-
|
|
676
|
-
}, {
|
|
677
|
-
key: "onTimeupdate",
|
|
678
|
-
value: function onTimeupdate() {
|
|
679
|
-
var player = this.player,
|
|
680
|
-
_state = this._state,
|
|
681
|
-
duration = this.duration;
|
|
682
|
-
|
|
683
|
-
if (player.isSeeking || this.isProgressMoving || !player.hasStart) {
|
|
684
|
-
return;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
if (_state.now > -1) {
|
|
688
|
-
var abs = parseInt(_state.now * 1000, 10) - parseInt(player.currentTime * 1000, 10);
|
|
689
|
-
|
|
690
|
-
if (_state.direc === 0 && abs > 300 || _state.direc === 1 && abs > -300) {
|
|
691
|
-
_state.now = -1;
|
|
692
|
-
return;
|
|
693
|
-
} else {
|
|
694
|
-
_state.now = -1;
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
var time = this.timeOffset + player.currentTime;
|
|
699
|
-
this.innerList.update({
|
|
700
|
-
played: time
|
|
701
|
-
}, duration);
|
|
702
|
-
this.progressBtn.style.left = "".concat(time / duration * 100, "%");
|
|
703
|
-
var miniprogress = this.player.plugins.miniprogress;
|
|
704
|
-
miniprogress && miniprogress.update({
|
|
705
|
-
played: time
|
|
706
|
-
}, duration);
|
|
707
|
-
}
|
|
708
|
-
/**
|
|
709
|
-
* @description 缓存进度更新
|
|
710
|
-
*/
|
|
711
|
-
|
|
712
|
-
}, {
|
|
713
|
-
key: "onCacheUpdate",
|
|
714
|
-
value: function onCacheUpdate() {
|
|
715
|
-
var player = this.player,
|
|
716
|
-
duration = this.duration;
|
|
717
|
-
var point = player.bufferedPoint;
|
|
718
|
-
this.innerList.update({
|
|
719
|
-
cached: point.end
|
|
720
|
-
}, duration);
|
|
721
|
-
var miniprogress = this.player.plugins.miniprogress;
|
|
722
|
-
miniprogress && miniprogress.update({
|
|
723
|
-
cached: point.end
|
|
724
|
-
}, duration);
|
|
725
|
-
}
|
|
726
|
-
}, {
|
|
727
|
-
key: "onReset",
|
|
728
|
-
value: function onReset() {
|
|
729
|
-
this.innerList.update({
|
|
730
|
-
played: 0,
|
|
731
|
-
cached: 0
|
|
732
|
-
}, 0);
|
|
733
|
-
var miniprogress = this.player.plugins.miniprogress;
|
|
734
|
-
miniprogress && miniprogress.update({
|
|
735
|
-
cached: 0,
|
|
736
|
-
played: 0
|
|
737
|
-
}, 0);
|
|
738
|
-
}
|
|
739
|
-
}, {
|
|
740
|
-
key: "destroy",
|
|
741
|
-
value: function destroy() {
|
|
742
|
-
var player = this.player;
|
|
743
|
-
var controls = player.controls;
|
|
744
|
-
this.thumbnailPlugin = null;
|
|
745
|
-
this.innerList.destroy();
|
|
746
|
-
this.innerList = null;
|
|
747
|
-
|
|
748
|
-
if (this.isMobile) {
|
|
749
|
-
this.unbind('touchstart', this.onMouseDown);
|
|
750
|
-
this.unbind('touchmove', this.onMouseMove);
|
|
751
|
-
this.unbind('touchend', this.onMouseUp);
|
|
752
|
-
|
|
753
|
-
if (controls) {
|
|
754
|
-
controls.root && controls.root.removeEventListener('touchmove', _plugin.Util.stopPropagation);
|
|
755
|
-
controls.center && controls.center.removeEventListener('touchend', _plugin.Util.stopPropagation);
|
|
756
|
-
}
|
|
757
|
-
} else {
|
|
758
|
-
this.unbind('mousedown', this.onMouseDown);
|
|
759
|
-
this.unbind('mouseenter', this.onMouseEnter);
|
|
760
|
-
this.unbind('mousemove', this.onMoveOnly);
|
|
761
|
-
document.removeEventListener('mousemove', this.onMouseMove, false);
|
|
762
|
-
document.removeEventListener('mouseup', this.onMouseUp, false);
|
|
763
|
-
player.root.removeEventListener('click', this.onBodyClick, false);
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
}, {
|
|
767
|
-
key: "render",
|
|
768
|
-
value: function render() {
|
|
769
|
-
if (this.config.disable || this.playerConfig.isLive) {
|
|
770
|
-
return;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
var controlsMode = this.player.controls ? this.player.controls.config.mode : '';
|
|
774
|
-
var className = controlsMode === 'bottom' ? 'xgplayer-progress-bottom' : '';
|
|
775
|
-
return "\n <xg-progress class=\"xgplayer-progress ".concat(className, "\">\n <xg-outer class=\"xgplayer-progress-outer\">\n <xg-progress-btn class=\"xgplayer-progress-btn\"></xg-progress-btn>\n </xg-outer>\n </xg-progress>\n ");
|
|
776
|
-
}
|
|
777
|
-
}], [{
|
|
778
|
-
key: "pluginName",
|
|
779
|
-
get: function get() {
|
|
780
|
-
return 'progress';
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* @type IProgressConfig
|
|
784
|
-
*/
|
|
785
|
-
|
|
786
|
-
}, {
|
|
787
|
-
key: "defaultConfig",
|
|
788
|
-
get: function get() {
|
|
789
|
-
return {
|
|
790
|
-
position: _plugin.POSITIONS.CONTROLS_CENTER,
|
|
791
|
-
index: 0,
|
|
792
|
-
disable: false,
|
|
793
|
-
isDragingSeek: true,
|
|
794
|
-
// 是否在拖拽的过程中更新currentTime
|
|
795
|
-
closeMoveSeek: false,
|
|
796
|
-
// 是否关闭滑块seek能力
|
|
797
|
-
isPauseMoving: false,
|
|
798
|
-
// 是否在move的时候暂停视频内容
|
|
799
|
-
isCloseClickSeek: false,
|
|
800
|
-
// 是否关闭点击进度条的时候seek
|
|
801
|
-
fragments: [{
|
|
802
|
-
percent: 1
|
|
803
|
-
}],
|
|
804
|
-
miniMoveStep: 5,
|
|
805
|
-
miniStartStep: 2,
|
|
806
|
-
onMoveStart: function onMoveStart() {},
|
|
807
|
-
// 手势开始移动回调
|
|
808
|
-
onMoveEnd: function onMoveEnd() {} // 手势移动结束回调
|
|
809
|
-
|
|
810
|
-
};
|
|
811
|
-
}
|
|
812
|
-
}]);
|
|
813
|
-
|
|
814
|
-
return Progress;
|
|
815
|
-
}(_plugin.default);
|
|
816
|
-
|
|
817
|
-
var _default = Progress;
|
|
818
|
-
exports.default = _default;
|