xgplayer 2.32.5 → 2.32.6

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 (371) hide show
  1. package/browser/controls/airplay.js +1 -1
  2. package/browser/controls/cssFullscreen.js +1 -1
  3. package/browser/controls/danmu.js +3 -1
  4. package/browser/controls/definition.js +1 -1
  5. package/browser/controls/download.js +1 -1
  6. package/browser/controls/enter.js +1 -1
  7. package/browser/controls/error.js +1 -1
  8. package/browser/controls/errorRetry.js +1 -1
  9. package/browser/controls/flex.js +1 -1
  10. package/browser/controls/fullscreen.js +1 -1
  11. package/browser/controls/loading.js +1 -1
  12. package/browser/controls/memoryPlay.js +1 -1
  13. package/browser/controls/miniplayer.js +9 -7
  14. package/browser/controls/mobile.js +1 -1
  15. package/browser/controls/nativeTextTrack.js +1 -1
  16. package/browser/controls/pc.js +1 -1
  17. package/browser/controls/pip.js +1 -1
  18. package/browser/controls/play.js +1 -1
  19. package/browser/controls/playNext.js +1 -1
  20. package/browser/controls/playbackRate.js +1 -1
  21. package/browser/controls/poster.js +1 -1
  22. package/browser/controls/progress.js +1 -1
  23. package/browser/controls/reload.js +1 -1
  24. package/browser/controls/replay.js +1 -1
  25. package/browser/controls/rotate.js +1 -1
  26. package/browser/controls/screenShot.js +1 -1
  27. package/browser/controls/start.js +1 -1
  28. package/browser/controls/textTrack.js +1 -1
  29. package/browser/controls/time.js +1 -1
  30. package/browser/controls/volume.js +1 -1
  31. package/browser/core_player.js +1 -1
  32. package/browser/core_player.js.map +1 -1
  33. package/browser/index.js +11 -7
  34. package/browser/index.js.map +1 -1
  35. package/browser/simple_player.js +1 -1
  36. package/browser/simple_player.js.map +1 -1
  37. package/dist/controls/airplay.js +1 -1
  38. package/dist/controls/cssFullscreen.js +1 -1
  39. package/dist/controls/danmu.js +3 -1
  40. package/dist/controls/definition.js +1 -1
  41. package/dist/controls/download.js +1 -1
  42. package/dist/controls/enter.js +1 -1
  43. package/dist/controls/error.js +1 -1
  44. package/dist/controls/errorRetry.js +1 -1
  45. package/dist/controls/flex.js +1 -1
  46. package/dist/controls/fullscreen.js +1 -1
  47. package/dist/controls/loading.js +1 -1
  48. package/dist/controls/memoryPlay.js +1 -1
  49. package/dist/controls/miniplayer.js +9 -7
  50. package/dist/controls/mobile.js +1 -1
  51. package/dist/controls/nativeTextTrack.js +1 -1
  52. package/dist/controls/pc.js +1 -1
  53. package/dist/controls/pip.js +1 -1
  54. package/dist/controls/play.js +1 -1
  55. package/dist/controls/playNext.js +1 -1
  56. package/dist/controls/playbackRate.js +1 -1
  57. package/dist/controls/poster.js +1 -1
  58. package/dist/controls/progress.js +1 -1
  59. package/dist/controls/reload.js +1 -1
  60. package/dist/controls/replay.js +1 -1
  61. package/dist/controls/rotate.js +1 -1
  62. package/dist/controls/screenShot.js +1 -1
  63. package/dist/controls/start.js +1 -1
  64. package/dist/controls/textTrack.js +1 -1
  65. package/dist/controls/time.js +1 -1
  66. package/dist/controls/volume.js +1 -1
  67. package/dist/core_player.js +2960 -2889
  68. package/dist/core_player.js.map +1 -1
  69. package/dist/index.js +1938 -3321
  70. package/dist/index.js.map +1 -1
  71. package/dist/index.min.css +1 -0
  72. package/dist/index.min.js +2 -0
  73. package/dist/index.min.js.map +1 -0
  74. package/dist/simple_player.js +274 -281
  75. package/dist/simple_player.js.map +1 -1
  76. package/es/_virtual/_rollupPluginBabelHelpers.js +216 -0
  77. package/es/constant.d.ts +4 -0
  78. package/es/constant.js +5 -0
  79. package/es/controls/airplay.js +1 -1
  80. package/es/controls/cssFullscreen.js +1 -1
  81. package/es/controls/danmu.js +3 -1
  82. package/es/controls/definition.js +1 -1
  83. package/es/controls/download.js +1 -1
  84. package/es/controls/enter.js +1 -1
  85. package/es/controls/error.js +1 -1
  86. package/es/controls/errorRetry.js +1 -1
  87. package/es/controls/flex.js +1 -1
  88. package/es/controls/fullscreen.js +1 -1
  89. package/es/controls/i18n.js +1 -1
  90. package/es/controls/keyboard.js +1 -1
  91. package/es/controls/loading.js +1 -1
  92. package/es/controls/localPreview.js +1 -1
  93. package/es/controls/memoryPlay.js +1 -1
  94. package/es/controls/miniplayer.js +9 -7
  95. package/es/controls/mobile.js +1 -1
  96. package/es/controls/nativeTextTrack.js +1 -1
  97. package/es/controls/pc.js +1 -1
  98. package/es/controls/pip.js +1 -1
  99. package/es/controls/play.js +1 -1
  100. package/es/controls/playNext.js +1 -1
  101. package/es/controls/playbackRate.js +1 -1
  102. package/es/controls/poster.js +1 -1
  103. package/es/controls/progress.js +1 -1
  104. package/es/controls/reload.js +1 -1
  105. package/es/controls/replay.js +1 -1
  106. package/es/controls/rotate.js +1 -1
  107. package/es/controls/screenShot.js +1 -1
  108. package/es/controls/start.js +1 -1
  109. package/es/controls/textTrack.js +1 -1
  110. package/es/controls/time.js +1 -1
  111. package/es/controls/volume.js +1 -1
  112. package/es/core_player.js +1 -1
  113. package/es/core_player.js.map +1 -1
  114. package/es/defaultConfig.d.ts +243 -0
  115. package/es/defaultConfig.js +85 -0
  116. package/es/error.d.ts +114 -0
  117. package/es/error.js +75 -0
  118. package/es/events.d.ts +61 -0
  119. package/es/events.js +62 -0
  120. package/es/icons.d.ts +2 -0
  121. package/es/index.css +499 -0
  122. package/es/index.d.ts +25 -0
  123. package/es/index.js +11 -7
  124. package/es/index.js.map +1 -1
  125. package/es/index.scss +29 -0
  126. package/es/index.umd.d.ts +60 -0
  127. package/es/index.umd.js +30 -0
  128. package/es/lang/en.d.ts +91 -0
  129. package/es/lang/en.js +77 -0
  130. package/es/lang/i18n.d.ts +36 -0
  131. package/es/lang/i18n.js +122 -0
  132. package/es/lang/index.d.ts +2 -0
  133. package/es/lang/jp.d.ts +91 -0
  134. package/es/lang/jp.js +77 -0
  135. package/es/lang/zh-cn.d.ts +91 -0
  136. package/es/lang/zh-cn.js +77 -0
  137. package/es/lang/zh-hk.d.ts +91 -0
  138. package/es/lang/zh-hk.js +77 -0
  139. package/es/mediaProxy.d.ts +334 -0
  140. package/es/mediaProxy.js +623 -0
  141. package/es/player.d.ts +825 -0
  142. package/es/player.js +1945 -0
  143. package/es/plugin/basePlugin.d.ts +180 -0
  144. package/es/plugin/basePlugin.js +259 -0
  145. package/es/plugin/hooksDescriptor.d.ts +60 -0
  146. package/es/plugin/hooksDescriptor.js +149 -0
  147. package/es/plugin/index.d.ts +13 -0
  148. package/es/plugin/plugin.d.ts +207 -0
  149. package/es/plugin/plugin.js +542 -0
  150. package/es/plugin/pluginsManager.d.ts +162 -0
  151. package/es/plugin/pluginsManager.js +362 -0
  152. package/es/plugin/preset.d.ts +1 -0
  153. package/es/plugin/preset.js +28 -0
  154. package/es/plugin/resizeObserver.d.ts +3 -0
  155. package/es/plugin/resizeObserver.js +108 -0
  156. package/es/plugins/assets/back.js +4 -0
  157. package/es/plugins/assets/download.js +4 -0
  158. package/es/plugins/assets/exitCssFull.js +4 -0
  159. package/es/plugins/assets/exitFull.js +4 -0
  160. package/es/plugins/assets/loading.js +4 -0
  161. package/es/plugins/assets/panel.js +4 -0
  162. package/es/plugins/assets/pause.js +4 -0
  163. package/es/plugins/assets/pipIcon.js +4 -0
  164. package/es/plugins/assets/pipIconExit.js +4 -0
  165. package/es/plugins/assets/play.js +4 -0
  166. package/es/plugins/assets/playNext.js +4 -0
  167. package/es/plugins/assets/replay.js +4 -0
  168. package/es/plugins/assets/requestCssFull.js +7 -0
  169. package/es/plugins/assets/requestFull.js +4 -0
  170. package/es/plugins/assets/rotate.js +4 -0
  171. package/es/plugins/assets/seekicon.js +4 -0
  172. package/es/plugins/assets/volumeLarge.js +4 -0
  173. package/es/plugins/assets/volumeMuted.js +4 -0
  174. package/es/plugins/assets/volumeSmall.js +4 -0
  175. package/es/plugins/common/iconPlugin.d.ts +5 -0
  176. package/es/plugins/common/iconPlugin.js +42 -0
  177. package/es/plugins/common/iconTools.d.ts +1 -0
  178. package/es/plugins/common/iconTools.js +8 -0
  179. package/es/plugins/common/index.scss +2 -0
  180. package/es/plugins/common/optionList.d.ts +15 -0
  181. package/es/plugins/common/optionList.js +120 -0
  182. package/es/plugins/common/optionsIcon.d.ts +40 -0
  183. package/es/plugins/common/optionsIcon.js +304 -0
  184. package/es/plugins/common/optionsIcon.scss +154 -0
  185. package/es/plugins/common/thumbnail.d.ts +62 -0
  186. package/es/plugins/common/thumbnail.js +191 -0
  187. package/es/plugins/common/thumbnail.scss +27 -0
  188. package/es/plugins/controls/index.css +132 -0
  189. package/es/plugins/controls/index.d.ts +73 -0
  190. package/es/plugins/controls/index.js +189 -0
  191. package/es/plugins/controls/index.scss +204 -0
  192. package/es/plugins/cssFullScreen/index.css +12 -0
  193. package/es/plugins/cssFullScreen/index.d.ts +40 -0
  194. package/es/plugins/cssFullScreen/index.js +136 -0
  195. package/es/plugins/cssFullScreen/index.scss +19 -0
  196. package/es/plugins/danmu/danmuIcon.d.ts +24 -0
  197. package/es/plugins/danmu/danmuIcon.js +98 -0
  198. package/es/plugins/danmu/danmuPanel.d.ts +39 -0
  199. package/es/plugins/danmu/danmuPanel.js +81 -0
  200. package/es/plugins/danmu/index.css +603 -0
  201. package/es/plugins/danmu/index.d.ts +96 -0
  202. package/es/plugins/danmu/index.js +313 -0
  203. package/es/plugins/danmu/index.scss +356 -0
  204. package/es/plugins/definition/index.css +4 -0
  205. package/es/plugins/definition/index.d.ts +38 -0
  206. package/es/plugins/definition/index.js +164 -0
  207. package/es/plugins/definition/index.scss +4 -0
  208. package/es/plugins/download/index.css +13 -0
  209. package/es/plugins/download/index.d.ts +31 -0
  210. package/es/plugins/download/index.js +107 -0
  211. package/es/plugins/download/index.scss +22 -0
  212. package/es/plugins/dynamicBg/index.css +16 -0
  213. package/es/plugins/dynamicBg/index.d.ts +83 -0
  214. package/es/plugins/dynamicBg/index.js +316 -0
  215. package/es/plugins/dynamicBg/index.scss +19 -0
  216. package/es/plugins/enter/index.css +104 -0
  217. package/es/plugins/enter/index.d.ts +19 -0
  218. package/es/plugins/enter/index.js +46 -0
  219. package/es/plugins/enter/index.scss +78 -0
  220. package/es/plugins/error/index.css +29 -0
  221. package/es/plugins/error/index.d.ts +8 -0
  222. package/es/plugins/error/index.js +75 -0
  223. package/es/plugins/error/index.scss +34 -0
  224. package/es/plugins/fpsDetect/index.d.ts +34 -0
  225. package/es/plugins/fpsDetect/index.js +149 -0
  226. package/es/plugins/fullscreen/backicon.d.ts +17 -0
  227. package/es/plugins/fullscreen/backicon.js +72 -0
  228. package/es/plugins/fullscreen/index.css +23 -0
  229. package/es/plugins/fullscreen/index.d.ts +58 -0
  230. package/es/plugins/fullscreen/index.js +202 -0
  231. package/es/plugins/fullscreen/index.scss +35 -0
  232. package/es/plugins/gapJump/index.d.ts +21 -0
  233. package/es/plugins/gapJump/index.js +142 -0
  234. package/es/plugins/keyboard/index.d.ts +89 -0
  235. package/es/plugins/keyboard/index.js +421 -0
  236. package/es/plugins/loading/index.css +58 -0
  237. package/es/plugins/loading/index.d.ts +11 -0
  238. package/es/plugins/loading/index.js +43 -0
  239. package/es/plugins/loading/index.scss +70 -0
  240. package/es/plugins/logger/index.d.ts +54 -0
  241. package/es/plugins/logger/index.js +311 -0
  242. package/es/plugins/miniScreen/index.css +179 -0
  243. package/es/plugins/miniScreen/index.d.ts +68 -0
  244. package/es/plugins/miniScreen/index.js +212 -0
  245. package/es/plugins/miniScreen/index.scss +198 -0
  246. package/es/plugins/miniScreen/miniScreenIcon.d.ts +11 -0
  247. package/es/plugins/miniScreen/miniScreenIcon.js +56 -0
  248. package/es/plugins/mobile/index.css +181 -0
  249. package/es/plugins/mobile/index.d.ts +125 -0
  250. package/es/plugins/mobile/index.js +631 -0
  251. package/es/plugins/mobile/index.scss +180 -0
  252. package/es/plugins/mobile/touch.d.ts +43 -0
  253. package/es/plugins/mobile/touch.js +214 -0
  254. package/es/plugins/netAdaption/index.d.ts +5 -0
  255. package/es/plugins/pc/index.css +3 -0
  256. package/es/plugins/pc/index.d.ts +14 -0
  257. package/es/plugins/pc/index.js +199 -0
  258. package/es/plugins/pc/index.scss +5 -0
  259. package/es/plugins/pip/index.css +12 -0
  260. package/es/plugins/pip/index.d.ts +37 -0
  261. package/es/plugins/pip/index.js +222 -0
  262. package/es/plugins/pip/index.scss +21 -0
  263. package/es/plugins/play/index.css +12 -0
  264. package/es/plugins/play/index.d.ts +23 -0
  265. package/es/plugins/play/index.js +127 -0
  266. package/es/plugins/play/index.scss +18 -0
  267. package/es/plugins/playNext/index.css +22 -0
  268. package/es/plugins/playNext/index.d.ts +19 -0
  269. package/es/plugins/playNext/index.js +104 -0
  270. package/es/plugins/playNext/index.scss +35 -0
  271. package/es/plugins/playbackRate/index.css +4 -0
  272. package/es/plugins/playbackRate/index.d.ts +31 -0
  273. package/es/plugins/playbackRate/index.js +140 -0
  274. package/es/plugins/playbackRate/index.scss +6 -0
  275. package/es/plugins/poster/index.css +39 -0
  276. package/es/plugins/poster/index.d.ts +27 -0
  277. package/es/plugins/poster/index.js +109 -0
  278. package/es/plugins/poster/index.scss +56 -0
  279. package/es/plugins/progress/index.css +234 -0
  280. package/es/plugins/progress/index.d.ts +178 -0
  281. package/es/plugins/progress/index.js +687 -0
  282. package/es/plugins/progress/index.scss +288 -0
  283. package/es/plugins/progress/innerList.d.ts +49 -0
  284. package/es/plugins/progress/innerList.js +285 -0
  285. package/es/plugins/progress/miniProgress.d.ts +9 -0
  286. package/es/plugins/progress/miniProgress.js +55 -0
  287. package/es/plugins/progressPreview/dotsApi.d.ts +1 -0
  288. package/es/plugins/progressPreview/dotsApi.js +269 -0
  289. package/es/plugins/progressPreview/index.css +190 -0
  290. package/es/plugins/progressPreview/index.d.ts +87 -0
  291. package/es/plugins/progressPreview/index.js +475 -0
  292. package/es/plugins/progressPreview/index.scss +235 -0
  293. package/es/plugins/prompt/index.css +47 -0
  294. package/es/plugins/prompt/index.d.ts +24 -0
  295. package/es/plugins/prompt/index.js +110 -0
  296. package/es/plugins/prompt/index.scss +53 -0
  297. package/es/plugins/replay/index.css +33 -0
  298. package/es/plugins/replay/index.d.ts +16 -0
  299. package/es/plugins/replay/index.js +109 -0
  300. package/es/plugins/replay/index.scss +41 -0
  301. package/es/plugins/rotate/index.css +0 -0
  302. package/es/plugins/rotate/index.d.ts +22 -0
  303. package/es/plugins/rotate/index.js +148 -0
  304. package/es/plugins/rotate/index.scss +0 -0
  305. package/es/plugins/rotate/index2.js +2 -0
  306. package/es/plugins/screenShot/index.css +3 -0
  307. package/es/plugins/screenShot/index.d.ts +30 -0
  308. package/es/plugins/screenShot/index.js +178 -0
  309. package/es/plugins/screenShot/index.scss +5 -0
  310. package/es/plugins/start/index.css +91 -0
  311. package/es/plugins/start/index.d.ts +41 -0
  312. package/es/plugins/start/index.js +267 -0
  313. package/es/plugins/start/index.scss +115 -0
  314. package/es/plugins/stats/index.d.ts +38 -0
  315. package/es/plugins/stats/index.js +194 -0
  316. package/es/plugins/testspeed/index.d.ts +26 -0
  317. package/es/plugins/testspeed/index.js +207 -0
  318. package/es/plugins/time/index.css +46 -0
  319. package/es/plugins/time/index.d.ts +28 -0
  320. package/es/plugins/time/index.js +225 -0
  321. package/es/plugins/time/index.scss +57 -0
  322. package/es/plugins/time/timesegments.d.ts +24 -0
  323. package/es/plugins/time/timesegments.js +216 -0
  324. package/es/plugins/track/index.css +91 -0
  325. package/es/plugins/track/index.d.ts +132 -0
  326. package/es/plugins/track/index.js +463 -0
  327. package/es/plugins/track/index.scss +111 -0
  328. package/es/plugins/track/nativeSubTitle.d.ts +22 -0
  329. package/es/plugins/track/nativeSubTitle.js +94 -0
  330. package/es/plugins/volume/index.css +95 -0
  331. package/es/plugins/volume/index.d.ts +88 -0
  332. package/es/plugins/volume/index.js +319 -0
  333. package/es/plugins/volume/index.scss +124 -0
  334. package/es/plugins/waitingTimeoutJump/index.d.ts +15 -0
  335. package/es/plugins/waitingTimeoutJump/index.js +88 -0
  336. package/es/presets/default-en.d.ts +33 -0
  337. package/es/presets/default-en.js +63 -0
  338. package/es/presets/default.d.ts +34 -0
  339. package/es/presets/default.js +70 -0
  340. package/es/presets/index.d.ts +4 -0
  341. package/es/presets/live.d.ts +94 -0
  342. package/es/presets/live.js +39 -0
  343. package/es/presets/mobile.d.ts +103 -0
  344. package/es/presets/mobile.js +34 -0
  345. package/es/simple_player.js +1 -1
  346. package/es/simple_player.js.map +1 -1
  347. package/es/state.d.ts +11 -0
  348. package/es/state.js +12 -0
  349. package/es/stateClassMap.d.ts +32 -0
  350. package/es/stateClassMap.js +32 -0
  351. package/es/style/common/animation.scss +16 -0
  352. package/es/style/common/svg-url.scss +70 -0
  353. package/es/style/common.scss +457 -0
  354. package/es/style/index.scss +4 -0
  355. package/es/style/variable.scss +76 -0
  356. package/es/utils/database.d.ts +31 -0
  357. package/es/utils/database.js +107 -0
  358. package/es/utils/debug.d.ts +10 -0
  359. package/es/utils/debug.js +43 -0
  360. package/es/utils/draggabilly.d.ts +54 -0
  361. package/es/utils/draggabilly.js +410 -0
  362. package/es/utils/sniffer.d.ts +28 -0
  363. package/es/utils/sniffer.js +150 -0
  364. package/es/utils/url.d.ts +1 -0
  365. package/es/utils/util.d.ts +304 -0
  366. package/es/utils/util.js +827 -0
  367. package/es/utils/xgplayerTimeRange.d.ts +7 -0
  368. package/es/utils/xgplayerTimeRange.js +25 -0
  369. package/es/version.d.ts +2 -0
  370. package/es/version.js +2 -0
  371. package/package.json +2 -3
@@ -0,0 +1,91 @@
1
+ declare namespace _default {
2
+ const LANG: string;
3
+ namespace TEXT {
4
+ namespace ERROR_TYPES {
5
+ namespace network {
6
+ const code: number;
7
+ const msg: string;
8
+ }
9
+ namespace mse {
10
+ const code_1: number;
11
+ export { code_1 as code };
12
+ const msg_1: string;
13
+ export { msg_1 as msg };
14
+ }
15
+ namespace parse {
16
+ const code_2: number;
17
+ export { code_2 as code };
18
+ const msg_2: string;
19
+ export { msg_2 as msg };
20
+ }
21
+ namespace format {
22
+ const code_3: number;
23
+ export { code_3 as code };
24
+ const msg_3: string;
25
+ export { msg_3 as msg };
26
+ }
27
+ namespace decoder {
28
+ const code_4: number;
29
+ export { code_4 as code };
30
+ const msg_4: string;
31
+ export { msg_4 as msg };
32
+ }
33
+ namespace runtime {
34
+ const code_5: number;
35
+ export { code_5 as code };
36
+ const msg_5: string;
37
+ export { msg_5 as msg };
38
+ }
39
+ namespace timeout {
40
+ const code_6: number;
41
+ export { code_6 as code };
42
+ const msg_6: string;
43
+ export { msg_6 as msg };
44
+ }
45
+ namespace other {
46
+ const code_7: number;
47
+ export { code_7 as code };
48
+ const msg_7: string;
49
+ export { msg_7 as msg };
50
+ }
51
+ }
52
+ const HAVE_NOTHING: string;
53
+ const HAVE_METADATA: string;
54
+ const HAVE_CURRENT_DATA: string;
55
+ const HAVE_FUTURE_DATA: string;
56
+ const HAVE_ENOUGH_DATA: string;
57
+ const NETWORK_EMPTY: string;
58
+ const NETWORK_IDLE: string;
59
+ const NETWORK_LOADING: string;
60
+ const NETWORK_NO_SOURCE: string;
61
+ const MEDIA_ERR_ABORTED: string;
62
+ const MEDIA_ERR_NETWORK: string;
63
+ const MEDIA_ERR_DECODE: string;
64
+ const MEDIA_ERR_SRC_NOT_SUPPORTED: string;
65
+ const REPLAY: string;
66
+ const ERROR: string;
67
+ const PLAY_TIPS: string;
68
+ const PAUSE_TIPS: string;
69
+ const PLAYNEXT_TIPS: string;
70
+ const DOWNLOAD_TIPS: string;
71
+ const ROTATE_TIPS: string;
72
+ const RELOAD_TIPS: string;
73
+ const FULLSCREEN_TIPS: string;
74
+ const EXITFULLSCREEN_TIPS: string;
75
+ const CSSFULLSCREEN_TIPS: string;
76
+ const EXITCSSFULLSCREEN_TIPS: string;
77
+ const TEXTTRACK: string;
78
+ const PIP: string;
79
+ const SCREENSHOT: string;
80
+ const LIVE: string;
81
+ const OFF: string;
82
+ const OPEN: string;
83
+ const MINI_DRAG: string;
84
+ const MINISCREEN: string;
85
+ const REFRESH_TIPS: string;
86
+ const REFRESH: string;
87
+ const FORWARD: string;
88
+ const LIVE_TIP: string;
89
+ }
90
+ }
91
+ export default _default;
@@ -0,0 +1,77 @@
1
+ var ZH = {
2
+ LANG: "zh-cn",
3
+ TEXT: {
4
+ ERROR_TYPES: {
5
+ network: {
6
+ code: 1,
7
+ msg: "\u89C6\u9891\u4E0B\u8F7D\u9519\u8BEF"
8
+ },
9
+ mse: {
10
+ code: 2,
11
+ msg: "\u6D41\u8FFD\u52A0\u9519\u8BEF"
12
+ },
13
+ parse: {
14
+ code: 3,
15
+ msg: "\u89E3\u6790\u9519\u8BEF"
16
+ },
17
+ format: {
18
+ code: 4,
19
+ msg: "\u683C\u5F0F\u9519\u8BEF"
20
+ },
21
+ decoder: {
22
+ code: 5,
23
+ msg: "\u89E3\u7801\u9519\u8BEF"
24
+ },
25
+ runtime: {
26
+ code: 6,
27
+ msg: "\u8BED\u6CD5\u9519\u8BEF"
28
+ },
29
+ timeout: {
30
+ code: 7,
31
+ msg: "\u64AD\u653E\u8D85\u65F6"
32
+ },
33
+ other: {
34
+ code: 8,
35
+ msg: "\u5176\u4ED6\u9519\u8BEF"
36
+ }
37
+ },
38
+ HAVE_NOTHING: "\u6CA1\u6709\u5173\u4E8E\u97F3\u9891/\u89C6\u9891\u662F\u5426\u5C31\u7EEA\u7684\u4FE1\u606F",
39
+ HAVE_METADATA: "\u97F3\u9891/\u89C6\u9891\u7684\u5143\u6570\u636E\u5DF2\u5C31\u7EEA",
40
+ HAVE_CURRENT_DATA: "\u5173\u4E8E\u5F53\u524D\u64AD\u653E\u4F4D\u7F6E\u7684\u6570\u636E\u662F\u53EF\u7528\u7684\uFF0C\u4F46\u6CA1\u6709\u8DB3\u591F\u7684\u6570\u636E\u6765\u64AD\u653E\u4E0B\u4E00\u5E27/\u6BEB\u79D2",
41
+ HAVE_FUTURE_DATA: "\u5F53\u524D\u53CA\u81F3\u5C11\u4E0B\u4E00\u5E27\u7684\u6570\u636E\u662F\u53EF\u7528\u7684",
42
+ HAVE_ENOUGH_DATA: "\u53EF\u7528\u6570\u636E\u8DB3\u4EE5\u5F00\u59CB\u64AD\u653E",
43
+ NETWORK_EMPTY: "\u97F3\u9891/\u89C6\u9891\u5C1A\u672A\u521D\u59CB\u5316",
44
+ NETWORK_IDLE: "\u97F3\u9891/\u89C6\u9891\u662F\u6D3B\u52A8\u7684\u4E14\u5DF2\u9009\u53D6\u8D44\u6E90\uFF0C\u4F46\u5E76\u672A\u4F7F\u7528\u7F51\u7EDC",
45
+ NETWORK_LOADING: "\u6D4F\u89C8\u5668\u6B63\u5728\u4E0B\u8F7D\u6570\u636E",
46
+ NETWORK_NO_SOURCE: "\u672A\u627E\u5230\u97F3\u9891/\u89C6\u9891\u6765\u6E90",
47
+ MEDIA_ERR_ABORTED: "\u53D6\u56DE\u8FC7\u7A0B\u88AB\u7528\u6237\u4E2D\u6B62",
48
+ MEDIA_ERR_NETWORK: "\u7F51\u7EDC\u9519\u8BEF",
49
+ MEDIA_ERR_DECODE: "\u89E3\u7801\u9519\u8BEF",
50
+ MEDIA_ERR_SRC_NOT_SUPPORTED: "\u4E0D\u652F\u6301\u7684\u97F3\u9891/\u89C6\u9891\u683C\u5F0F",
51
+ REPLAY: "\u91CD\u64AD",
52
+ ERROR: "\u7F51\u7EDC\u8FDE\u63A5\u4F3C\u4E4E\u51FA\u73B0\u4E86\u95EE\u9898",
53
+ PLAY_TIPS: "\u64AD\u653E",
54
+ PAUSE_TIPS: "\u6682\u505C",
55
+ PLAYNEXT_TIPS: "\u4E0B\u4E00\u96C6",
56
+ DOWNLOAD_TIPS: "\u4E0B\u8F7D",
57
+ ROTATE_TIPS: "\u65CB\u8F6C",
58
+ RELOAD_TIPS: "\u91CD\u65B0\u8F7D\u5165",
59
+ FULLSCREEN_TIPS: "\u8FDB\u5165\u5168\u5C4F",
60
+ EXITFULLSCREEN_TIPS: "\u9000\u51FA\u5168\u5C4F",
61
+ CSSFULLSCREEN_TIPS: "\u8FDB\u5165\u6837\u5F0F\u5168\u5C4F",
62
+ EXITCSSFULLSCREEN_TIPS: "\u9000\u51FA\u6837\u5F0F\u5168\u5C4F",
63
+ TEXTTRACK: "\u5B57\u5E55",
64
+ PIP: "\u753B\u4E2D\u753B",
65
+ SCREENSHOT: "\u622A\u56FE",
66
+ LIVE: "\u6B63\u5728\u76F4\u64AD",
67
+ OFF: "\u5173\u95ED",
68
+ OPEN: "\u5F00\u542F",
69
+ MINI_DRAG: "\u70B9\u51FB\u6309\u4F4F\u53EF\u62D6\u52A8\u89C6\u9891",
70
+ MINISCREEN: "\u5C0F\u5C4F\u5E55",
71
+ REFRESH_TIPS: "\u8BF7\u8BD5\u8BD5",
72
+ REFRESH: "\u5237\u65B0",
73
+ FORWARD: "\u5FEB\u8FDB\u4E2D",
74
+ LIVE_TIP: "\u76F4\u64AD"
75
+ }
76
+ };
77
+ export { ZH as default };
@@ -0,0 +1,91 @@
1
+ declare namespace _default {
2
+ const LANG: string;
3
+ namespace TEXT {
4
+ namespace ERROR_TYPES {
5
+ namespace network {
6
+ const code: number;
7
+ const msg: string;
8
+ }
9
+ namespace mse {
10
+ const code_1: number;
11
+ export { code_1 as code };
12
+ const msg_1: string;
13
+ export { msg_1 as msg };
14
+ }
15
+ namespace parse {
16
+ const code_2: number;
17
+ export { code_2 as code };
18
+ const msg_2: string;
19
+ export { msg_2 as msg };
20
+ }
21
+ namespace format {
22
+ const code_3: number;
23
+ export { code_3 as code };
24
+ const msg_3: string;
25
+ export { msg_3 as msg };
26
+ }
27
+ namespace decoder {
28
+ const code_4: number;
29
+ export { code_4 as code };
30
+ const msg_4: string;
31
+ export { msg_4 as msg };
32
+ }
33
+ namespace runtime {
34
+ const code_5: number;
35
+ export { code_5 as code };
36
+ const msg_5: string;
37
+ export { msg_5 as msg };
38
+ }
39
+ namespace timeout {
40
+ const code_6: number;
41
+ export { code_6 as code };
42
+ const msg_6: string;
43
+ export { msg_6 as msg };
44
+ }
45
+ namespace other {
46
+ const code_7: number;
47
+ export { code_7 as code };
48
+ const msg_7: string;
49
+ export { msg_7 as msg };
50
+ }
51
+ }
52
+ const HAVE_NOTHING: string;
53
+ const HAVE_METADATA: string;
54
+ const HAVE_CURRENT_DATA: string;
55
+ const HAVE_FUTURE_DATA: string;
56
+ const HAVE_ENOUGH_DATA: string;
57
+ const NETWORK_EMPTY: string;
58
+ const NETWORK_IDLE: string;
59
+ const NETWORK_LOADING: string;
60
+ const NETWORK_NO_SOURCE: string;
61
+ const MEDIA_ERR_ABORTED: string;
62
+ const MEDIA_ERR_NETWORK: string;
63
+ const MEDIA_ERR_DECODE: string;
64
+ const MEDIA_ERR_SRC_NOT_SUPPORTED: string;
65
+ const REPLAY: string;
66
+ const ERROR: string;
67
+ const PLAY_TIPS: string;
68
+ const PAUSE_TIPS: string;
69
+ const PLAYNEXT_TIPS: string;
70
+ const DOWNLOAD_TIPS: string;
71
+ const ROTATE_TIPS: string;
72
+ const RELOAD_TIPS: string;
73
+ const FULLSCREEN_TIPS: string;
74
+ const EXITFULLSCREEN_TIPS: string;
75
+ const CSSFULLSCREEN_TIPS: string;
76
+ const EXITCSSFULLSCREEN_TIPS: string;
77
+ const TEXTTRACK: string;
78
+ const PIP: string;
79
+ const SCREENSHOT: string;
80
+ const LIVE: string;
81
+ const OFF: string;
82
+ const OPEN: string;
83
+ const MINI_DRAG: string;
84
+ const MINISCREEN: string;
85
+ const REFRESH_TIPS: string;
86
+ const REFRESH: string;
87
+ const FORWARD: string;
88
+ const LIVE_TIP: string;
89
+ }
90
+ }
91
+ export default _default;
@@ -0,0 +1,77 @@
1
+ var zhHk = {
2
+ LANG: "zh-hk",
3
+ TEXT: {
4
+ ERROR_TYPES: {
5
+ network: {
6
+ code: 1,
7
+ msg: "\u8996\u983B\u4E0B\u8F09\u932F\u8AA4"
8
+ },
9
+ mse: {
10
+ code: 2,
11
+ msg: "\u5289\u8FFD\u52A0\u932F\u8AA4"
12
+ },
13
+ parse: {
14
+ code: 3,
15
+ msg: "\u89E3\u6790\u932F\u8AA4"
16
+ },
17
+ format: {
18
+ code: 4,
19
+ msg: "\u683C\u5F0F\u932F\u8AA4"
20
+ },
21
+ decoder: {
22
+ code: 5,
23
+ msg: "\u89E3\u78BC\u932F\u8AA4"
24
+ },
25
+ runtime: {
26
+ code: 6,
27
+ msg: "\u8A9E\u6CD5\u932F\u8AA4"
28
+ },
29
+ timeout: {
30
+ code: 7,
31
+ msg: "\u64AD\u653E\u8D85\u6642"
32
+ },
33
+ other: {
34
+ code: 8,
35
+ msg: "\u5176\u4ED6\u932F\u8AA4"
36
+ }
37
+ },
38
+ HAVE_NOTHING: "\u6C92\u6709\u95DC\u65BC\u97F3\u983B/\u8996\u983B\u662F\u5426\u5C31\u7DD2\u7684\u4FE1\u606F",
39
+ HAVE_METADATA: "\u97F3\u983B/\u8996\u983B\u7684\u5143\u6578\u64DA\u5DF2\u5C31\u7DD2",
40
+ HAVE_CURRENT_DATA: "\u95DC\u65BC\u7576\u524D\u64AD\u653E\u4F4D\u7F6E\u7684\u6578\u64DA\u662F\u53EF\u7528\u7684\uFF0C\u4F46\u6C92\u6709\u8DB3\u5920\u7684\u6578\u64DA\u4F86\u64AD\u653E\u4E0B\u58F9\u5E40/\u6BEB\u79D2",
41
+ HAVE_FUTURE_DATA: "\u7576\u524D\u53CA\u81F3\u5C11\u4E0B\u58F9\u5E40\u7684\u6578\u64DA\u662F\u53EF\u7528\u7684",
42
+ HAVE_ENOUGH_DATA: "\u53EF\u7528\u6578\u64DA\u8DB3\u4EE5\u958B\u59CB\u64AD\u653E",
43
+ NETWORK_EMPTY: "\u97F3\u983B/\u8996\u983B\u5C1A\u672A\u521D\u59CB\u5316",
44
+ NETWORK_IDLE: "\u97F3\u983B/\u8996\u983B\u662F\u6D3B\u52D5\u7684\u4E14\u5DF2\u9078\u53D6\u8CC7\u6E90\uFF0C\u4F46\u4E26\u672A\u4F7F\u7528\u7DB2\u7D61",
45
+ NETWORK_LOADING: "\u700F\u89BD\u5668\u6B63\u5728\u4E0B\u8F09\u6578\u64DA",
46
+ NETWORK_NO_SOURCE: "\u672A\u627E\u5230\u97F3\u983B/\u8996\u983B\u4F86\u6E90",
47
+ MEDIA_ERR_ABORTED: "\u53D6\u56DE\u904E\u7A0B\u88AB\u7528\u6236\u4E2D\u6B62",
48
+ MEDIA_ERR_NETWORK: "\u4E0B\u8F09\u932F\u8AA4",
49
+ MEDIA_ERR_DECODE: "\u89E3\u78BC\u932F\u8AA4",
50
+ MEDIA_ERR_SRC_NOT_SUPPORTED: "\u4E0D\u652F\u6301\u7684\u97F3\u983B/\u8996\u983B\u683C\u5F0F",
51
+ REPLAY: "\u91CD\u64AD",
52
+ ERROR: "\u7DB2\u7D61\u9023\u63A5\u4F3C\u4E4E\u51FA\u73FE\u4E86\u554F\u984C",
53
+ PLAY_TIPS: "\u64AD\u653E",
54
+ PAUSE_TIPS: "\u66AB\u505C",
55
+ PLAYNEXT_TIPS: "\u4E0B\u58F9\u96C6",
56
+ DOWNLOAD_TIPS: "\u4E0B\u8F09",
57
+ ROTATE_TIPS: "\u65CB\u8F49",
58
+ RELOAD_TIPS: "\u91CD\u65B0\u8F09\u5165",
59
+ FULLSCREEN_TIPS: "\u9032\u5165\u5168\u5C4F",
60
+ EXITFULLSCREEN_TIPS: "\u9000\u51FA\u5168\u5C4F",
61
+ CSSFULLSCREEN_TIPS: "\u9032\u5165\u6A23\u5F0F\u5168\u5C4F",
62
+ EXITCSSFULLSCREEN_TIPS: "\u9000\u51FA\u6A23\u5F0F\u5168\u5C4F",
63
+ TEXTTRACK: "\u5B57\u5E55",
64
+ PIP: "\u756B\u4E2D\u756B",
65
+ SCREENSHOT: "\u622A\u5716",
66
+ LIVE: "\u6B63\u5728\u76F4\u64AD",
67
+ OFF: "\u95DC\u9589",
68
+ OPEN: "\u958B\u555F",
69
+ MINI_DRAG: "\u9EDE\u64CA\u6309\u4F4F\u53EF\u62D6\u52D5\u8996\u983B",
70
+ MINISCREEN: "\u5C0F\u5C4F\u5E55",
71
+ REFRESH_TIPS: "\u8ACB\u8A66\u8A66",
72
+ REFRESH: "\u5237\u65B0",
73
+ FORWARD: "\u5FEB\u8FDB\u4E2D",
74
+ LIVE_TIP: "\u76F4\u64AD"
75
+ }
76
+ };
77
+ export { zhHk as default };
@@ -0,0 +1,334 @@
1
+ export default MediaProxy;
2
+ export type EventEmitter = import('eventemitter3');
3
+ export type IMediaProxy = {
4
+ duration: number;
5
+ currentTime: number;
6
+ muted: boolean;
7
+ defaultMuted: boolean;
8
+ volume: number;
9
+ playbackRate: number;
10
+ defaultPlaybackRate: number;
11
+ autoplay: boolean;
12
+ readonly paused: boolean;
13
+ readonly ended: boolean;
14
+ readonly networkState: number;
15
+ readonly readyState: number;
16
+ readonly seeking: boolean;
17
+ src: any;
18
+ play: Function;
19
+ pause: Function;
20
+ };
21
+ /**
22
+ * @extends { EventEmitter }
23
+ */
24
+ declare class MediaProxy {
25
+ constructor(options: any);
26
+ /**
27
+ * @private
28
+ */
29
+ private _hasStart;
30
+ /**
31
+ * @private
32
+ */
33
+ private _currentTime;
34
+ /**
35
+ * @private
36
+ */
37
+ private _duration;
38
+ /**
39
+ * @private
40
+ */
41
+ private _internalOp;
42
+ /**
43
+ * @private
44
+ */
45
+ private _lastMuted;
46
+ /**
47
+ * @type {string}
48
+ * 当前播放类型
49
+ */
50
+ vtype: string;
51
+ /**
52
+ * @type {number}
53
+ * @private
54
+ */
55
+ private _rate;
56
+ /**
57
+ * @description 初始化时添加在video上的属性集合
58
+ * @type { {[propName: string]: any } }
59
+ */
60
+ mediaConfig: {
61
+ [propName: string]: any;
62
+ };
63
+ /**
64
+ * @type { HTMLVideoElement | HTMLAudioElement | HTMLElement | IMediaProxy | null }
65
+ */
66
+ media: HTMLVideoElement | HTMLAudioElement | HTMLElement | IMediaProxy | null;
67
+ set volume(arg: number);
68
+ /**
69
+ * @type { number }
70
+ * @description 设置/返回视频的音量
71
+ */
72
+ get volume(): number;
73
+ /**
74
+ * @private
75
+ */
76
+ private _interval;
77
+ /**
78
+ * @readonly
79
+ */
80
+ readonly mediaEventMiddleware: {};
81
+ /**
82
+ * @description set middleware
83
+ * @param { {[propName: string]: (e: {player: any, eventName: string}, callback: () => void) => any} } middlewares
84
+ */
85
+ setEventsMiddleware(middlewares: {
86
+ [propName: string]: (e: {
87
+ player: any;
88
+ eventName: string;
89
+ }, callback: () => void) => any;
90
+ }): void;
91
+ /**
92
+ * @description remove middleware
93
+ * @param { { [propName: string]: (e: {player: any, eventName: string}, callback: () => void) => any} } middlewares
94
+ */
95
+ removeEventsMiddleware(middlewares: {
96
+ [propName: string]: (e: {
97
+ player: any;
98
+ eventName: string;
99
+ }, callback: () => void) => any;
100
+ }): void;
101
+ /**
102
+ * Add media eventListener to the video object
103
+ * @param { any } [media]
104
+ */
105
+ attachVideoEvents(media?: any): void;
106
+ /**
107
+ * @private
108
+ */
109
+ private _evHandlers;
110
+ /**
111
+ * @description remove media eventListener from the video object
112
+ * @param { any } [media]
113
+ */
114
+ detachVideoEvents(media?: any): void;
115
+ /**
116
+ * 针对source列表播放方式添加错误监听
117
+ * @doc https://stackoverflow.com/questions/47557135/html5-detect-the-type-of-error-when-trying-to-load-a-video-using-a-source-elem
118
+ * @protected
119
+ * @param { HTMLVideoElement | HTMLAudioElement } video
120
+ * @param { Array<{src: string, type: string }>} urls
121
+ */
122
+ protected _attachSourceEvents(video: HTMLVideoElement | HTMLAudioElement, urls: Array<{
123
+ src: string;
124
+ type: string;
125
+ }>): void;
126
+ /**
127
+ * @private
128
+ */
129
+ private _videoSourceCount;
130
+ _videoSourceIndex: number;
131
+ _vLoadeddata: (e: any) => void;
132
+ _sourceError: (e: any) => void;
133
+ /**
134
+ * 移除source列表错误事件监听
135
+ * @protected
136
+ * @param { HTMLVideoElement | HTMLAudioElement } video
137
+ */
138
+ protected _detachSourceEvents(video: HTMLVideoElement | HTMLAudioElement): void;
139
+ /**
140
+ * @description Media Error handler
141
+ * @param { string } eventName
142
+ */
143
+ errorHandler(name: any, error?: any): void;
144
+ destroy(): void;
145
+ /**
146
+ * @type { HTMLVideoElement | HTMLAudioElement | HTMLElement | IMediaProxy | null }
147
+ * @deprecated Property [video] is renamed to [media],you can access using player.media= xx
148
+ */
149
+ set video(arg: HTMLElement | HTMLVideoElement | HTMLAudioElement | IMediaProxy);
150
+ /**
151
+ * @type { HTMLVideoElement | HTMLAudioElement | HTMLElement | IMediaProxy | null }
152
+ * @deprecated Property [video] is renamed to [media],you can access using player.media
153
+ */
154
+ get video(): HTMLElement | HTMLVideoElement | HTMLAudioElement | IMediaProxy;
155
+ /**
156
+ *
157
+ * @returns { Promise<void> | null }
158
+ */
159
+ play(): Promise<void> | null;
160
+ pause(): void;
161
+ load(): void;
162
+ /**
163
+ *
164
+ * @param { string } type
165
+ * @returns { boolean }
166
+ */
167
+ canPlayType(type: string): boolean;
168
+ /**
169
+ *
170
+ * @param { any } [buffered]
171
+ * @returns { Array<number> }
172
+ */
173
+ getBufferedRange(buffered?: any): Array<number>;
174
+ /**
175
+ * @type { boolean }
176
+ * @description 设置/返回 自动播放属性
177
+ */
178
+ set autoplay(arg: any);
179
+ get autoplay(): any;
180
+ /**
181
+ * @type { TimeRanges | null }
182
+ * @description 返回当前缓冲的TimeRange对象集合
183
+ */
184
+ get buffered(): TimeRanges;
185
+ /**
186
+ * @type { Array<{start: number, end: number}> | null}
187
+ * @description 返回当前自定义的缓存列表
188
+ */
189
+ get buffered2(): {
190
+ start: number;
191
+ end: number;
192
+ }[];
193
+ /**
194
+ * @type { {start: number, end: number} }
195
+ */
196
+ get bufferedPoint(): {
197
+ start: number;
198
+ end: number;
199
+ };
200
+ set crossOrigin(arg: string);
201
+ /**
202
+ * @type { string}
203
+ * @description 设置/返回是否跨域
204
+ * */
205
+ get crossOrigin(): string;
206
+ set currentSrc(arg: string);
207
+ /**
208
+ * @type { string }
209
+ * @description 设置/返回视频播放地址
210
+ * */
211
+ get currentSrc(): string;
212
+ set currentTime(arg: number);
213
+ /**
214
+ * @type { number }
215
+ * @description 设置/返回视频当前播放时间
216
+ * */
217
+ get currentTime(): number;
218
+ set defaultMuted(arg: boolean);
219
+ /**
220
+ * @type { boolean }
221
+ * 设置/返回视频默认静音
222
+ * */
223
+ get defaultMuted(): boolean;
224
+ /**
225
+ * @type { number }
226
+ * @description 返回视频时长,单位:s
227
+ * */
228
+ get duration(): number;
229
+ /**
230
+ * @type { boolean }
231
+ * @description 回视频是否播放结束
232
+ * */
233
+ get ended(): boolean;
234
+ /**
235
+ * @type { MediaError }
236
+ * @description the player current error
237
+ */
238
+ get error(): MediaError;
239
+ /**
240
+ * @type { string }
241
+ * @description return error description text
242
+ */
243
+ get errorNote(): string;
244
+ set loop(arg: boolean);
245
+ /**
246
+ * @type { boolean }
247
+ * @description 否开启了循环播放
248
+ */
249
+ get loop(): boolean;
250
+ set muted(arg: boolean);
251
+ /**
252
+ * @type { boolean }
253
+ * @description 静音
254
+ */
255
+ get muted(): boolean;
256
+ /**
257
+ * @type { 0 | 1 | 2 | 3 }
258
+ * @description 返回视频的当前网络状态
259
+ */
260
+ get networkState(): 0 | 2 | 1 | 3;
261
+ /**
262
+ * @type { boolean }
263
+ * @description 回当前视频是否是暂停状态
264
+ */
265
+ get paused(): boolean;
266
+ set playbackRate(arg: number);
267
+ /**
268
+ * @type { number }
269
+ * @description 返回/设置倍速
270
+ */
271
+ get playbackRate(): number;
272
+ /**
273
+ * @type { TimeRanges | null}
274
+ */
275
+ get played(): TimeRanges;
276
+ set preload(arg: boolean);
277
+ /**
278
+ * @type { boolean }
279
+ */
280
+ get preload(): boolean;
281
+ /**
282
+ * @type { 0 | 1 | 2 | 3 | 4 }
283
+ * @description 回视频的就绪状态
284
+ */
285
+ get readyState(): 0 | 2 | 1 | 3 | 4;
286
+ /**
287
+ * @type { boolean }
288
+ * @description 当前视频是否可以seek
289
+ */
290
+ get seekable(): boolean;
291
+ /**
292
+ * @type { boolean }
293
+ * @description 当前视频是否处于seeking状态下
294
+ */
295
+ get seeking(): boolean;
296
+ set src(arg: any);
297
+ /**
298
+ * @type { any }
299
+ * @description 设置/返回当前视频的地址
300
+ */
301
+ get src(): any;
302
+ addInnerOP(event: any): void;
303
+ removeInnerOP(event: any): void;
304
+ /** ******************* 以下api只有申明作用,具体实现依赖EventEmitter ******************/
305
+ /**
306
+ *
307
+ * @param { string } event
308
+ * @param { any } [data]
309
+ * @returns
310
+ */
311
+ emit(event: string, data?: any, ...args: any[]): void;
312
+ /**
313
+ *
314
+ * @param { string } event
315
+ * @param { (data?: any) => any } callback
316
+ * @returns
317
+ */
318
+ on(event: string, callback: (data?: any) => any, ...args: any[]): void;
319
+ /**
320
+ *
321
+ * @param { string } event
322
+ * @param { (data?: any) => any } callback
323
+ * @returns
324
+ */
325
+ once(event: string, callback: (data?: any) => any, ...args: any[]): void;
326
+ /**
327
+ *
328
+ * @param { string } event
329
+ * @param { (data?: any) => any } callback
330
+ * @returns
331
+ */
332
+ off(event: string, callback: (data?: any) => any, ...args: any[]): void;
333
+ offAll(): void;
334
+ }