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.
Files changed (729) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/package.json +13 -11
  3. package/types/index.d.ts +480 -204
  4. package/browser/index.min.js +0 -1
  5. package/browser/xgplayer.min.css +0 -1
  6. package/dist/index.min.js +0 -1
  7. package/dist/xgplayer.css +0 -1921
  8. package/dist/xgplayer.live.css +0 -1840
  9. package/dist/xgplayer.live.min.css +0 -1
  10. package/dist/xgplayer.min.css +0 -1
  11. package/dist/xgplayer.mobile.css +0 -1585
  12. package/dist/xgplayer.mobile.min.css +0 -1
  13. package/dist/xgplayer.vod.css +0 -1921
  14. package/dist/xgplayer.vod.min.css +0 -1
  15. package/es/constant.d.ts +0 -3
  16. package/es/constant.js +0 -3
  17. package/es/defaultConfig.d.ts +0 -197
  18. package/es/defaultConfig.js +0 -213
  19. package/es/error.d.ts +0 -112
  20. package/es/error.js +0 -155
  21. package/es/events.d.ts +0 -48
  22. package/es/events.js +0 -56
  23. package/es/index-umd.d.ts +0 -57
  24. package/es/index-umd.js +0 -64
  25. package/es/index.d.ts +0 -11
  26. package/es/index.js +0 -11
  27. package/es/lang/en.d.ts +0 -91
  28. package/es/lang/en.js +0 -76
  29. package/es/lang/i18n.d.ts +0 -19
  30. package/es/lang/i18n.js +0 -125
  31. package/es/lang/index.d.ts +0 -2
  32. package/es/lang/index.js +0 -2
  33. package/es/lang/jp.d.ts +0 -91
  34. package/es/lang/jp.js +0 -76
  35. package/es/lang/zh-cn.d.ts +0 -91
  36. package/es/lang/zh-cn.js +0 -76
  37. package/es/lang/zh-hk.d.ts +0 -91
  38. package/es/lang/zh-hk.js +0 -76
  39. package/es/player.d.ts +0 -591
  40. package/es/player.js +0 -2263
  41. package/es/plugin/basePlugin.d.ts +0 -167
  42. package/es/plugin/basePlugin.js +0 -435
  43. package/es/plugin/hooksDescriptor.d.ts +0 -59
  44. package/es/plugin/hooksDescriptor.js +0 -216
  45. package/es/plugin/index.d.ts +0 -12
  46. package/es/plugin/index.js +0 -10
  47. package/es/plugin/plugin.d.ts +0 -201
  48. package/es/plugin/plugin.js +0 -833
  49. package/es/plugin/pluginsManager.d.ts +0 -93
  50. package/es/plugin/pluginsManager.js +0 -394
  51. package/es/plugin/preset.d.ts +0 -1
  52. package/es/plugin/preset.js +0 -54
  53. package/es/plugin/resizeObserver.d.ts +0 -3
  54. package/es/plugin/resizeObserver.js +0 -147
  55. package/es/plugins/assets/back.svg +0 -5
  56. package/es/plugins/assets/download.svg +0 -14
  57. package/es/plugins/assets/exitCssFull.svg +0 -3
  58. package/es/plugins/assets/exitFull.svg +0 -3
  59. package/es/plugins/assets/loading.svg +0 -3
  60. package/es/plugins/assets/mobile/mPause.svg +0 -17
  61. package/es/plugins/assets/mobile/mPlay.svg +0 -19
  62. package/es/plugins/assets/mobile/mPlayNext.svg +0 -17
  63. package/es/plugins/assets/panel.svg +0 -4
  64. package/es/plugins/assets/pause.svg +0 -3
  65. package/es/plugins/assets/pipIcon.svg +0 -5
  66. package/es/plugins/assets/pipIconExit.svg +0 -8
  67. package/es/plugins/assets/play.svg +0 -3
  68. package/es/plugins/assets/playNext.svg +0 -3
  69. package/es/plugins/assets/replay.svg +0 -3
  70. package/es/plugins/assets/requestCssFull.svg +0 -3
  71. package/es/plugins/assets/requestFull.svg +0 -3
  72. package/es/plugins/assets/rotate.svg +0 -11
  73. package/es/plugins/assets/seekicon.svg +0 -7
  74. package/es/plugins/assets/volumeLarge.svg +0 -4
  75. package/es/plugins/assets/volumeMuted.svg +0 -4
  76. package/es/plugins/assets/volumeSmall.svg +0 -4
  77. package/es/plugins/common/index.css +0 -128
  78. package/es/plugins/common/optionList.d.ts +0 -14
  79. package/es/plugins/common/optionList.js +0 -128
  80. package/es/plugins/common/optionsIcon.css +0 -125
  81. package/es/plugins/common/optionsIcon.d.ts +0 -30
  82. package/es/plugins/common/optionsIcon.js +0 -264
  83. package/es/plugins/common/thumbnail.css +0 -2
  84. package/es/plugins/common/thumbnail.d.ts +0 -60
  85. package/es/plugins/common/thumbnail.js +0 -241
  86. package/es/plugins/controls/index.css +0 -151
  87. package/es/plugins/controls/index.d.ts +0 -55
  88. package/es/plugins/controls/index.js +0 -312
  89. package/es/plugins/cssFullScreen/index.css +0 -11
  90. package/es/plugins/cssFullScreen/index.d.ts +0 -27
  91. package/es/plugins/cssFullScreen/index.js +0 -166
  92. package/es/plugins/danmu/danmuIcon.d.ts +0 -13
  93. package/es/plugins/danmu/danmuIcon.js +0 -122
  94. package/es/plugins/danmu/danmuPanel.d.ts +0 -38
  95. package/es/plugins/danmu/danmuPanel.js +0 -127
  96. package/es/plugins/danmu/index.css +0 -553
  97. package/es/plugins/danmu/index.d.ts +0 -94
  98. package/es/plugins/danmu/index.js +0 -426
  99. package/es/plugins/definition/index.css +0 -3
  100. package/es/plugins/definition/index.d.ts +0 -53
  101. package/es/plugins/definition/index.js +0 -289
  102. package/es/plugins/download/index.css +0 -10
  103. package/es/plugins/download/index.d.ts +0 -26
  104. package/es/plugins/download/index.js +0 -147
  105. package/es/plugins/dynamicBg/index.css +0 -15
  106. package/es/plugins/dynamicBg/index.d.ts +0 -63
  107. package/es/plugins/dynamicBg/index.js +0 -411
  108. package/es/plugins/enter/index.css +0 -130
  109. package/es/plugins/enter/index.d.ts +0 -18
  110. package/es/plugins/enter/index.js +0 -86
  111. package/es/plugins/error/index.css +0 -32
  112. package/es/plugins/error/index.d.ts +0 -8
  113. package/es/plugins/error/index.js +0 -112
  114. package/es/plugins/fullscreen/backicon.d.ts +0 -9
  115. package/es/plugins/fullscreen/backicon.js +0 -102
  116. package/es/plugins/fullscreen/index.css +0 -21
  117. package/es/plugins/fullscreen/index.d.ts +0 -59
  118. package/es/plugins/fullscreen/index.js +0 -364
  119. package/es/plugins/keyboard/index.d.ts +0 -68
  120. package/es/plugins/keyboard/index.js +0 -385
  121. package/es/plugins/loading/index.css +0 -82
  122. package/es/plugins/loading/index.d.ts +0 -7
  123. package/es/plugins/loading/index.js +0 -71
  124. package/es/plugins/logger/index.d.ts +0 -30
  125. package/es/plugins/logger/index.js +0 -237
  126. package/es/plugins/miniScreen/index.css +0 -164
  127. package/es/plugins/miniScreen/index.d.ts +0 -56
  128. package/es/plugins/miniScreen/index.js +0 -298
  129. package/es/plugins/miniScreen/miniScreenIcon.d.ts +0 -10
  130. package/es/plugins/miniScreen/miniScreenIcon.js +0 -82
  131. package/es/plugins/mobile/index.css +0 -134
  132. package/es/plugins/mobile/index.d.ts +0 -119
  133. package/es/plugins/mobile/index.js +0 -858
  134. package/es/plugins/mobile/touch.d.ts +0 -43
  135. package/es/plugins/mobile/touch.js +0 -277
  136. package/es/plugins/netAdaption/index.d.ts +0 -5
  137. package/es/plugins/netAdaption/index.js +0 -76
  138. package/es/plugins/pc/index.css +0 -2
  139. package/es/plugins/pc/index.d.ts +0 -16
  140. package/es/plugins/pc/index.js +0 -272
  141. package/es/plugins/pip/index.css +0 -11
  142. package/es/plugins/pip/index.d.ts +0 -25
  143. package/es/plugins/pip/index.js +0 -293
  144. package/es/plugins/play/index.css +0 -11
  145. package/es/plugins/play/index.d.ts +0 -12
  146. package/es/plugins/play/index.js +0 -148
  147. package/es/plugins/playNext/index.css +0 -16
  148. package/es/plugins/playNext/index.d.ts +0 -15
  149. package/es/plugins/playNext/index.js +0 -139
  150. package/es/plugins/playbackRate/index.css +0 -3
  151. package/es/plugins/playbackRate/index.d.ts +0 -28
  152. package/es/plugins/playbackRate/index.js +0 -174
  153. package/es/plugins/poster/index.css +0 -33
  154. package/es/plugins/poster/index.d.ts +0 -24
  155. package/es/plugins/poster/index.js +0 -155
  156. package/es/plugins/progress/index.css +0 -212
  157. package/es/plugins/progress/index.d.ts +0 -151
  158. package/es/plugins/progress/index.js +0 -796
  159. package/es/plugins/progress/innerList.d.ts +0 -37
  160. package/es/plugins/progress/innerList.js +0 -232
  161. package/es/plugins/progress/miniProgress.d.ts +0 -8
  162. package/es/plugins/progress/miniProgress.js +0 -84
  163. package/es/plugins/progressPreview/dotsApi.d.ts +0 -1
  164. package/es/plugins/progressPreview/dotsApi.js +0 -260
  165. package/es/plugins/progressPreview/index.css +0 -152
  166. package/es/plugins/progressPreview/index.d.ts +0 -64
  167. package/es/plugins/progressPreview/index.js +0 -407
  168. package/es/plugins/prompt/index.css +0 -47
  169. package/es/plugins/prompt/index.d.ts +0 -21
  170. package/es/plugins/prompt/index.js +0 -148
  171. package/es/plugins/replay/index.css +0 -39
  172. package/es/plugins/replay/index.d.ts +0 -11
  173. package/es/plugins/replay/index.js +0 -144
  174. package/es/plugins/rotate/index.css +0 -0
  175. package/es/plugins/rotate/index.d.ts +0 -16
  176. package/es/plugins/rotate/index.js +0 -190
  177. package/es/plugins/screenShot/index.css +0 -2
  178. package/es/plugins/screenShot/index.d.ts +0 -25
  179. package/es/plugins/screenShot/index.js +0 -177
  180. package/es/plugins/start/index.css +0 -98
  181. package/es/plugins/start/index.d.ts +0 -26
  182. package/es/plugins/start/index.js +0 -310
  183. package/es/plugins/time/index.css +0 -24
  184. package/es/plugins/time/index.d.ts +0 -24
  185. package/es/plugins/time/index.js +0 -252
  186. package/es/plugins/track/index.css +0 -5
  187. package/es/plugins/track/index.d.ts +0 -79
  188. package/es/plugins/track/index.js +0 -404
  189. package/es/plugins/volume/index.css +0 -89
  190. package/es/plugins/volume/index.d.ts +0 -42
  191. package/es/plugins/volume/index.js +0 -322
  192. package/es/presets/default-en.d.ts +0 -30
  193. package/es/presets/default-en.js +0 -84
  194. package/es/presets/default.css +0 -1921
  195. package/es/presets/default.d.ts +0 -105
  196. package/es/presets/default.js +0 -89
  197. package/es/presets/live.css +0 -1840
  198. package/es/presets/live.d.ts +0 -94
  199. package/es/presets/live.js +0 -52
  200. package/es/presets/mobile.css +0 -1585
  201. package/es/presets/mobile.d.ts +0 -103
  202. package/es/presets/mobile.js +0 -41
  203. package/es/proxy.d.ts +0 -311
  204. package/es/proxy.js +0 -932
  205. package/es/stateClassMap.d.ts +0 -30
  206. package/es/stateClassMap.js +0 -30
  207. package/es/style/common/animation.css +0 -27
  208. package/es/style/common/svg-url.css +0 -0
  209. package/es/style/common.css +0 -276
  210. package/es/style/index.css +0 -405
  211. package/es/style/variable.css +0 -0
  212. package/es/utils/database.d.ts +0 -31
  213. package/es/utils/database.js +0 -147
  214. package/es/utils/debug.d.ts +0 -10
  215. package/es/utils/debug.js +0 -53
  216. package/es/utils/draggabilly.d.ts +0 -54
  217. package/es/utils/draggabilly.js +0 -548
  218. package/es/utils/sniffer.d.ts +0 -21
  219. package/es/utils/sniffer.js +0 -113
  220. package/es/utils/url.d.ts +0 -1
  221. package/es/utils/url.js +0 -10
  222. package/es/utils/util.d.ts +0 -241
  223. package/es/utils/util.js +0 -875
  224. package/es/utils/xgplayerTimeRange.d.ts +0 -7
  225. package/es/utils/xgplayerTimeRange.js +0 -34
  226. package/es/version.d.ts +0 -5
  227. package/es/version.js +0 -5
  228. package/es/xgplayer.d.ts +0 -16
  229. package/es/xgplayer.js +0 -34
  230. package/lib/constant.js +0 -12
  231. package/lib/defaultConfig.js +0 -220
  232. package/lib/error.js +0 -166
  233. package/lib/events.js +0 -110
  234. package/lib/index-umd.js +0 -87
  235. package/lib/index.js +0 -90
  236. package/lib/lang/en.js +0 -83
  237. package/lib/lang/i18n.js +0 -136
  238. package/lib/lang/index.js +0 -13
  239. package/lib/lang/jp.js +0 -83
  240. package/lib/lang/zh-cn.js +0 -83
  241. package/lib/lang/zh-hk.js +0 -83
  242. package/lib/player.js +0 -2367
  243. package/lib/plugin/basePlugin.js +0 -482
  244. package/lib/plugin/hooksDescriptor.js +0 -227
  245. package/lib/plugin/index.js +0 -94
  246. package/lib/plugin/plugin.js +0 -851
  247. package/lib/plugin/pluginsManager.js +0 -402
  248. package/lib/plugin/preset.js +0 -63
  249. package/lib/plugin/resizeObserver.js +0 -154
  250. package/lib/plugins/assets/back.svg +0 -5
  251. package/lib/plugins/assets/download.svg +0 -14
  252. package/lib/plugins/assets/exitCssFull.svg +0 -3
  253. package/lib/plugins/assets/exitFull.svg +0 -3
  254. package/lib/plugins/assets/loading.svg +0 -3
  255. package/lib/plugins/assets/mobile/mPause.svg +0 -17
  256. package/lib/plugins/assets/mobile/mPlay.svg +0 -19
  257. package/lib/plugins/assets/mobile/mPlayNext.svg +0 -17
  258. package/lib/plugins/assets/panel.svg +0 -4
  259. package/lib/plugins/assets/pause.svg +0 -3
  260. package/lib/plugins/assets/pipIcon.svg +0 -5
  261. package/lib/plugins/assets/pipIconExit.svg +0 -8
  262. package/lib/plugins/assets/play.svg +0 -3
  263. package/lib/plugins/assets/playNext.svg +0 -3
  264. package/lib/plugins/assets/replay.svg +0 -3
  265. package/lib/plugins/assets/requestCssFull.svg +0 -3
  266. package/lib/plugins/assets/requestFull.svg +0 -3
  267. package/lib/plugins/assets/rotate.svg +0 -11
  268. package/lib/plugins/assets/seekicon.svg +0 -7
  269. package/lib/plugins/assets/volumeLarge.svg +0 -4
  270. package/lib/plugins/assets/volumeMuted.svg +0 -4
  271. package/lib/plugins/assets/volumeSmall.svg +0 -4
  272. package/lib/plugins/common/index.css +0 -128
  273. package/lib/plugins/common/optionList.js +0 -145
  274. package/lib/plugins/common/optionsIcon.css +0 -125
  275. package/lib/plugins/common/optionsIcon.js +0 -278
  276. package/lib/plugins/common/thumbnail.css +0 -2
  277. package/lib/plugins/common/thumbnail.js +0 -253
  278. package/lib/plugins/controls/index.css +0 -151
  279. package/lib/plugins/controls/index.js +0 -326
  280. package/lib/plugins/cssFullScreen/index.css +0 -11
  281. package/lib/plugins/cssFullScreen/index.js +0 -178
  282. package/lib/plugins/danmu/danmuIcon.js +0 -135
  283. package/lib/plugins/danmu/danmuPanel.js +0 -140
  284. package/lib/plugins/danmu/index.css +0 -553
  285. package/lib/plugins/danmu/index.js +0 -456
  286. package/lib/plugins/definition/index.css +0 -3
  287. package/lib/plugins/definition/index.js +0 -299
  288. package/lib/plugins/download/index.css +0 -10
  289. package/lib/plugins/download/index.js +0 -162
  290. package/lib/plugins/dynamicBg/index.css +0 -15
  291. package/lib/plugins/dynamicBg/index.js +0 -428
  292. package/lib/plugins/enter/index.css +0 -130
  293. package/lib/plugins/enter/index.js +0 -99
  294. package/lib/plugins/error/index.css +0 -32
  295. package/lib/plugins/error/index.js +0 -123
  296. package/lib/plugins/fullscreen/backicon.js +0 -114
  297. package/lib/plugins/fullscreen/index.css +0 -21
  298. package/lib/plugins/fullscreen/index.js +0 -379
  299. package/lib/plugins/keyboard/index.js +0 -393
  300. package/lib/plugins/loading/index.css +0 -82
  301. package/lib/plugins/loading/index.js +0 -84
  302. package/lib/plugins/logger/index.js +0 -252
  303. package/lib/plugins/miniScreen/index.css +0 -164
  304. package/lib/plugins/miniScreen/index.js +0 -323
  305. package/lib/plugins/miniScreen/miniScreenIcon.js +0 -94
  306. package/lib/plugins/mobile/index.css +0 -134
  307. package/lib/plugins/mobile/index.js +0 -874
  308. package/lib/plugins/mobile/touch.js +0 -285
  309. package/lib/plugins/netAdaption/index.js +0 -84
  310. package/lib/plugins/pc/index.css +0 -2
  311. package/lib/plugins/pc/index.js +0 -281
  312. package/lib/plugins/pip/index.css +0 -11
  313. package/lib/plugins/pip/index.js +0 -308
  314. package/lib/plugins/play/index.css +0 -11
  315. package/lib/plugins/play/index.js +0 -161
  316. package/lib/plugins/playNext/index.css +0 -16
  317. package/lib/plugins/playNext/index.js +0 -148
  318. package/lib/plugins/playbackRate/index.css +0 -3
  319. package/lib/plugins/playbackRate/index.js +0 -184
  320. package/lib/plugins/poster/index.css +0 -33
  321. package/lib/plugins/poster/index.js +0 -168
  322. package/lib/plugins/progress/index.css +0 -212
  323. package/lib/plugins/progress/index.js +0 -819
  324. package/lib/plugins/progress/innerList.js +0 -241
  325. package/lib/plugins/progress/miniProgress.js +0 -94
  326. package/lib/plugins/progressPreview/dotsApi.js +0 -271
  327. package/lib/plugins/progressPreview/index.css +0 -152
  328. package/lib/plugins/progressPreview/index.js +0 -431
  329. package/lib/plugins/prompt/index.css +0 -47
  330. package/lib/plugins/prompt/index.js +0 -163
  331. package/lib/plugins/replay/index.css +0 -39
  332. package/lib/plugins/replay/index.js +0 -159
  333. package/lib/plugins/rotate/index.css +0 -0
  334. package/lib/plugins/rotate/index.js +0 -203
  335. package/lib/plugins/screenShot/index.css +0 -2
  336. package/lib/plugins/screenShot/index.js +0 -188
  337. package/lib/plugins/start/index.css +0 -98
  338. package/lib/plugins/start/index.js +0 -326
  339. package/lib/plugins/time/index.css +0 -24
  340. package/lib/plugins/time/index.js +0 -273
  341. package/lib/plugins/track/index.css +0 -5
  342. package/lib/plugins/track/index.js +0 -415
  343. package/lib/plugins/volume/index.css +0 -89
  344. package/lib/plugins/volume/index.js +0 -340
  345. package/lib/presets/default-en.js +0 -121
  346. package/lib/presets/default.css +0 -1921
  347. package/lib/presets/default.js +0 -127
  348. package/lib/presets/live.css +0 -1840
  349. package/lib/presets/live.js +0 -77
  350. package/lib/presets/mobile.css +0 -1585
  351. package/lib/presets/mobile.js +0 -73
  352. package/lib/proxy.js +0 -950
  353. package/lib/stateClassMap.js +0 -37
  354. package/lib/style/common/animation.css +0 -27
  355. package/lib/style/common/svg-url.css +0 -0
  356. package/lib/style/common.css +0 -276
  357. package/lib/style/index.css +0 -405
  358. package/lib/style/variable.css +0 -0
  359. package/lib/utils/database.js +0 -155
  360. package/lib/utils/debug.js +0 -59
  361. package/lib/utils/draggabilly.js +0 -557
  362. package/lib/utils/sniffer.js +0 -121
  363. package/lib/utils/url.js +0 -19
  364. package/lib/utils/util.js +0 -888
  365. package/lib/utils/xgplayerTimeRange.js +0 -41
  366. package/lib/version.js +0 -13
  367. package/lib/xgplayer.js +0 -90
  368. package/xgplayer3/dist/index.min.js +0 -1
  369. package/xgplayer3/dist/xgplayer.css +0 -1921
  370. package/xgplayer3/dist/xgplayer.live.css +0 -1840
  371. package/xgplayer3/dist/xgplayer.live.min.css +0 -1
  372. package/xgplayer3/dist/xgplayer.min.css +0 -1
  373. package/xgplayer3/dist/xgplayer.mobile.css +0 -1585
  374. package/xgplayer3/dist/xgplayer.mobile.min.css +0 -1
  375. package/xgplayer3/dist/xgplayer.vod.css +0 -1921
  376. package/xgplayer3/dist/xgplayer.vod.min.css +0 -1
  377. package/xgplayer3/es/constant.d.ts +0 -3
  378. package/xgplayer3/es/constant.js +0 -3
  379. package/xgplayer3/es/defaultConfig.d.ts +0 -197
  380. package/xgplayer3/es/defaultConfig.js +0 -213
  381. package/xgplayer3/es/error.d.ts +0 -112
  382. package/xgplayer3/es/error.js +0 -154
  383. package/xgplayer3/es/events.d.ts +0 -48
  384. package/xgplayer3/es/events.js +0 -56
  385. package/xgplayer3/es/index-umd.d.ts +0 -57
  386. package/xgplayer3/es/index-umd.js +0 -64
  387. package/xgplayer3/es/index.d.ts +0 -11
  388. package/xgplayer3/es/index.js +0 -11
  389. package/xgplayer3/es/lang/en.d.ts +0 -91
  390. package/xgplayer3/es/lang/en.js +0 -76
  391. package/xgplayer3/es/lang/i18n.d.ts +0 -19
  392. package/xgplayer3/es/lang/i18n.js +0 -125
  393. package/xgplayer3/es/lang/index.d.ts +0 -2
  394. package/xgplayer3/es/lang/index.js +0 -2
  395. package/xgplayer3/es/lang/jp.d.ts +0 -91
  396. package/xgplayer3/es/lang/jp.js +0 -76
  397. package/xgplayer3/es/lang/zh-cn.d.ts +0 -91
  398. package/xgplayer3/es/lang/zh-cn.js +0 -76
  399. package/xgplayer3/es/lang/zh-hk.d.ts +0 -91
  400. package/xgplayer3/es/lang/zh-hk.js +0 -76
  401. package/xgplayer3/es/player.d.ts +0 -609
  402. package/xgplayer3/es/player.js +0 -2335
  403. package/xgplayer3/es/plugin/basePlugin.d.ts +0 -167
  404. package/xgplayer3/es/plugin/basePlugin.js +0 -429
  405. package/xgplayer3/es/plugin/hooksDescriptor.d.ts +0 -59
  406. package/xgplayer3/es/plugin/hooksDescriptor.js +0 -216
  407. package/xgplayer3/es/plugin/index.d.ts +0 -12
  408. package/xgplayer3/es/plugin/index.js +0 -10
  409. package/xgplayer3/es/plugin/plugin.d.ts +0 -201
  410. package/xgplayer3/es/plugin/plugin.js +0 -833
  411. package/xgplayer3/es/plugin/pluginsManager.d.ts +0 -93
  412. package/xgplayer3/es/plugin/pluginsManager.js +0 -394
  413. package/xgplayer3/es/plugin/preset.d.ts +0 -1
  414. package/xgplayer3/es/plugin/preset.js +0 -54
  415. package/xgplayer3/es/plugin/resizeObserver.d.ts +0 -3
  416. package/xgplayer3/es/plugin/resizeObserver.js +0 -147
  417. package/xgplayer3/es/plugins/assets/back.svg +0 -5
  418. package/xgplayer3/es/plugins/assets/download.svg +0 -14
  419. package/xgplayer3/es/plugins/assets/exitCssFull.svg +0 -3
  420. package/xgplayer3/es/plugins/assets/exitFull.svg +0 -3
  421. package/xgplayer3/es/plugins/assets/loading.svg +0 -3
  422. package/xgplayer3/es/plugins/assets/mobile/mPause.svg +0 -17
  423. package/xgplayer3/es/plugins/assets/mobile/mPlay.svg +0 -19
  424. package/xgplayer3/es/plugins/assets/mobile/mPlayNext.svg +0 -17
  425. package/xgplayer3/es/plugins/assets/panel.svg +0 -4
  426. package/xgplayer3/es/plugins/assets/pause.svg +0 -3
  427. package/xgplayer3/es/plugins/assets/pipIcon.svg +0 -5
  428. package/xgplayer3/es/plugins/assets/pipIconExit.svg +0 -8
  429. package/xgplayer3/es/plugins/assets/play.svg +0 -3
  430. package/xgplayer3/es/plugins/assets/playNext.svg +0 -3
  431. package/xgplayer3/es/plugins/assets/replay.svg +0 -3
  432. package/xgplayer3/es/plugins/assets/requestCssFull.svg +0 -3
  433. package/xgplayer3/es/plugins/assets/requestFull.svg +0 -3
  434. package/xgplayer3/es/plugins/assets/rotate.svg +0 -11
  435. package/xgplayer3/es/plugins/assets/seekicon.svg +0 -7
  436. package/xgplayer3/es/plugins/assets/volumeLarge.svg +0 -4
  437. package/xgplayer3/es/plugins/assets/volumeMuted.svg +0 -4
  438. package/xgplayer3/es/plugins/assets/volumeSmall.svg +0 -4
  439. package/xgplayer3/es/plugins/common/index.css +0 -128
  440. package/xgplayer3/es/plugins/common/optionList.d.ts +0 -14
  441. package/xgplayer3/es/plugins/common/optionList.js +0 -128
  442. package/xgplayer3/es/plugins/common/optionsIcon.css +0 -125
  443. package/xgplayer3/es/plugins/common/optionsIcon.d.ts +0 -30
  444. package/xgplayer3/es/plugins/common/optionsIcon.js +0 -264
  445. package/xgplayer3/es/plugins/common/thumbnail.css +0 -2
  446. package/xgplayer3/es/plugins/common/thumbnail.d.ts +0 -60
  447. package/xgplayer3/es/plugins/common/thumbnail.js +0 -241
  448. package/xgplayer3/es/plugins/controls/index.css +0 -151
  449. package/xgplayer3/es/plugins/controls/index.d.ts +0 -55
  450. package/xgplayer3/es/plugins/controls/index.js +0 -312
  451. package/xgplayer3/es/plugins/cssFullScreen/index.css +0 -11
  452. package/xgplayer3/es/plugins/cssFullScreen/index.d.ts +0 -27
  453. package/xgplayer3/es/plugins/cssFullScreen/index.js +0 -166
  454. package/xgplayer3/es/plugins/danmu/danmuIcon.d.ts +0 -13
  455. package/xgplayer3/es/plugins/danmu/danmuIcon.js +0 -122
  456. package/xgplayer3/es/plugins/danmu/danmuPanel.d.ts +0 -38
  457. package/xgplayer3/es/plugins/danmu/danmuPanel.js +0 -127
  458. package/xgplayer3/es/plugins/danmu/index.css +0 -553
  459. package/xgplayer3/es/plugins/danmu/index.d.ts +0 -94
  460. package/xgplayer3/es/plugins/danmu/index.js +0 -426
  461. package/xgplayer3/es/plugins/definition/index.css +0 -3
  462. package/xgplayer3/es/plugins/definition/index.d.ts +0 -53
  463. package/xgplayer3/es/plugins/definition/index.js +0 -289
  464. package/xgplayer3/es/plugins/download/index.css +0 -10
  465. package/xgplayer3/es/plugins/download/index.d.ts +0 -26
  466. package/xgplayer3/es/plugins/download/index.js +0 -147
  467. package/xgplayer3/es/plugins/dynamicBg/index.css +0 -15
  468. package/xgplayer3/es/plugins/dynamicBg/index.d.ts +0 -63
  469. package/xgplayer3/es/plugins/dynamicBg/index.js +0 -411
  470. package/xgplayer3/es/plugins/enter/index.css +0 -130
  471. package/xgplayer3/es/plugins/enter/index.d.ts +0 -18
  472. package/xgplayer3/es/plugins/enter/index.js +0 -86
  473. package/xgplayer3/es/plugins/error/index.css +0 -32
  474. package/xgplayer3/es/plugins/error/index.d.ts +0 -8
  475. package/xgplayer3/es/plugins/error/index.js +0 -112
  476. package/xgplayer3/es/plugins/fullscreen/backicon.d.ts +0 -9
  477. package/xgplayer3/es/plugins/fullscreen/backicon.js +0 -102
  478. package/xgplayer3/es/plugins/fullscreen/index.css +0 -21
  479. package/xgplayer3/es/plugins/fullscreen/index.d.ts +0 -59
  480. package/xgplayer3/es/plugins/fullscreen/index.js +0 -364
  481. package/xgplayer3/es/plugins/keyboard/index.d.ts +0 -68
  482. package/xgplayer3/es/plugins/keyboard/index.js +0 -385
  483. package/xgplayer3/es/plugins/loading/index.css +0 -82
  484. package/xgplayer3/es/plugins/loading/index.d.ts +0 -7
  485. package/xgplayer3/es/plugins/loading/index.js +0 -71
  486. package/xgplayer3/es/plugins/logger/index.d.ts +0 -30
  487. package/xgplayer3/es/plugins/logger/index.js +0 -237
  488. package/xgplayer3/es/plugins/miniScreen/index.css +0 -164
  489. package/xgplayer3/es/plugins/miniScreen/index.d.ts +0 -56
  490. package/xgplayer3/es/plugins/miniScreen/index.js +0 -298
  491. package/xgplayer3/es/plugins/miniScreen/miniScreenIcon.d.ts +0 -10
  492. package/xgplayer3/es/plugins/miniScreen/miniScreenIcon.js +0 -82
  493. package/xgplayer3/es/plugins/mobile/index.css +0 -134
  494. package/xgplayer3/es/plugins/mobile/index.d.ts +0 -119
  495. package/xgplayer3/es/plugins/mobile/index.js +0 -858
  496. package/xgplayer3/es/plugins/mobile/touch.d.ts +0 -43
  497. package/xgplayer3/es/plugins/mobile/touch.js +0 -277
  498. package/xgplayer3/es/plugins/netAdaption/index.d.ts +0 -5
  499. package/xgplayer3/es/plugins/netAdaption/index.js +0 -76
  500. package/xgplayer3/es/plugins/pc/index.css +0 -2
  501. package/xgplayer3/es/plugins/pc/index.d.ts +0 -16
  502. package/xgplayer3/es/plugins/pc/index.js +0 -272
  503. package/xgplayer3/es/plugins/pip/index.css +0 -11
  504. package/xgplayer3/es/plugins/pip/index.d.ts +0 -25
  505. package/xgplayer3/es/plugins/pip/index.js +0 -293
  506. package/xgplayer3/es/plugins/play/index.css +0 -11
  507. package/xgplayer3/es/plugins/play/index.d.ts +0 -12
  508. package/xgplayer3/es/plugins/play/index.js +0 -148
  509. package/xgplayer3/es/plugins/playNext/index.css +0 -16
  510. package/xgplayer3/es/plugins/playNext/index.d.ts +0 -15
  511. package/xgplayer3/es/plugins/playNext/index.js +0 -139
  512. package/xgplayer3/es/plugins/playbackRate/index.css +0 -3
  513. package/xgplayer3/es/plugins/playbackRate/index.d.ts +0 -28
  514. package/xgplayer3/es/plugins/playbackRate/index.js +0 -174
  515. package/xgplayer3/es/plugins/poster/index.css +0 -33
  516. package/xgplayer3/es/plugins/poster/index.d.ts +0 -24
  517. package/xgplayer3/es/plugins/poster/index.js +0 -155
  518. package/xgplayer3/es/plugins/progress/index.css +0 -212
  519. package/xgplayer3/es/plugins/progress/index.d.ts +0 -151
  520. package/xgplayer3/es/plugins/progress/index.js +0 -795
  521. package/xgplayer3/es/plugins/progress/innerList.d.ts +0 -37
  522. package/xgplayer3/es/plugins/progress/innerList.js +0 -232
  523. package/xgplayer3/es/plugins/progress/miniProgress.d.ts +0 -8
  524. package/xgplayer3/es/plugins/progress/miniProgress.js +0 -84
  525. package/xgplayer3/es/plugins/progressPreview/dotsApi.d.ts +0 -1
  526. package/xgplayer3/es/plugins/progressPreview/dotsApi.js +0 -260
  527. package/xgplayer3/es/plugins/progressPreview/index.css +0 -152
  528. package/xgplayer3/es/plugins/progressPreview/index.d.ts +0 -64
  529. package/xgplayer3/es/plugins/progressPreview/index.js +0 -407
  530. package/xgplayer3/es/plugins/prompt/index.css +0 -47
  531. package/xgplayer3/es/plugins/prompt/index.d.ts +0 -21
  532. package/xgplayer3/es/plugins/prompt/index.js +0 -148
  533. package/xgplayer3/es/plugins/replay/index.css +0 -39
  534. package/xgplayer3/es/plugins/replay/index.d.ts +0 -11
  535. package/xgplayer3/es/plugins/replay/index.js +0 -144
  536. package/xgplayer3/es/plugins/rotate/index.css +0 -0
  537. package/xgplayer3/es/plugins/rotate/index.d.ts +0 -16
  538. package/xgplayer3/es/plugins/rotate/index.js +0 -190
  539. package/xgplayer3/es/plugins/screenShot/index.css +0 -2
  540. package/xgplayer3/es/plugins/screenShot/index.d.ts +0 -25
  541. package/xgplayer3/es/plugins/screenShot/index.js +0 -177
  542. package/xgplayer3/es/plugins/start/index.css +0 -98
  543. package/xgplayer3/es/plugins/start/index.d.ts +0 -26
  544. package/xgplayer3/es/plugins/start/index.js +0 -310
  545. package/xgplayer3/es/plugins/time/index.css +0 -24
  546. package/xgplayer3/es/plugins/time/index.d.ts +0 -24
  547. package/xgplayer3/es/plugins/time/index.js +0 -252
  548. package/xgplayer3/es/plugins/track/index.css +0 -5
  549. package/xgplayer3/es/plugins/track/index.d.ts +0 -66
  550. package/xgplayer3/es/plugins/track/index.js +0 -346
  551. package/xgplayer3/es/plugins/volume/index.css +0 -89
  552. package/xgplayer3/es/plugins/volume/index.d.ts +0 -42
  553. package/xgplayer3/es/plugins/volume/index.js +0 -317
  554. package/xgplayer3/es/presets/default-en.d.ts +0 -30
  555. package/xgplayer3/es/presets/default-en.js +0 -84
  556. package/xgplayer3/es/presets/default.css +0 -1921
  557. package/xgplayer3/es/presets/default.d.ts +0 -105
  558. package/xgplayer3/es/presets/default.js +0 -89
  559. package/xgplayer3/es/presets/live.css +0 -1840
  560. package/xgplayer3/es/presets/live.d.ts +0 -94
  561. package/xgplayer3/es/presets/live.js +0 -52
  562. package/xgplayer3/es/presets/mobile.css +0 -1585
  563. package/xgplayer3/es/presets/mobile.d.ts +0 -103
  564. package/xgplayer3/es/presets/mobile.js +0 -41
  565. package/xgplayer3/es/proxy.d.ts +0 -283
  566. package/xgplayer3/es/proxy.js +0 -819
  567. package/xgplayer3/es/stateClassMap.d.ts +0 -30
  568. package/xgplayer3/es/stateClassMap.js +0 -30
  569. package/xgplayer3/es/style/common/animation.css +0 -27
  570. package/xgplayer3/es/style/common/svg-url.css +0 -0
  571. package/xgplayer3/es/style/common.css +0 -276
  572. package/xgplayer3/es/style/index.css +0 -405
  573. package/xgplayer3/es/style/variable.css +0 -0
  574. package/xgplayer3/es/utils/database.d.ts +0 -31
  575. package/xgplayer3/es/utils/database.js +0 -147
  576. package/xgplayer3/es/utils/debug.d.ts +0 -10
  577. package/xgplayer3/es/utils/debug.js +0 -53
  578. package/xgplayer3/es/utils/draggabilly.d.ts +0 -54
  579. package/xgplayer3/es/utils/draggabilly.js +0 -548
  580. package/xgplayer3/es/utils/sniffer.d.ts +0 -21
  581. package/xgplayer3/es/utils/sniffer.js +0 -113
  582. package/xgplayer3/es/utils/url.d.ts +0 -1
  583. package/xgplayer3/es/utils/url.js +0 -10
  584. package/xgplayer3/es/utils/util.d.ts +0 -241
  585. package/xgplayer3/es/utils/util.js +0 -875
  586. package/xgplayer3/es/utils/xgplayerTimeRange.d.ts +0 -7
  587. package/xgplayer3/es/utils/xgplayerTimeRange.js +0 -34
  588. package/xgplayer3/es/version.d.ts +0 -5
  589. package/xgplayer3/es/version.js +0 -5
  590. package/xgplayer3/es/xgplayer.d.ts +0 -16
  591. package/xgplayer3/es/xgplayer.js +0 -34
  592. package/xgplayer3/lib/constant.js +0 -12
  593. package/xgplayer3/lib/defaultConfig.js +0 -220
  594. package/xgplayer3/lib/error.js +0 -165
  595. package/xgplayer3/lib/events.js +0 -110
  596. package/xgplayer3/lib/index-umd.js +0 -87
  597. package/xgplayer3/lib/index.js +0 -90
  598. package/xgplayer3/lib/lang/en.js +0 -83
  599. package/xgplayer3/lib/lang/i18n.js +0 -136
  600. package/xgplayer3/lib/lang/index.js +0 -13
  601. package/xgplayer3/lib/lang/jp.js +0 -83
  602. package/xgplayer3/lib/lang/zh-cn.js +0 -83
  603. package/xgplayer3/lib/lang/zh-hk.js +0 -83
  604. package/xgplayer3/lib/player.js +0 -2439
  605. package/xgplayer3/lib/plugin/basePlugin.js +0 -476
  606. package/xgplayer3/lib/plugin/hooksDescriptor.js +0 -227
  607. package/xgplayer3/lib/plugin/index.js +0 -94
  608. package/xgplayer3/lib/plugin/plugin.js +0 -851
  609. package/xgplayer3/lib/plugin/pluginsManager.js +0 -402
  610. package/xgplayer3/lib/plugin/preset.js +0 -63
  611. package/xgplayer3/lib/plugin/resizeObserver.js +0 -154
  612. package/xgplayer3/lib/plugins/assets/back.svg +0 -5
  613. package/xgplayer3/lib/plugins/assets/download.svg +0 -14
  614. package/xgplayer3/lib/plugins/assets/exitCssFull.svg +0 -3
  615. package/xgplayer3/lib/plugins/assets/exitFull.svg +0 -3
  616. package/xgplayer3/lib/plugins/assets/loading.svg +0 -3
  617. package/xgplayer3/lib/plugins/assets/mobile/mPause.svg +0 -17
  618. package/xgplayer3/lib/plugins/assets/mobile/mPlay.svg +0 -19
  619. package/xgplayer3/lib/plugins/assets/mobile/mPlayNext.svg +0 -17
  620. package/xgplayer3/lib/plugins/assets/panel.svg +0 -4
  621. package/xgplayer3/lib/plugins/assets/pause.svg +0 -3
  622. package/xgplayer3/lib/plugins/assets/pipIcon.svg +0 -5
  623. package/xgplayer3/lib/plugins/assets/pipIconExit.svg +0 -8
  624. package/xgplayer3/lib/plugins/assets/play.svg +0 -3
  625. package/xgplayer3/lib/plugins/assets/playNext.svg +0 -3
  626. package/xgplayer3/lib/plugins/assets/replay.svg +0 -3
  627. package/xgplayer3/lib/plugins/assets/requestCssFull.svg +0 -3
  628. package/xgplayer3/lib/plugins/assets/requestFull.svg +0 -3
  629. package/xgplayer3/lib/plugins/assets/rotate.svg +0 -11
  630. package/xgplayer3/lib/plugins/assets/seekicon.svg +0 -7
  631. package/xgplayer3/lib/plugins/assets/volumeLarge.svg +0 -4
  632. package/xgplayer3/lib/plugins/assets/volumeMuted.svg +0 -4
  633. package/xgplayer3/lib/plugins/assets/volumeSmall.svg +0 -4
  634. package/xgplayer3/lib/plugins/common/index.css +0 -128
  635. package/xgplayer3/lib/plugins/common/optionList.js +0 -145
  636. package/xgplayer3/lib/plugins/common/optionsIcon.css +0 -125
  637. package/xgplayer3/lib/plugins/common/optionsIcon.js +0 -278
  638. package/xgplayer3/lib/plugins/common/thumbnail.css +0 -2
  639. package/xgplayer3/lib/plugins/common/thumbnail.js +0 -253
  640. package/xgplayer3/lib/plugins/controls/index.css +0 -151
  641. package/xgplayer3/lib/plugins/controls/index.js +0 -326
  642. package/xgplayer3/lib/plugins/cssFullScreen/index.css +0 -11
  643. package/xgplayer3/lib/plugins/cssFullScreen/index.js +0 -178
  644. package/xgplayer3/lib/plugins/danmu/danmuIcon.js +0 -135
  645. package/xgplayer3/lib/plugins/danmu/danmuPanel.js +0 -140
  646. package/xgplayer3/lib/plugins/danmu/index.css +0 -553
  647. package/xgplayer3/lib/plugins/danmu/index.js +0 -456
  648. package/xgplayer3/lib/plugins/definition/index.css +0 -3
  649. package/xgplayer3/lib/plugins/definition/index.js +0 -299
  650. package/xgplayer3/lib/plugins/download/index.css +0 -10
  651. package/xgplayer3/lib/plugins/download/index.js +0 -162
  652. package/xgplayer3/lib/plugins/dynamicBg/index.css +0 -15
  653. package/xgplayer3/lib/plugins/dynamicBg/index.js +0 -428
  654. package/xgplayer3/lib/plugins/enter/index.css +0 -130
  655. package/xgplayer3/lib/plugins/enter/index.js +0 -99
  656. package/xgplayer3/lib/plugins/error/index.css +0 -32
  657. package/xgplayer3/lib/plugins/error/index.js +0 -123
  658. package/xgplayer3/lib/plugins/fullscreen/backicon.js +0 -114
  659. package/xgplayer3/lib/plugins/fullscreen/index.css +0 -21
  660. package/xgplayer3/lib/plugins/fullscreen/index.js +0 -379
  661. package/xgplayer3/lib/plugins/keyboard/index.js +0 -393
  662. package/xgplayer3/lib/plugins/loading/index.css +0 -82
  663. package/xgplayer3/lib/plugins/loading/index.js +0 -84
  664. package/xgplayer3/lib/plugins/logger/index.js +0 -252
  665. package/xgplayer3/lib/plugins/miniScreen/index.css +0 -164
  666. package/xgplayer3/lib/plugins/miniScreen/index.js +0 -323
  667. package/xgplayer3/lib/plugins/miniScreen/miniScreenIcon.js +0 -94
  668. package/xgplayer3/lib/plugins/mobile/index.css +0 -134
  669. package/xgplayer3/lib/plugins/mobile/index.js +0 -874
  670. package/xgplayer3/lib/plugins/mobile/touch.js +0 -285
  671. package/xgplayer3/lib/plugins/netAdaption/index.js +0 -84
  672. package/xgplayer3/lib/plugins/pc/index.css +0 -2
  673. package/xgplayer3/lib/plugins/pc/index.js +0 -281
  674. package/xgplayer3/lib/plugins/pip/index.css +0 -11
  675. package/xgplayer3/lib/plugins/pip/index.js +0 -308
  676. package/xgplayer3/lib/plugins/play/index.css +0 -11
  677. package/xgplayer3/lib/plugins/play/index.js +0 -161
  678. package/xgplayer3/lib/plugins/playNext/index.css +0 -16
  679. package/xgplayer3/lib/plugins/playNext/index.js +0 -148
  680. package/xgplayer3/lib/plugins/playbackRate/index.css +0 -3
  681. package/xgplayer3/lib/plugins/playbackRate/index.js +0 -184
  682. package/xgplayer3/lib/plugins/poster/index.css +0 -33
  683. package/xgplayer3/lib/plugins/poster/index.js +0 -168
  684. package/xgplayer3/lib/plugins/progress/index.css +0 -212
  685. package/xgplayer3/lib/plugins/progress/index.js +0 -818
  686. package/xgplayer3/lib/plugins/progress/innerList.js +0 -241
  687. package/xgplayer3/lib/plugins/progress/miniProgress.js +0 -94
  688. package/xgplayer3/lib/plugins/progressPreview/dotsApi.js +0 -271
  689. package/xgplayer3/lib/plugins/progressPreview/index.css +0 -152
  690. package/xgplayer3/lib/plugins/progressPreview/index.js +0 -431
  691. package/xgplayer3/lib/plugins/prompt/index.css +0 -47
  692. package/xgplayer3/lib/plugins/prompt/index.js +0 -163
  693. package/xgplayer3/lib/plugins/replay/index.css +0 -39
  694. package/xgplayer3/lib/plugins/replay/index.js +0 -159
  695. package/xgplayer3/lib/plugins/rotate/index.css +0 -0
  696. package/xgplayer3/lib/plugins/rotate/index.js +0 -203
  697. package/xgplayer3/lib/plugins/screenShot/index.css +0 -2
  698. package/xgplayer3/lib/plugins/screenShot/index.js +0 -188
  699. package/xgplayer3/lib/plugins/start/index.css +0 -98
  700. package/xgplayer3/lib/plugins/start/index.js +0 -326
  701. package/xgplayer3/lib/plugins/time/index.css +0 -24
  702. package/xgplayer3/lib/plugins/time/index.js +0 -273
  703. package/xgplayer3/lib/plugins/track/index.css +0 -5
  704. package/xgplayer3/lib/plugins/track/index.js +0 -357
  705. package/xgplayer3/lib/plugins/volume/index.css +0 -89
  706. package/xgplayer3/lib/plugins/volume/index.js +0 -335
  707. package/xgplayer3/lib/presets/default-en.js +0 -121
  708. package/xgplayer3/lib/presets/default.css +0 -1921
  709. package/xgplayer3/lib/presets/default.js +0 -127
  710. package/xgplayer3/lib/presets/live.css +0 -1840
  711. package/xgplayer3/lib/presets/live.js +0 -77
  712. package/xgplayer3/lib/presets/mobile.css +0 -1585
  713. package/xgplayer3/lib/presets/mobile.js +0 -73
  714. package/xgplayer3/lib/proxy.js +0 -837
  715. package/xgplayer3/lib/stateClassMap.js +0 -37
  716. package/xgplayer3/lib/style/common/animation.css +0 -27
  717. package/xgplayer3/lib/style/common/svg-url.css +0 -0
  718. package/xgplayer3/lib/style/common.css +0 -276
  719. package/xgplayer3/lib/style/index.css +0 -405
  720. package/xgplayer3/lib/style/variable.css +0 -0
  721. package/xgplayer3/lib/utils/database.js +0 -155
  722. package/xgplayer3/lib/utils/debug.js +0 -59
  723. package/xgplayer3/lib/utils/draggabilly.js +0 -557
  724. package/xgplayer3/lib/utils/sniffer.js +0 -121
  725. package/xgplayer3/lib/utils/url.js +0 -19
  726. package/xgplayer3/lib/utils/util.js +0 -888
  727. package/xgplayer3/lib/utils/xgplayerTimeRange.js +0 -41
  728. package/xgplayer3/lib/version.js +0 -13
  729. 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;