@robot-admin/naive-ui-components 0.3.0

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 (352) hide show
  1. package/README.md +257 -0
  2. package/dist/C_ActionBar-DWN-woTc.css.map +1 -0
  3. package/dist/C_ActionBar.cjs +5 -0
  4. package/dist/C_ActionBar.d.cts +2 -0
  5. package/dist/C_ActionBar.d.ts +2 -0
  6. package/dist/C_ActionBar.js +4 -0
  7. package/dist/C_ActionBar2.js +196 -0
  8. package/dist/C_ActionBar2.js.map +1 -0
  9. package/dist/C_AntV-AFKyK6hH.css.map +1 -0
  10. package/dist/C_AntV.cjs +8 -0
  11. package/dist/C_AntV.d.cts +2 -0
  12. package/dist/C_AntV.d.ts +2 -0
  13. package/dist/C_AntV.js +4 -0
  14. package/dist/C_AntV2.js +3150 -0
  15. package/dist/C_AntV2.js.map +1 -0
  16. package/dist/C_Barcode-P_EFj8dC.css.map +1 -0
  17. package/dist/C_Barcode.cjs +4 -0
  18. package/dist/C_Barcode.d.cts +2 -0
  19. package/dist/C_Barcode.d.ts +2 -0
  20. package/dist/C_Barcode.js +3 -0
  21. package/dist/C_Barcode2.js +68 -0
  22. package/dist/C_Barcode2.js.map +1 -0
  23. package/dist/C_Captcha-C-ef41xw.css.map +1 -0
  24. package/dist/C_Captcha.cjs +4 -0
  25. package/dist/C_Captcha.d.cts +2 -0
  26. package/dist/C_Captcha.d.ts +2 -0
  27. package/dist/C_Captcha.js +3 -0
  28. package/dist/C_Captcha2.js +155 -0
  29. package/dist/C_Captcha2.js.map +1 -0
  30. package/dist/C_Cascade-D9kNsjsV.css.map +1 -0
  31. package/dist/C_Cascade.cjs +4 -0
  32. package/dist/C_Cascade.d.cts +2 -0
  33. package/dist/C_Cascade.d.ts +2 -0
  34. package/dist/C_Cascade.js +3 -0
  35. package/dist/C_Cascade2.js +103 -0
  36. package/dist/C_Cascade2.js.map +1 -0
  37. package/dist/C_City-BCQ4ipiK.css.map +1 -0
  38. package/dist/C_City.cjs +4 -0
  39. package/dist/C_City.d.cts +2 -0
  40. package/dist/C_City.d.ts +2 -0
  41. package/dist/C_City.js +3 -0
  42. package/dist/C_City2.js +841 -0
  43. package/dist/C_City2.js.map +1 -0
  44. package/dist/C_Code-C9kvvEmO.css.map +1 -0
  45. package/dist/C_Code.cjs +5 -0
  46. package/dist/C_Code.d.cts +2 -0
  47. package/dist/C_Code.d.ts +2 -0
  48. package/dist/C_Code.js +4 -0
  49. package/dist/C_Code2.js +346 -0
  50. package/dist/C_Code2.js.map +1 -0
  51. package/dist/C_CollapsePanel-BUJHuYcU.css.map +1 -0
  52. package/dist/C_CollapsePanel.cjs +6 -0
  53. package/dist/C_CollapsePanel.d.cts +2 -0
  54. package/dist/C_CollapsePanel.d.ts +2 -0
  55. package/dist/C_CollapsePanel.js +4 -0
  56. package/dist/C_CollapsePanel2.js +319 -0
  57. package/dist/C_CollapsePanel2.js.map +1 -0
  58. package/dist/C_Cron-yx2Ob4Jl.css.map +1 -0
  59. package/dist/C_Cron.cjs +15 -0
  60. package/dist/C_Cron.d.cts +2 -0
  61. package/dist/C_Cron.d.ts +2 -0
  62. package/dist/C_Cron.js +4 -0
  63. package/dist/C_Cron2.js +1209 -0
  64. package/dist/C_Cron2.js.map +1 -0
  65. package/dist/C_Date.cjs +4 -0
  66. package/dist/C_Date.d.cts +2 -0
  67. package/dist/C_Date.d.ts +2 -0
  68. package/dist/C_Date.js +3 -0
  69. package/dist/C_Date2.js +219 -0
  70. package/dist/C_Date2.js.map +1 -0
  71. package/dist/C_Draggable-C483syRC.css.map +1 -0
  72. package/dist/C_Draggable.cjs +5 -0
  73. package/dist/C_Draggable.d.cts +2 -0
  74. package/dist/C_Draggable.d.ts +2 -0
  75. package/dist/C_Draggable.js +3 -0
  76. package/dist/C_Draggable2.js +295 -0
  77. package/dist/C_Draggable2.js.map +1 -0
  78. package/dist/C_Editor-Bp0SyIEw.css.map +1 -0
  79. package/dist/C_Editor.cjs +4 -0
  80. package/dist/C_Editor.d.cts +2 -0
  81. package/dist/C_Editor.d.ts +2 -0
  82. package/dist/C_Editor.js +3 -0
  83. package/dist/C_Editor2.js +160 -0
  84. package/dist/C_Editor2.js.map +1 -0
  85. package/dist/C_FilePreview-CPqvhoCy.css.map +1 -0
  86. package/dist/C_FilePreview.cjs +6 -0
  87. package/dist/C_FilePreview.d.cts +2 -0
  88. package/dist/C_FilePreview.d.ts +2 -0
  89. package/dist/C_FilePreview.js +3 -0
  90. package/dist/C_FilePreview2.js +1031 -0
  91. package/dist/C_FilePreview2.js.map +1 -0
  92. package/dist/C_Form-Jx7PY3sT.css.map +1 -0
  93. package/dist/C_Form.cjs +15 -0
  94. package/dist/C_Form.d.cts +2 -0
  95. package/dist/C_Form.d.ts +2 -0
  96. package/dist/C_Form.js +4 -0
  97. package/dist/C_Form2.js +2510 -0
  98. package/dist/C_Form2.js.map +1 -0
  99. package/dist/C_FormSearch-DvRgxlRn.css.map +1 -0
  100. package/dist/C_FormSearch.cjs +6 -0
  101. package/dist/C_FormSearch.d.cts +2 -0
  102. package/dist/C_FormSearch.d.ts +2 -0
  103. package/dist/C_FormSearch.js +3 -0
  104. package/dist/C_FormSearch2.js +356 -0
  105. package/dist/C_FormSearch2.js.map +1 -0
  106. package/dist/C_FormulaEditor-DtGkt4T_.css.map +1 -0
  107. package/dist/C_FormulaEditor.cjs +13 -0
  108. package/dist/C_FormulaEditor.d.cts +2 -0
  109. package/dist/C_FormulaEditor.d.ts +2 -0
  110. package/dist/C_FormulaEditor.js +4 -0
  111. package/dist/C_FormulaEditor2.js +1433 -0
  112. package/dist/C_FormulaEditor2.js.map +1 -0
  113. package/dist/C_FullCalendar-BF7H0YIx.css.map +1 -0
  114. package/dist/C_FullCalendar.cjs +9 -0
  115. package/dist/C_FullCalendar.d.cts +2 -0
  116. package/dist/C_FullCalendar.d.ts +2 -0
  117. package/dist/C_FullCalendar.js +3 -0
  118. package/dist/C_FullCalendar2.js +377 -0
  119. package/dist/C_FullCalendar2.js.map +1 -0
  120. package/dist/C_Guide.cjs +4 -0
  121. package/dist/C_Guide.d.cts +2 -0
  122. package/dist/C_Guide.d.ts +2 -0
  123. package/dist/C_Guide.js +3 -0
  124. package/dist/C_Guide2.js +58 -0
  125. package/dist/C_Guide2.js.map +1 -0
  126. package/dist/C_Icon.cjs +4 -0
  127. package/dist/C_Icon.d.cts +2 -0
  128. package/dist/C_Icon.d.ts +2 -0
  129. package/dist/C_Icon.js +3 -0
  130. package/dist/C_Icon2.js +286 -0
  131. package/dist/C_Icon2.js.map +1 -0
  132. package/dist/C_ImageCropper-BVJfUufl.css.map +1 -0
  133. package/dist/C_ImageCropper.cjs +6 -0
  134. package/dist/C_ImageCropper.d.cts +2 -0
  135. package/dist/C_ImageCropper.d.ts +2 -0
  136. package/dist/C_ImageCropper.js +4 -0
  137. package/dist/C_ImageCropper2.js +723 -0
  138. package/dist/C_ImageCropper2.js.map +1 -0
  139. package/dist/C_Language.cjs +4 -0
  140. package/dist/C_Language.d.cts +2 -0
  141. package/dist/C_Language.d.ts +2 -0
  142. package/dist/C_Language.js +3 -0
  143. package/dist/C_Language2.js +72 -0
  144. package/dist/C_Language2.js.map +1 -0
  145. package/dist/C_Map-DpzeuWdX.css.map +1 -0
  146. package/dist/C_Map.cjs +7 -0
  147. package/dist/C_Map.d.cts +2 -0
  148. package/dist/C_Map.d.ts +2 -0
  149. package/dist/C_Map.js +3 -0
  150. package/dist/C_Map2.js +199 -0
  151. package/dist/C_Map2.js.map +1 -0
  152. package/dist/C_Markdown-BEjxknqd.css.map +1 -0
  153. package/dist/C_Markdown.cjs +4 -0
  154. package/dist/C_Markdown.d.cts +2 -0
  155. package/dist/C_Markdown.d.ts +2 -0
  156. package/dist/C_Markdown.js +3 -0
  157. package/dist/C_Markdown2.js +186 -0
  158. package/dist/C_Markdown2.js.map +1 -0
  159. package/dist/C_NotificationCenter-0l3TY2Gn.css.map +1 -0
  160. package/dist/C_NotificationCenter.cjs +20 -0
  161. package/dist/C_NotificationCenter.d.cts +2 -0
  162. package/dist/C_NotificationCenter.d.ts +2 -0
  163. package/dist/C_NotificationCenter.js +4 -0
  164. package/dist/C_NotificationCenter2.js +1383 -0
  165. package/dist/C_NotificationCenter2.js.map +1 -0
  166. package/dist/C_Progress.cjs +4 -0
  167. package/dist/C_Progress.d.cts +2 -0
  168. package/dist/C_Progress.d.ts +2 -0
  169. package/dist/C_Progress.js +3 -0
  170. package/dist/C_Progress2.js +103 -0
  171. package/dist/C_Progress2.js.map +1 -0
  172. package/dist/C_QRCode-DbdiAIPg.css.map +1 -0
  173. package/dist/C_QRCode.cjs +5 -0
  174. package/dist/C_QRCode.d.cts +2 -0
  175. package/dist/C_QRCode.d.ts +2 -0
  176. package/dist/C_QRCode.js +3 -0
  177. package/dist/C_QRCode2.js +218 -0
  178. package/dist/C_QRCode2.js.map +1 -0
  179. package/dist/C_Signature-zhHCbra9.css.map +1 -0
  180. package/dist/C_Signature.cjs +8 -0
  181. package/dist/C_Signature.d.cts +2 -0
  182. package/dist/C_Signature.d.ts +2 -0
  183. package/dist/C_Signature.js +4 -0
  184. package/dist/C_Signature2.js +618 -0
  185. package/dist/C_Signature2.js.map +1 -0
  186. package/dist/C_SplitPane-C6sBsfKY.css.map +1 -0
  187. package/dist/C_SplitPane.cjs +6 -0
  188. package/dist/C_SplitPane.d.cts +2 -0
  189. package/dist/C_SplitPane.d.ts +2 -0
  190. package/dist/C_SplitPane.js +4 -0
  191. package/dist/C_SplitPane2.js +356 -0
  192. package/dist/C_SplitPane2.js.map +1 -0
  193. package/dist/C_Steps-CODHN5Hs.css.map +1 -0
  194. package/dist/C_Steps.cjs +4 -0
  195. package/dist/C_Steps.d.cts +2 -0
  196. package/dist/C_Steps.d.ts +2 -0
  197. package/dist/C_Steps.js +3 -0
  198. package/dist/C_Steps2.js +82 -0
  199. package/dist/C_Steps2.js.map +1 -0
  200. package/dist/C_Table-DSNsntmT.css.map +1 -0
  201. package/dist/C_Table.cjs +19 -0
  202. package/dist/C_Table.d.cts +2 -0
  203. package/dist/C_Table.d.ts +2 -0
  204. package/dist/C_Table.js +5 -0
  205. package/dist/C_Table2.js +3009 -0
  206. package/dist/C_Table2.js.map +1 -0
  207. package/dist/C_Theme.cjs +4 -0
  208. package/dist/C_Theme.d.cts +2 -0
  209. package/dist/C_Theme.d.ts +2 -0
  210. package/dist/C_Theme.js +3 -0
  211. package/dist/C_Theme2.js +60 -0
  212. package/dist/C_Theme2.js.map +1 -0
  213. package/dist/C_Time-BvZLYraL.css.map +1 -0
  214. package/dist/C_Time.cjs +5 -0
  215. package/dist/C_Time.d.cts +2 -0
  216. package/dist/C_Time.d.ts +2 -0
  217. package/dist/C_Time.js +3 -0
  218. package/dist/C_Time2.js +199 -0
  219. package/dist/C_Time2.js.map +1 -0
  220. package/dist/C_Tree-0GDv--jX.css.map +1 -0
  221. package/dist/C_Tree.cjs +7 -0
  222. package/dist/C_Tree.d.cts +2 -0
  223. package/dist/C_Tree.d.ts +2 -0
  224. package/dist/C_Tree.js +4 -0
  225. package/dist/C_Tree2.js +441 -0
  226. package/dist/C_Tree2.js.map +1 -0
  227. package/dist/C_Upload-BXd3YYLx.css.map +1 -0
  228. package/dist/C_Upload.cjs +12 -0
  229. package/dist/C_Upload.d.cts +2 -0
  230. package/dist/C_Upload.d.ts +2 -0
  231. package/dist/C_Upload.js +4 -0
  232. package/dist/C_Upload2.js +1388 -0
  233. package/dist/C_Upload2.js.map +1 -0
  234. package/dist/C_VideoPlayer-DYG3RL0Q.css.map +1 -0
  235. package/dist/C_VideoPlayer.cjs +23 -0
  236. package/dist/C_VideoPlayer.d.cts +2 -0
  237. package/dist/C_VideoPlayer.d.ts +2 -0
  238. package/dist/C_VideoPlayer.js +3 -0
  239. package/dist/C_VideoPlayer2.js +1932 -0
  240. package/dist/C_VideoPlayer2.js.map +1 -0
  241. package/dist/C_VtableGantt-fhItIiHE.css.map +1 -0
  242. package/dist/C_VtableGantt.cjs +6 -0
  243. package/dist/C_VtableGantt.d.cts +2 -0
  244. package/dist/C_VtableGantt.d.ts +2 -0
  245. package/dist/C_VtableGantt.js +4 -0
  246. package/dist/C_VtableGantt2.js +873 -0
  247. package/dist/C_VtableGantt2.js.map +1 -0
  248. package/dist/C_WaterFall-8sQDFXKg.css.map +1 -0
  249. package/dist/C_WaterFall.cjs +13 -0
  250. package/dist/C_WaterFall.d.cts +2 -0
  251. package/dist/C_WaterFall.d.ts +2 -0
  252. package/dist/C_WaterFall.js +3 -0
  253. package/dist/C_WaterFall2.js +365 -0
  254. package/dist/C_WaterFall2.js.map +1 -0
  255. package/dist/C_WorkFlow-J-dyIuh9.css.map +1 -0
  256. package/dist/C_WorkFlow.cjs +8 -0
  257. package/dist/C_WorkFlow.d.cts +2 -0
  258. package/dist/C_WorkFlow.d.ts +2 -0
  259. package/dist/C_WorkFlow.js +4 -0
  260. package/dist/C_WorkFlow2.js +1984 -0
  261. package/dist/C_WorkFlow2.js.map +1 -0
  262. package/dist/chunk.js +22 -0
  263. package/dist/city.js +4817 -0
  264. package/dist/city.js.map +1 -0
  265. package/dist/constants.d.ts +273 -0
  266. package/dist/constants.d.ts.map +1 -0
  267. package/dist/constants2.d.ts +178 -0
  268. package/dist/constants2.d.ts.map +1 -0
  269. package/dist/constants3.d.ts +475 -0
  270. package/dist/constants3.d.ts.map +1 -0
  271. package/dist/constants4.d.ts +430 -0
  272. package/dist/constants4.d.ts.map +1 -0
  273. package/dist/constants5.d.ts +4283 -0
  274. package/dist/constants5.d.ts.map +1 -0
  275. package/dist/data.d.ts +67 -0
  276. package/dist/data.d.ts.map +1 -0
  277. package/dist/export-helper.js +9 -0
  278. package/dist/index.cjs +409 -0
  279. package/dist/index.d.cts +96 -0
  280. package/dist/index.d.cts.map +1 -0
  281. package/dist/index.d.ts +103 -0
  282. package/dist/index.d.ts.map +1 -0
  283. package/dist/index.js +230 -0
  284. package/dist/index.js.map +1 -0
  285. package/dist/index.vue.d.ts +80 -0
  286. package/dist/index.vue.d.ts.map +1 -0
  287. package/dist/index10.vue.d.ts +72 -0
  288. package/dist/index10.vue.d.ts.map +1 -0
  289. package/dist/index11.vue.d.ts +26 -0
  290. package/dist/index11.vue.d.ts.map +1 -0
  291. package/dist/index12.vue.d.ts +81 -0
  292. package/dist/index12.vue.d.ts.map +1 -0
  293. package/dist/index13.vue.d.ts +55 -0
  294. package/dist/index13.vue.d.ts.map +1 -0
  295. package/dist/index14.vue.d.ts +33 -0
  296. package/dist/index14.vue.d.ts.map +1 -0
  297. package/dist/index15.vue.d.ts +18 -0
  298. package/dist/index15.vue.d.ts.map +1 -0
  299. package/dist/index16.vue.d.ts +662 -0
  300. package/dist/index16.vue.d.ts.map +1 -0
  301. package/dist/index2.vue.d.ts +38 -0
  302. package/dist/index2.vue.d.ts.map +1 -0
  303. package/dist/index3.vue.d.ts +45 -0
  304. package/dist/index3.vue.d.ts.map +1 -0
  305. package/dist/index4.vue.d.ts +31 -0
  306. package/dist/index4.vue.d.ts.map +1 -0
  307. package/dist/index5.vue.d.ts +35 -0
  308. package/dist/index5.vue.d.ts.map +1 -0
  309. package/dist/index6.vue.d.ts +48 -0
  310. package/dist/index6.vue.d.ts.map +1 -0
  311. package/dist/index7.vue.d.ts +56 -0
  312. package/dist/index7.vue.d.ts.map +1 -0
  313. package/dist/index8.vue.d.ts +41 -0
  314. package/dist/index8.vue.d.ts.map +1 -0
  315. package/dist/index9.vue.d.ts +30 -0
  316. package/dist/index9.vue.d.ts.map +1 -0
  317. package/dist/storage.js +31 -0
  318. package/dist/storage.js.map +1 -0
  319. package/dist/style.css +7725 -0
  320. package/dist/useCalendarEvents.d.ts +148 -0
  321. package/dist/useCalendarEvents.d.ts.map +1 -0
  322. package/dist/useCollapsePanel.d.ts +132 -0
  323. package/dist/useCollapsePanel.d.ts.map +1 -0
  324. package/dist/useCropperCore.d.ts +102 -0
  325. package/dist/useCropperCore.d.ts.map +1 -0
  326. package/dist/useDraggableLayout.d.ts +194 -0
  327. package/dist/useDraggableLayout.d.ts.map +1 -0
  328. package/dist/useDynamicFormState.d.ts +4248 -0
  329. package/dist/useDynamicFormState.d.ts.map +1 -0
  330. package/dist/useEdgeInteraction.d.ts +7614 -0
  331. package/dist/useEdgeInteraction.d.ts.map +1 -0
  332. package/dist/useFullscreen.d.ts +166 -0
  333. package/dist/useFullscreen.d.ts.map +1 -0
  334. package/dist/useInfiniteScroll.d.ts +169 -0
  335. package/dist/useInfiniteScroll.d.ts.map +1 -0
  336. package/dist/useModalEdit.d.ts +960 -0
  337. package/dist/useModalEdit.d.ts.map +1 -0
  338. package/dist/useQRCode.d.ts +87 -0
  339. package/dist/useQRCode.d.ts.map +1 -0
  340. package/dist/useSearchState.d.ts +180 -0
  341. package/dist/useSearchState.d.ts.map +1 -0
  342. package/dist/useSignatureHistory.d.ts +189 -0
  343. package/dist/useSignatureHistory.d.ts.map +1 -0
  344. package/dist/useSplitResize.d.ts +158 -0
  345. package/dist/useSplitResize.d.ts.map +1 -0
  346. package/dist/useTimeSelection.d.ts +105 -0
  347. package/dist/useTimeSelection.d.ts.map +1 -0
  348. package/dist/useTreeOperations.d.ts +183 -0
  349. package/dist/useTreeOperations.d.ts.map +1 -0
  350. package/dist/useWorkflowValidation.d.ts +1052 -0
  351. package/dist/useWorkflowValidation.d.ts.map +1 -0
  352. package/package.json +342 -0
@@ -0,0 +1,4283 @@
1
+ import * as vue from "vue";
2
+ import { Ref, ShallowRef } from "vue";
3
+ import "xgplayer/dist/index.min.css";
4
+ import * as eventemitter3 from "eventemitter3";
5
+
6
+ //#region node_modules/xgplayer/es/defaultConfig.d.ts
7
+ type IUrl$1 = string | MediaStream | {
8
+ [propName: string]: any;
9
+ src: string;
10
+ type?: string;
11
+ }[];
12
+ type IDefinition$3 = {
13
+ [propName: string]: any;
14
+ url: IUrl$1;
15
+ definition: any;
16
+ bitrate?: number;
17
+ bandwidth?: number;
18
+ text?: string | {
19
+ [propName: string]: any;
20
+ };
21
+ iconText?: string | {
22
+ [propName: string]: any;
23
+ };
24
+ };
25
+ type IPlayerOptions$4 = {
26
+ [propName: string]: any;
27
+ id?: string;
28
+ el?: HTMLElement;
29
+ mediaEl?: HTMLMediaElement | ((mediaConfig: {
30
+ [propName: string]: any;
31
+ }) => HTMLMediaElement);
32
+ url?: IUrl$1;
33
+ domEventType?: 'default' | 'touch' | 'mouse';
34
+ nullUrlStart?: boolean;
35
+ width?: number | string;
36
+ height?: number | string;
37
+ fluid?: boolean;
38
+ fitVideoSize?: 'fixWidth' | 'fixHeight' | 'fixed';
39
+ videoFillMode?: 'auto' | 'fillHeight' | 'fillWidth' | 'fill' | 'cover' | 'contain';
40
+ volume?: number | {
41
+ [propName: string]: any;
42
+ };
43
+ autoplay?: boolean;
44
+ autoplayMuted?: boolean;
45
+ loop?: boolean;
46
+ isLive?: boolean;
47
+ zoom?: number;
48
+ videoInit?: boolean;
49
+ poster?: string | {
50
+ [propName: string]: any;
51
+ };
52
+ isMobileSimulateMode?: 'mobile' | 'pc';
53
+ defaultPlaybackRate?: number;
54
+ execBeforePluginsCall?: () => any;
55
+ allowSeekAfterEnded?: boolean;
56
+ enableContextmenu?: boolean;
57
+ closeVideoClick?: boolean;
58
+ closeVideoDblclick?: boolean;
59
+ closePlayerBlur?: boolean;
60
+ closeDelayBlur?: boolean;
61
+ leavePlayerTime?: number;
62
+ closePlayVideoFocus?: boolean;
63
+ closePauseVideoFocus?: boolean;
64
+ closeFocusVideoFocus?: boolean;
65
+ closeControlsBlur?: boolean;
66
+ topBarAutoHide?: boolean;
67
+ videoAttributes?: {
68
+ [propName: string]: any;
69
+ };
70
+ startTime?: number;
71
+ seekedStatus?: 'play' | 'pause' | 'auto';
72
+ miniprogress?: boolean;
73
+ disableSwipeHandler?: () => any;
74
+ enableSwipeHandler?: () => any;
75
+ preProcessUrl?: (url: IUrl$1, ext?: {
76
+ [propName: string]: any;
77
+ }) => {
78
+ [propName: string]: any;
79
+ url: IUrl$1;
80
+ };
81
+ ignores?: Array<'cssfullscreen' | 'screenshot' | 'pip' | 'miniscreen' | 'keyboard' | 'download' | 'playbackrate' | 'time' | 'definition' | 'error' | 'fullscreen' | 'loading' | 'mobile' | 'pc' | 'play' | 'poster' | 'progress' | 'replay' | 'start' | 'volume' | string>;
82
+ inactive?: number;
83
+ lang?: string;
84
+ controls?: boolean | {
85
+ [propName: string]: any;
86
+ };
87
+ marginControls?: boolean;
88
+ fullscreenTarget?: HTMLElement;
89
+ screenShot?: boolean | {
90
+ [propName: string]: any;
91
+ };
92
+ rotate?: boolean | {
93
+ [propName: string]: any;
94
+ };
95
+ pip?: boolean | {
96
+ [propName: string]: any;
97
+ };
98
+ download?: boolean | {
99
+ [propName: string]: any;
100
+ };
101
+ mini?: boolean | {
102
+ [propName: string]: any;
103
+ };
104
+ cssFullscreen?: boolean | {
105
+ [propName: string]: any;
106
+ };
107
+ keyShortcut?: boolean;
108
+ presets?: any[];
109
+ plugins?: any[];
110
+ playbackRate?: boolean | number[] | {
111
+ [propName: string]: any;
112
+ };
113
+ definition?: {
114
+ [propName: string]: any;
115
+ list: Array<IDefinition$3>;
116
+ defaultDefinition?: IDefinition$3['definition'];
117
+ };
118
+ playsinline?: boolean;
119
+ customDuration?: number;
120
+ timeOffset?: number;
121
+ icons?: {
122
+ [propName: string]: string | HTMLElement | (() => HTMLElement | string);
123
+ };
124
+ i18n?: Array<any>;
125
+ tabindex?: number;
126
+ thumbnail?: {
127
+ urls: Array<string>;
128
+ pic_num: number;
129
+ col: number;
130
+ row: number;
131
+ height?: number;
132
+ width?: number;
133
+ };
134
+ videoConfig?: {
135
+ [propName: string]: any;
136
+ };
137
+ isHideTips?: boolean;
138
+ minWaitDelay?: number;
139
+ commonStyle?: {
140
+ progressColor?: string;
141
+ playedColor?: string;
142
+ cachedColor?: string;
143
+ sliderBtnStyle?: {
144
+ [propName: string]: any;
145
+ };
146
+ volumeColor?: string;
147
+ };
148
+ remainMediaAfterDestroy?: boolean;
149
+ };
150
+ //#endregion
151
+ //#region node_modules/xgplayer/es/lang/i18n.d.ts
152
+ type IXGI18nText = {
153
+ LANG: string;
154
+ TEXT: {
155
+ [propName: string]: any;
156
+ };
157
+ };
158
+ type IXGI18n = {
159
+ lang: {
160
+ [propName: string]: IXGI18nText;
161
+ };
162
+ langKeys: Array<string>;
163
+ textKeys: {
164
+ [propName: string]: string;
165
+ };
166
+ };
167
+ //#endregion
168
+ //#region node_modules/xgplayer/es/utils/xgplayerTimeRange.d.ts
169
+ declare class XgplayerTimeRange {
170
+ constructor(bufferedList: any);
171
+ bufferedList: any;
172
+ start(index: any): any;
173
+ end(index: any): any;
174
+ get length(): any;
175
+ }
176
+ //#endregion
177
+ //#region node_modules/xgplayer/es/utils/util.d.ts
178
+ declare namespace util {
179
+ /**
180
+ *
181
+ * @param { string } el
182
+ * @param { string } [tpl=]
183
+ * @param { {[propName: string]: any }} [attrs={}]
184
+ * @param { string } [cname='']
185
+ * @returns { HTMLElement | null }
186
+ */
187
+ function createDom(el?: string, tpl?: string, attrs?: {
188
+ [propName: string]: any;
189
+ }, cname?: string): HTMLElement;
190
+ /**
191
+ *
192
+ * @param { string } html
193
+ * @param { {[propName: string]: any} } [attrs={}]
194
+ * @param { string } [classname=""]
195
+ * @returns { HTMLElement | null }
196
+ */
197
+ function createDomFromHtml(html: string, attrs?: {
198
+ [propName: string]: any;
199
+ }, classname?: string): HTMLElement;
200
+ /**
201
+ *
202
+ * @param { HTMLElement } el
203
+ * @param { string } className
204
+ * @returns { boolean }
205
+ */
206
+ function hasClass(el: HTMLElement, className: string): boolean;
207
+ /**
208
+ *
209
+ * @param { HTMLElement } el
210
+ * @param { string } className
211
+ * @returns { void }
212
+ */
213
+ function addClass(el: HTMLElement, className: string): void;
214
+ /**
215
+ *
216
+ * @param { HTMLElement } el
217
+ * @param { string } className
218
+ * @returns { void }
219
+ */
220
+ function removeClass(el: HTMLElement, className: string): void;
221
+ /**
222
+ *
223
+ * @param { HTMLElement } el
224
+ * @param { string } className
225
+ * @returns { void }
226
+ */
227
+ function toggleClass(el: HTMLElement, className: string): void;
228
+ /**
229
+ *
230
+ * @param { string | Object } args0
231
+ * @param { string } [className]
232
+ * @returns { string }
233
+ */
234
+ function classNames(...args: any[]): string;
235
+ /**
236
+ *
237
+ * @param { HTMLElement } el
238
+ * @param { string } sel
239
+ * @returns { HTMLElement }
240
+ */
241
+ function findDom(el: HTMLElement, sel: string): HTMLElement;
242
+ /**
243
+ *
244
+ * @param { HTMLElement } dom
245
+ * @param { string } key
246
+ * @returns { any }
247
+ */
248
+ function getCss(dom: HTMLElement, key: string): any;
249
+ function padStart(str: any, length: any, pad: any): string;
250
+ /**
251
+ *
252
+ * @param { number } time
253
+ * @returns { string }
254
+ */
255
+ function format(time: number): string;
256
+ /**
257
+ *
258
+ * @param { Object } e
259
+ * @returns { Object }
260
+ */
261
+ function event(e: any): any;
262
+ /**
263
+ *
264
+ * @param { any } obj
265
+ * @returns { string }
266
+ */
267
+ function typeOf(obj: any): string;
268
+ /**
269
+ *
270
+ * @param { any } dst
271
+ * @param { any } src
272
+ * @returns { any }
273
+ */
274
+ function deepCopy(dst: any, src: any): any;
275
+ /**
276
+ *
277
+ * @param { any } dst
278
+ * @param { any } src
279
+ * @returns { any }
280
+ */
281
+ function deepMerge(dst: any, src: any): any;
282
+ function getBgImage(el: any): string;
283
+ /**
284
+ *
285
+ * @param { HTMLElement } dom
286
+ * @returns { HTMLElement | null }
287
+ */
288
+ function copyDom(dom: HTMLElement): HTMLElement;
289
+ /**
290
+ *
291
+ * @param { any } context
292
+ * @param { string } eventName
293
+ * @param { function } intervalFunc
294
+ * @param { number } frequency
295
+ */
296
+ function setInterval(context: any, eventName: string, intervalFunc: Function, frequency: number): void;
297
+ /**
298
+ *
299
+ * @param { any } context
300
+ * @param { string } eventName
301
+ * @returns { void }
302
+ */
303
+ function clearInterval(context: any, eventName: string): void;
304
+ /**
305
+ *
306
+ * @param { any } context
307
+ * @param { function } fun
308
+ * @param { number } time
309
+ * @returns { number }
310
+ */
311
+ function setTimeout(context: any, fun: Function, time: number): number;
312
+ /**
313
+ *
314
+ * @param { any } context
315
+ * @param { number } id
316
+ */
317
+ function clearTimeout(context: any, id: number): void;
318
+ /**
319
+ *
320
+ * @param { any } context
321
+ */
322
+ function clearAllTimers(context: any): void;
323
+ /**
324
+ *
325
+ * @param { string } name
326
+ * @param { string } imgUrl
327
+ * @param { number } [width]
328
+ * @param { number } [height]
329
+ * @returns { HTMLElement }
330
+ */
331
+ function createImgBtn(name: string, imgUrl: string, width?: number, height?: number): HTMLElement;
332
+ /**
333
+ *
334
+ * @param { string } hex
335
+ * @param { string | number } alpha
336
+ * @returns { string }
337
+ */
338
+ function Hex2RGBA(hex: string, alpha: string | number): string;
339
+ /**
340
+ *
341
+ * @returns { HTMLElement | null }
342
+ */
343
+ function getFullScreenEl(): HTMLElement;
344
+ /**
345
+ * @param { any }
346
+ * @returns { boolean }
347
+ */
348
+ function checkIsFunction(fun: any): boolean;
349
+ /**
350
+ * @param { any }
351
+ * @returns { boolean }
352
+ */
353
+ function checkIsObject(obj: any): boolean;
354
+ /**
355
+ * @param { HTMLElement }
356
+ */
357
+ function hide(dom: any): void;
358
+ /**
359
+ * @param { HTMLElement }
360
+ * @param { block | flex | inline-block | inline-flex } [display]
361
+ */
362
+ function show(dom: any, display: any): void;
363
+ /**
364
+ *
365
+ * @param { any } val
366
+ * @returns { boolean }
367
+ */
368
+ function isUndefined(val: any): boolean;
369
+ function isNotNull(val: any): boolean;
370
+ /**
371
+ *
372
+ * @param { HTMLElement } dom
373
+ * @param { string } [text]
374
+ * @returns
375
+ */
376
+ function setStyleFromCsstext(dom: HTMLElement, text?: string): void;
377
+ /**
378
+ *
379
+ * @param { HTMLElement } dom
380
+ * @param { Array<string> } [list] attribute names to filter
381
+ * @returns { {} | {[propName: string]: any;} }
382
+ */
383
+ function filterStyleFromText(dom: HTMLElement, list?: string[]): {} | {
384
+ [propName: string]: any;
385
+ };
386
+ /**
387
+ *
388
+ * @param { HTMLElement } dom
389
+ * @returns { {} | {[propName: string]: any;} }
390
+ */
391
+ function getStyleFromCsstext(dom: HTMLElement): {} | {
392
+ [propName: string]: any;
393
+ };
394
+ function preloadImg(url: any, onload?: () => void, onerror?: () => void): void;
395
+ function stopPropagation(e: any): void;
396
+ function scrollTop(): number;
397
+ function scrollLeft(): number;
398
+ function checkTouchSupport(): boolean;
399
+ function getBuffered2(vbuffered: any, maxHoleDuration?: number): XgplayerTimeRange;
400
+ /**
401
+ * @description css中有zoom的时候,位移会等比缩放,但是元素的宽高不会等比缩放,所以通过该api做统一
402
+ * https://bugs.chromium.org/p/chromium/issues/detail?id=429140#c8
403
+ * @param {Event} e
404
+ * @param {number} zoom
405
+ * @returns
406
+ */
407
+ function getEventPos(e: Event, zoom?: number): {
408
+ x: number;
409
+ y: number;
410
+ clientX: number;
411
+ clientY: number;
412
+ offsetX: number;
413
+ offsetY: number;
414
+ pageX: number;
415
+ pageY: number;
416
+ };
417
+ function requestAnimationFrame(callback: any): any;
418
+ function getHostFromUrl(url: any): string;
419
+ function cancelAnimationFrame(frameId: any): void;
420
+ /**
421
+ * @desc Check whether it is MediaSource start
422
+ * @param { HTMLVideoElement | HTMLAudioElement | HTMLElement } video
423
+ * @returns { boolean }
424
+ */
425
+ function isMSE(video: HTMLElement | HTMLVideoElement | HTMLAudioElement): boolean;
426
+ function isBlob(url: any): boolean;
427
+ /**
428
+ * @param { number } did
429
+ * @returns { string }
430
+ */
431
+ function generateSessionId(did?: number): string;
432
+ function createEvent(eventName: any): Event;
433
+ /**
434
+ * @description Adjust currentTime according to duration, when ended is true and currentTime is less than duration, or
435
+ * currentTime is greater than duration, return duration
436
+ * @param { number } time
437
+ * @param { number } duration
438
+ * @param { boolean } isEnded
439
+ * @returns { number } Adjusted time
440
+ */
441
+ function adjustTimeByDuration(time: number, duration: number, isEnded: boolean): number;
442
+ function createPositionBar(className: any, root: any): HTMLElement;
443
+ function getTransformStyle(pos?: {
444
+ x: number;
445
+ y: number;
446
+ scale: number;
447
+ rotate: number;
448
+ }, transformValue?: string): string;
449
+ /**
450
+ * @description 角度换算
451
+ * @param {number} val
452
+ * @returns {number}
453
+ */
454
+ function convertDeg(val: number): number;
455
+ function getIndexByTime(time: any, segments: any): number;
456
+ function getOffsetCurrentTime(currentTime: any, segments: any, index?: number): any;
457
+ /**
458
+ *
459
+ * @param {*} offsetTime
460
+ * @param {*} segments
461
+ * @returns
462
+ */
463
+ function getCurrentTimeByOffset(offsetTime: any, segments: any): any;
464
+ }
465
+ //#endregion
466
+ //#region node_modules/xgplayer/es/utils/sniffer.d.ts
467
+ type ICheckResult = {
468
+ isSupport: boolean;
469
+ mime: string;
470
+ };
471
+ type ISniffer = {
472
+ device: 'pc' | 'mobile';
473
+ browser: 'ie' | 'firefox' | 'chrome' | 'opera' | 'safari';
474
+ os: {
475
+ isTablet: boolean;
476
+ isPhone: boolean;
477
+ isIpad: boolean;
478
+ isIos: boolean;
479
+ isAndroid: boolean;
480
+ isPc: boolean;
481
+ isSymbian: boolean;
482
+ isWindowsPhone: boolean;
483
+ isFireFox: boolean;
484
+ };
485
+ isWeixin: boolean;
486
+ isSupportMP4(): ICheckResult;
487
+ isHevcSupported(): boolean;
488
+ probeConfigSupported(info: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
489
+ };
490
+ //#endregion
491
+ //#region node_modules/xgplayer/es/error.d.ts
492
+ type Player$4 = Player;
493
+ /**
494
+ * @typedef { {
495
+ * playerVersion: string,
496
+ * currentTime: number,
497
+ * duration: number,
498
+ * ended: boolean,
499
+ * readyState: number,
500
+ * networkState: number,
501
+ * src: any,
502
+ * errorType: string,
503
+ * errorCode: number,
504
+ * message: string,
505
+ * mediaError?: {
506
+ * code: number,
507
+ * message?: string
508
+ * },
509
+ * originError?: any,
510
+ * url?: any,
511
+ * host?: string,
512
+ * [propName: string]: any
513
+ * } } IError
514
+ */
515
+ /**
516
+ * @type { IError }
517
+ */
518
+ declare class Errors {
519
+ /**
520
+ *
521
+ * @param { Player } player
522
+ * @param { {
523
+ * errorType: string,
524
+ * errorCode: number,
525
+ * errorMessage: string,
526
+ * originError: any,
527
+ * ext: { [propName: string]: any; }
528
+ * } } errorInfo
529
+ * @returns
530
+ */
531
+ constructor(player: Player$4, errorInfo?: {
532
+ errorType: string;
533
+ errorCode: number;
534
+ errorMessage: string;
535
+ originError: any;
536
+ ext: {
537
+ [propName: string]: any;
538
+ };
539
+ }, ...args: any[]);
540
+ }
541
+ declare namespace events_d_exports {
542
+ export { ABORT, AFTER_DEFINITION_CHANGE, AUTOPLAY_PREVENTED, AUTOPLAY_STARTED, BEFORE_DEFINITION_CHANGE, BUFFER_CHANGE, CANPLAY, CANPLAY_THROUGH, COMPLETE, CSS_FULLSCREEN_CHANGE, DEFINITION_CHANGE, DESTROY, DOWNLOAD_SPEED_CHANGE, DURATION_CHANGE, EMPTIED, ENDED, ENTER_PLAYER, ERROR, FPS_STUCK, FULLSCREEN_CHANGE, LEAVE_PLAYER, LOADED_DATA, LOADED_METADATA, LOADING, LOAD_START, MINI_STATE_CHANGE, PAUSE, PIP_CHANGE, PLAY, PLAYER_BLUR, PLAYER_FOCUS, PLAYING, PLAYNEXT, PROGRESS, RATE_CHANGE, READY, REPLAY, RESET, RETRY, ROTATE, SCREEN_SHOT, SEEKED, SEEKING, SEI_PARSED, SHORTCUT, SOURCE_ERROR, SOURCE_SUCCESS, STALLED, STATS_EVENTS, SUSPEND, SWITCH_SUBTITLE, TIME_UPDATE, URL_CHANGE, URL_NULL, USER_ACTION, VIDEO_EVENTS, VIDEO_RESIZE, VOLUME_CHANGE, WAITING, XGLOG };
543
+ }
544
+ declare const PLAY: "play";
545
+ declare const PLAYING: "playing";
546
+ declare const ENDED: "ended";
547
+ declare const PAUSE: "pause";
548
+ declare const ERROR: "error";
549
+ declare const SEEKING: "seeking";
550
+ declare const SEEKED: "seeked";
551
+ declare const TIME_UPDATE: "timeupdate";
552
+ declare const WAITING: "waiting";
553
+ declare const CANPLAY: "canplay";
554
+ declare const CANPLAY_THROUGH: "canplaythrough";
555
+ declare const DURATION_CHANGE: "durationchange";
556
+ declare const VOLUME_CHANGE: "volumechange";
557
+ declare const LOADED_DATA: "loadeddata";
558
+ declare const LOADED_METADATA: "loadedmetadata";
559
+ declare const RATE_CHANGE: "ratechange";
560
+ declare const PROGRESS: "progress";
561
+ declare const LOAD_START: "loadstart";
562
+ declare const EMPTIED: "emptied";
563
+ declare const STALLED: "stalled";
564
+ declare const SUSPEND: "suspend";
565
+ declare const ABORT: "abort";
566
+ declare const BUFFER_CHANGE: "bufferedChange";
567
+ declare const PLAYER_FOCUS: "focus";
568
+ declare const PLAYER_BLUR: "blur";
569
+ declare const READY: "ready";
570
+ declare const URL_NULL: "urlNull";
571
+ declare const AUTOPLAY_STARTED: "autoplay_started";
572
+ declare const AUTOPLAY_PREVENTED: "autoplay_was_prevented";
573
+ declare const COMPLETE: "complete";
574
+ declare const REPLAY: "replay";
575
+ declare const DESTROY: "destroy";
576
+ declare const URL_CHANGE: "urlchange";
577
+ declare const DOWNLOAD_SPEED_CHANGE: "download_speed_change";
578
+ declare const LEAVE_PLAYER: "leaveplayer";
579
+ declare const ENTER_PLAYER: "enterplayer";
580
+ declare const LOADING: "loading";
581
+ declare const FULLSCREEN_CHANGE: "fullscreen_change";
582
+ declare const CSS_FULLSCREEN_CHANGE: "cssFullscreen_change";
583
+ declare const MINI_STATE_CHANGE: "mini_state_change";
584
+ declare const DEFINITION_CHANGE: "definition_change";
585
+ declare const BEFORE_DEFINITION_CHANGE: "before_definition_change";
586
+ declare const AFTER_DEFINITION_CHANGE: "after_definition_change";
587
+ declare const SEI_PARSED: "SEI_PARSED";
588
+ declare const RETRY: "retry";
589
+ declare const VIDEO_RESIZE: "video_resize";
590
+ declare const PIP_CHANGE: "pip_change";
591
+ declare const ROTATE: "rotate";
592
+ declare const SCREEN_SHOT: "screenShot";
593
+ declare const PLAYNEXT: "playnext";
594
+ declare const SHORTCUT: "shortcut";
595
+ declare const XGLOG: "xglog";
596
+ declare const USER_ACTION: "user_action";
597
+ declare const RESET: "reset";
598
+ declare const SOURCE_ERROR: "source_error";
599
+ declare const SOURCE_SUCCESS: "source_success";
600
+ declare const SWITCH_SUBTITLE: "switch_subtitle";
601
+ declare const VIDEO_EVENTS: string[];
602
+ declare namespace STATS_EVENTS {
603
+ const STATS_INFO: string;
604
+ const STATS_DOWNLOAD: string;
605
+ const STATS_RESET: string;
606
+ }
607
+ declare const FPS_STUCK: "fps_stuck";
608
+ //#endregion
609
+ //#region node_modules/xgplayer/es/plugin/basePlugin.d.ts
610
+ type Player$3 = Player;
611
+ type IPlayerOptions$3 = IPlayerOptions$4;
612
+ type IBasePluginOptions = {
613
+ [propName: string]: any;
614
+ index?: number;
615
+ player: Player$3;
616
+ pluginName: string;
617
+ config: {
618
+ [propName: string]: any;
619
+ };
620
+ };
621
+ /**
622
+ * @typedef { import ('../player').default } Player
623
+ */
624
+ /**
625
+ * @typedef { import ('../defaultConfig').IPlayerOptions } IPlayerOptions
626
+ */
627
+ /**
628
+ * @typedef {{
629
+ * index?: number,
630
+ * player: Player,
631
+ * pluginName: string,
632
+ * config: {
633
+ * [propName: string]: any
634
+ * },
635
+ * [propName: string]: any;
636
+ * }} IBasePluginOptions
637
+ */
638
+ declare class BasePlugin {
639
+ static defineGetterOrSetter(Obj: any, map: any): void;
640
+ static defineMethod(Obj: any, map: any): void;
641
+ /**
642
+ * @type { { [propName: string]: any } }
643
+ */
644
+ static get defaultConfig(): {
645
+ [propName: string]: any;
646
+ };
647
+ /**
648
+ * @type { string }
649
+ */
650
+ static get pluginName(): string;
651
+ /**
652
+ * @param { IBasePluginOptions } args
653
+ */
654
+ constructor(args: IBasePluginOptions);
655
+ /**
656
+ * @private
657
+ */
658
+ private __args;
659
+ /**
660
+ * @private
661
+ */
662
+ private __events;
663
+ __onceEvents: {};
664
+ config: {
665
+ [propName: string]: any;
666
+ };
667
+ /**
668
+ * @readonly
669
+ * @type { Player }
670
+ */
671
+ readonly player: Player$3;
672
+ /**
673
+ * @readonly
674
+ * @type { IPlayerOptions }
675
+ */
676
+ readonly playerConfig: IPlayerOptions$3;
677
+ /**
678
+ * @readonly
679
+ * @type {string}
680
+ */
681
+ readonly pluginName: string;
682
+ /**
683
+ * @param { IBasePluginOptions } args
684
+ */
685
+ beforeCreate(args: IBasePluginOptions): void;
686
+ afterCreate(): void;
687
+ beforePlayerInit(): void;
688
+ onPluginsReady(): void;
689
+ afterPlayerInit(): void;
690
+ destroy(): void;
691
+ /**
692
+ * @protected
693
+ * @param { any } args
694
+ */
695
+ protected __init(args: any): void;
696
+ logger: any;
697
+ /**
698
+ * 更新语言
699
+ * @param { string } lang
700
+ */
701
+ updateLang(lang: string): void;
702
+ /**
703
+ * @type { string }
704
+ */
705
+ get lang(): string;
706
+ get i18n(): IXGI18nText;
707
+ get i18nKeys(): {
708
+ [propName: string]: string;
709
+ };
710
+ /**
711
+ * @description当前支持的事件类型
712
+ * @type { 'touch' | 'mouse' }
713
+ */
714
+ get domEventType(): "touch" | "mouse";
715
+ /**
716
+ *
717
+ * @param { string | Array<string> } event
718
+ * @param { Function } callback
719
+ * @returns
720
+ */
721
+ on(event: string | Array<string>, callback: Function): void;
722
+ /**
723
+ *
724
+ * @param { string } event
725
+ * @param { Function } callback
726
+ * @returns
727
+ */
728
+ once(event: string, callback: Function): void;
729
+ /**
730
+ *
731
+ * @param { string } event
732
+ * @param { Function } callback
733
+ * @returns
734
+ */
735
+ off(event: string, callback: Function): void;
736
+ offAll(): void;
737
+ /**
738
+ *
739
+ * @param { string } event
740
+ * @param {...any} res
741
+ * @returns
742
+ */
743
+ emit(event: string, ...res: any[]): void;
744
+ emitUserAction(event: any, action: any, params?: {}): void;
745
+ /**
746
+ * @param { string } hookName
747
+ * @param { Function } handler
748
+ * @param { {pre: Function| null , next: Function | null} } preset
749
+ * @returns
750
+ */
751
+ hook(hookName: string, handler: Function, preset?: {
752
+ pre: Function | null;
753
+ next: Function | null;
754
+ }, ...args: any[]): any;
755
+ /**
756
+ * @param { string } hookName
757
+ * @param { (plugin: any, ...args) => boolean | Promise<any> } handler
758
+ * @param {...any} args
759
+ * @returns { boolean } isSuccess
760
+ */
761
+ useHooks(hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
762
+ /**
763
+ * @param { string } hookName
764
+ * @param { (plugin: any, ...args) => boolean | Promise<any> } handler
765
+ * @param {...any} args
766
+ * @returns { boolean } isSuccess
767
+ */
768
+ removeHooks(hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
769
+ /**
770
+ * 注册子插件
771
+ * @param { any } plugin
772
+ * @param { any } [options]
773
+ * @param { string } [name]
774
+ * @returns { any }
775
+ */
776
+ registerPlugin(plugin: any, options?: any, name?: string): any;
777
+ /**
778
+ *
779
+ * @param { string } name
780
+ * @returns { any | null }
781
+ */
782
+ getPlugin(name: string): any | null;
783
+ __destroy(): void;
784
+ }
785
+ //#endregion
786
+ //#region node_modules/xgplayer/es/plugin/plugin.d.ts
787
+ type Player$2 = Player;
788
+ type IPluginOptions = {
789
+ [propName: string]: any;
790
+ index?: number;
791
+ player: Player$2;
792
+ pluginName: string;
793
+ config: {
794
+ [propName: string]: any;
795
+ };
796
+ root?: HTMLElement;
797
+ position?: string;
798
+ };
799
+ /**
800
+ * @typedef { import ('../player').default } Player
801
+ */
802
+ /**
803
+ * @typedef {{
804
+ * index?: number,
805
+ * player: Player,
806
+ * pluginName: string,
807
+ * config: {
808
+ * [propName: string]: any
809
+ * },
810
+ * root?: HTMLElement,
811
+ * position?: string,
812
+ * [propName: string]: any
813
+ * }} IPluginOptions
814
+ */
815
+ declare class Plugin extends BasePlugin {
816
+ /**
817
+ * 插入dom结构
818
+ * @param { string | HTMLElement } html html字符串或者dom
819
+ * @param { HTMLElement } parent
820
+ * @param { number } index
821
+ * @returns { HTMLElement }
822
+ */
823
+ static insert(html: string | HTMLElement, parent: HTMLElement, index?: number): HTMLElement;
824
+ static get defaultConfig(): {};
825
+ /**
826
+ *
827
+ * @param { HTMLElement } root
828
+ * @param { string } querySelector
829
+ * @param { string | Array<string> } eventType
830
+ * @param { Function } callback
831
+ * @param { boolean } [capture=false]
832
+ * @returns
833
+ */
834
+ static delegate(root: HTMLElement, querySelector: string, eventType: string | Array<string>, callback: Function, capture?: boolean): any[];
835
+ static get ROOT_TYPES(): {
836
+ CONTROLS: string;
837
+ ROOT: string;
838
+ };
839
+ static get POSITIONS(): {
840
+ ROOT: string;
841
+ ROOT_LEFT: string;
842
+ ROOT_RIGHT: string;
843
+ ROOT_TOP: string;
844
+ CONTROLS_LEFT: string;
845
+ CONTROLS_RIGTH: string;
846
+ CONTROLS_RIGHT: string;
847
+ CONTROLS_CENTER: string;
848
+ CONTROLS: string;
849
+ };
850
+ /**
851
+ * @param { IPluginOptions } args
852
+ */
853
+ constructor(args?: IPluginOptions);
854
+ /**
855
+ * @private
856
+ */
857
+ private __delegates;
858
+ /**
859
+ * @protected
860
+ */
861
+ protected __init(args: any): void;
862
+ /**
863
+ * @readonly
864
+ */
865
+ readonly icons: {};
866
+ /**
867
+ * @readonly
868
+ * @type { HTMLElement }
869
+ */
870
+ readonly root: HTMLElement;
871
+ /**
872
+ * @readonly
873
+ * @type { HTMLElement }
874
+ */
875
+ readonly parent: HTMLElement;
876
+ /**
877
+ * store the extra HTMLElements except root
878
+ * @readonly
879
+ * @type {HTMLElement[]}
880
+ */
881
+ readonly extraEls: HTMLElement[];
882
+ /**
883
+ * @readonly
884
+ */
885
+ readonly langText: {};
886
+ /**
887
+ * @private
888
+ */
889
+ private __registerChildren;
890
+ /**
891
+ * @private
892
+ */
893
+ private _children;
894
+ updateLang(lang: any): void;
895
+ changeLangTextKey(dom: any, key?: string): void;
896
+ plugins(): any[];
897
+ /**
898
+ *
899
+ */
900
+ disable(): void;
901
+ enable(): void;
902
+ children(): {};
903
+ registerPlugin(plugin: any, options?: {}, name?: string): any;
904
+ registerIcons(): {};
905
+ registerLanguageTexts(): {};
906
+ /**
907
+ *
908
+ * @param { string } qs
909
+ * @returns { HTMLElement | null }
910
+ */
911
+ find(qs: string): HTMLElement | null;
912
+ /**
913
+ * 绑定事件
914
+ * @param { string | Array<string> } querySelector
915
+ * @param { string | Array<string> | Function } eventType
916
+ * @param { Function } [callback]
917
+ */
918
+ bind(querySelector: string | Array<string>, eventType: string | Array<string> | Function, callback?: Function, ...args: any[]): void;
919
+ /**
920
+ * 绑定事件
921
+ * @param { string | Array<string> } querySelector
922
+ * @param { string | Array<string> | Function } eventType
923
+ */
924
+ unbind(querySelector: string | Array<string>, eventType: string | Array<string> | Function, ...args: any[]): void;
925
+ /**
926
+ * 给插件设置样式
927
+ * @param { string | {[propName: string]: any} } name
928
+ * @param { ? | any } value
929
+ * @returns
930
+ */
931
+ setStyle(name: string | {
932
+ [propName: string]: any;
933
+ }, value: any): any;
934
+ /**
935
+ * 给插件根节点设置属性
936
+ * @param { string | {[propName: string]: any} } name
937
+ * @param { ? | any } value
938
+ * @returns
939
+ */
940
+ setAttr(name: string | {
941
+ [propName: string]: any;
942
+ }, value: any): void;
943
+ /**
944
+ *
945
+ * @param { string } htmlStr
946
+ * @param { Function } [callback]
947
+ * @returns
948
+ */
949
+ setHtml(htmlStr: string, callback?: Function): void;
950
+ /**
951
+ *
952
+ * @param { string } event
953
+ * @param { Function } eventHandle
954
+ * @param { boolean } [isBubble=false]
955
+ * @returns
956
+ */
957
+ bindEL(event: string, eventHandle: Function, isBubble?: boolean): void;
958
+ /**
959
+ *
960
+ * @param { string } event
961
+ * @param { Function } eventHandle
962
+ * @param { boolean } [isBubble]
963
+ * @returns
964
+ */
965
+ unbindEL(event: string, eventHandle: Function, isBubble?: boolean): void;
966
+ /**
967
+ *
968
+ * @param { string } [value]
969
+ * @returns
970
+ */
971
+ show(value?: string): string;
972
+ hide(): void;
973
+ /**
974
+ *
975
+ * @param { string | HTMLElement } pdom
976
+ * @param { HTMLElement} child
977
+ * @returns { HTMLElement | null }
978
+ */
979
+ appendChild(pdom: string | HTMLElement, child: HTMLElement, ...args: any[]): HTMLElement | null;
980
+ /**
981
+ *
982
+ * @returns { string | HTMLElement }
983
+ */
984
+ render(): string | HTMLElement;
985
+ }
986
+ //#endregion
987
+ //#region node_modules/xgplayer/es/mediaProxy.d.ts
988
+ type IMediaProxy = {
989
+ duration: number;
990
+ currentTime: number;
991
+ muted: boolean;
992
+ defaultMuted: boolean;
993
+ volume: number;
994
+ playbackRate: number;
995
+ defaultPlaybackRate: number;
996
+ autoplay: boolean;
997
+ readonly paused: boolean;
998
+ readonly ended: boolean;
999
+ readonly networkState: number;
1000
+ readonly readyState: number;
1001
+ readonly seeking: boolean;
1002
+ src: any;
1003
+ play: Function;
1004
+ pause: Function;
1005
+ };
1006
+ type IPlayerOptions$2 = IPlayerOptions$4;
1007
+ /**
1008
+ * @extends { EventEmitter }
1009
+ */
1010
+ declare class MediaProxy {
1011
+ /**
1012
+ * @param { IPlayerOptions } options
1013
+ */
1014
+ constructor(options: IPlayerOptions$2);
1015
+ /**
1016
+ * @type { boolean }
1017
+ * @private
1018
+ */
1019
+ private _hasStart;
1020
+ /**
1021
+ * @type { number }
1022
+ * @private
1023
+ */
1024
+ private _currentTime;
1025
+ /**
1026
+ * @type { number }
1027
+ * @private
1028
+ */
1029
+ private _duration;
1030
+ /**
1031
+ * @type {{[propName: string]: any}}
1032
+ * @private
1033
+ */
1034
+ private _internalOp;
1035
+ /**
1036
+ * @type { boolean }
1037
+ * @private
1038
+ */
1039
+ private _lastMuted;
1040
+ /**
1041
+ * @type {string}
1042
+ * 当前播放类型
1043
+ */
1044
+ vtype: string;
1045
+ /**
1046
+ * @type {number}
1047
+ * @private
1048
+ */
1049
+ private _rate;
1050
+ /**
1051
+ * @description 初始化时添加在video上的属性集合
1052
+ * @type { {[propName: string]: any } }
1053
+ */
1054
+ mediaConfig: {
1055
+ [propName: string]: any;
1056
+ };
1057
+ /**
1058
+ * @type { HTMLVideoElement | HTMLAudioElement | HTMLElement | IMediaProxy | null }
1059
+ */
1060
+ media: HTMLVideoElement | HTMLAudioElement | HTMLElement | IMediaProxy | null;
1061
+ set volume(arg: number);
1062
+ /**
1063
+ * @type { number }
1064
+ * @description 设置/返回视频的音量
1065
+ */
1066
+ get volume(): number;
1067
+ /**
1068
+ * @private
1069
+ */
1070
+ private _interval;
1071
+ /**
1072
+ * @readonly
1073
+ */
1074
+ readonly mediaEventMiddleware: {};
1075
+ /**
1076
+ * @description set middleware
1077
+ * @param { {[propName: string]: (e: {player: any, eventName: string}, callback: () => void) => any} } middlewares
1078
+ */
1079
+ setEventsMiddleware(middlewares: {
1080
+ [propName: string]: (e: {
1081
+ player: any;
1082
+ eventName: string;
1083
+ }, callback: () => void) => any;
1084
+ }): void;
1085
+ /**
1086
+ * @description remove middleware
1087
+ * @param { { [propName: string]: (e: {player: any, eventName: string}, callback: () => void) => any} } middlewares
1088
+ */
1089
+ removeEventsMiddleware(middlewares: {
1090
+ [propName: string]: (e: {
1091
+ player: any;
1092
+ eventName: string;
1093
+ }, callback: () => void) => any;
1094
+ }): void;
1095
+ /**
1096
+ * Add media eventListener to the video object
1097
+ * @param { any } [media]
1098
+ */
1099
+ attachVideoEvents(media?: any): void;
1100
+ /**
1101
+ * @private
1102
+ */
1103
+ private _evHandlers;
1104
+ /**
1105
+ * @description remove media eventListener from the video object
1106
+ * @param { any } [media]
1107
+ */
1108
+ detachVideoEvents(media?: any): void;
1109
+ /**
1110
+ * 针对source列表播放方式添加错误监听
1111
+ * @doc https://stackoverflow.com/questions/47557135/html5-detect-the-type-of-error-when-trying-to-load-a-video-using-a-source-elem
1112
+ * @protected
1113
+ * @param { HTMLVideoElement | HTMLAudioElement } video
1114
+ * @param { Array<{src: string, type: string }>} urls
1115
+ */
1116
+ protected _attachSourceEvents(video: HTMLVideoElement | HTMLAudioElement, urls: Array<{
1117
+ src: string;
1118
+ type: string;
1119
+ }>): void;
1120
+ /**
1121
+ * @private
1122
+ */
1123
+ private _videoSourceCount;
1124
+ _videoSourceIndex: number;
1125
+ _vLoadeddata: (e: any) => void;
1126
+ _sourceError: (e: any) => void;
1127
+ /**
1128
+ * 移除source列表错误事件监听
1129
+ * @protected
1130
+ * @param { HTMLVideoElement | HTMLAudioElement } video
1131
+ */
1132
+ protected _detachSourceEvents(video: HTMLVideoElement | HTMLAudioElement): void;
1133
+ /**
1134
+ * @description Media Error handler
1135
+ * @param { string } eventName
1136
+ */
1137
+ errorHandler(name: any, error?: any): void;
1138
+ destroy(): void;
1139
+ /**
1140
+ * @type { HTMLVideoElement | HTMLAudioElement | HTMLElement | IMediaProxy | null }
1141
+ * @deprecated Property [video] is renamed to [media],you can access using player.media= xx
1142
+ */
1143
+ set video(arg: HTMLElement | HTMLVideoElement | HTMLAudioElement | IMediaProxy);
1144
+ /**
1145
+ * @type { HTMLVideoElement | HTMLAudioElement | HTMLElement | IMediaProxy | null }
1146
+ * @deprecated Property [video] is renamed to [media],you can access using player.media
1147
+ */
1148
+ get video(): HTMLElement | HTMLVideoElement | HTMLAudioElement | IMediaProxy;
1149
+ /**
1150
+ *
1151
+ * @returns { Promise<void> | null }
1152
+ */
1153
+ play(): Promise<void> | null;
1154
+ pause(): void;
1155
+ load(): void;
1156
+ /**
1157
+ *
1158
+ * @param { string } type
1159
+ * @returns { boolean }
1160
+ */
1161
+ canPlayType(type: string): boolean;
1162
+ /**
1163
+ *
1164
+ * @param { any } [buffered]
1165
+ * @returns { Array<number> }
1166
+ */
1167
+ getBufferedRange(buffered?: any): Array<number>;
1168
+ /**
1169
+ * @type { boolean }
1170
+ * @description 设置/返回 自动播放属性
1171
+ */
1172
+ set autoplay(arg: any);
1173
+ get autoplay(): any;
1174
+ /**
1175
+ * @type { TimeRanges | null }
1176
+ * @description 返回当前缓冲的TimeRange对象集合
1177
+ */
1178
+ get buffered(): TimeRanges;
1179
+ /**
1180
+ * @type { Array<{start: number, end: number}> | null}
1181
+ * @description 返回当前自定义的缓存列表
1182
+ */
1183
+ get buffered2(): {
1184
+ start: number;
1185
+ end: number;
1186
+ }[];
1187
+ /**
1188
+ * @type { {start: number, end: number} }
1189
+ */
1190
+ get bufferedPoint(): {
1191
+ start: number;
1192
+ end: number;
1193
+ };
1194
+ set crossOrigin(arg: string);
1195
+ /**
1196
+ * @type { string}
1197
+ * @description 设置/返回是否跨域
1198
+ * */
1199
+ get crossOrigin(): string;
1200
+ set currentSrc(arg: string);
1201
+ /**
1202
+ * @type { string }
1203
+ * @description 设置/返回视频播放地址
1204
+ * */
1205
+ get currentSrc(): string;
1206
+ set currentTime(arg: number);
1207
+ /**
1208
+ * @type { number }
1209
+ * @description 设置/返回视频当前播放时间
1210
+ * */
1211
+ get currentTime(): number;
1212
+ set defaultMuted(arg: boolean);
1213
+ /**
1214
+ * @type { boolean }
1215
+ * 设置/返回视频默认静音
1216
+ * */
1217
+ get defaultMuted(): boolean;
1218
+ /**
1219
+ * @type { number }
1220
+ * @description 返回视频时长,单位:s
1221
+ * */
1222
+ get duration(): number;
1223
+ /**
1224
+ * @type { boolean }
1225
+ * @description 回视频是否播放结束
1226
+ * */
1227
+ get ended(): boolean;
1228
+ /**
1229
+ * @type { MediaError }
1230
+ * @description the player current error
1231
+ */
1232
+ get error(): MediaError;
1233
+ /**
1234
+ * @type { string }
1235
+ * @description return error description text
1236
+ */
1237
+ get errorNote(): string;
1238
+ set loop(arg: boolean);
1239
+ /**
1240
+ * @type { boolean }
1241
+ * @description 否开启了循环播放
1242
+ */
1243
+ get loop(): boolean;
1244
+ set muted(arg: boolean);
1245
+ /**
1246
+ * @type { boolean }
1247
+ * @description 静音
1248
+ */
1249
+ get muted(): boolean;
1250
+ /**
1251
+ * @type { 0 | 1 | 2 | 3 }
1252
+ * @description 返回视频的当前网络状态
1253
+ */
1254
+ get networkState(): 0 | 2 | 1 | 3;
1255
+ /**
1256
+ * @type { boolean }
1257
+ * @description 回当前视频是否是暂停状态
1258
+ */
1259
+ get paused(): boolean;
1260
+ set playbackRate(arg: number);
1261
+ /**
1262
+ * @type { number }
1263
+ * @description 返回/设置倍速
1264
+ */
1265
+ get playbackRate(): number;
1266
+ /**
1267
+ * @type { TimeRanges | null}
1268
+ */
1269
+ get played(): TimeRanges;
1270
+ set preload(arg: boolean);
1271
+ /**
1272
+ * @type { boolean }
1273
+ */
1274
+ get preload(): boolean;
1275
+ /**
1276
+ * @type { 0 | 1 | 2 | 3 | 4 }
1277
+ * @description 回视频的就绪状态
1278
+ */
1279
+ get readyState(): 0 | 2 | 1 | 3 | 4;
1280
+ /**
1281
+ * @type { boolean }
1282
+ * @description 当前视频是否可以seek
1283
+ */
1284
+ get seekable(): boolean;
1285
+ /**
1286
+ * @type { boolean }
1287
+ * @description 当前视频是否处于seeking状态下
1288
+ */
1289
+ get seeking(): boolean;
1290
+ set src(arg: any);
1291
+ /**
1292
+ * @type { any }
1293
+ * @description 设置/返回当前视频的地址
1294
+ */
1295
+ get src(): any;
1296
+ /**
1297
+ * @type { number }
1298
+ * @description 返回视频的纵横比
1299
+ */
1300
+ get aspectRatio(): number;
1301
+ addInnerOP(event: any): void;
1302
+ removeInnerOP(event: any): void;
1303
+ /** ******************* 以下api只有申明作用,具体实现依赖EventEmitter ******************/
1304
+ /**
1305
+ * @param { string } event
1306
+ * @param { any } [data]
1307
+ * @returns
1308
+ */
1309
+ emit(event: string, data?: any, ...args: any[]): void;
1310
+ /**
1311
+ * @param { string } event
1312
+ * @param { (...args: any[]) => any } callback
1313
+ * @returns
1314
+ */
1315
+ on(event: string, callback: (...args: any[]) => any, ...args: any[]): void;
1316
+ /**
1317
+ * @param { string } event
1318
+ * @param { (...args: any[]) => any } callback
1319
+ * @returns
1320
+ */
1321
+ once(event: string, callback: (...args: any[]) => any, ...args: any[]): void;
1322
+ /**
1323
+ *
1324
+ * @param { string } event
1325
+ * @param { (...args: any[]) => any } callback
1326
+ * @returns
1327
+ */
1328
+ off(event: string, callback: (...args: any[]) => any, ...args: any[]): void;
1329
+ offAll(): void;
1330
+ }
1331
+ //#endregion
1332
+ //#region node_modules/xgplayer/es/plugins/controls/index.d.ts
1333
+ type IControlsConfig = {
1334
+ [propName: string]: any;
1335
+ disable?: boolean;
1336
+ autoHide?: boolean;
1337
+ mode?: "flex" | "normal" | "bottom";
1338
+ initShow?: boolean;
1339
+ };
1340
+ /**
1341
+ * @typedef {{
1342
+ * disable?: boolean,
1343
+ * autoHide?: boolean,
1344
+ * mode?: "flex"|"normal"|"bottom",
1345
+ * initShow?: boolean,
1346
+ * [propName: string]: any
1347
+ * }} IControlsConfig
1348
+ */
1349
+ declare class Controls extends Plugin {
1350
+ /**
1351
+ * @type IControlsConfig
1352
+ */
1353
+ static get defaultConfig(): IControlsConfig;
1354
+ beforeCreate(args: any): void;
1355
+ /**
1356
+ * @type { HTMLElement}
1357
+ * @readonly
1358
+ */
1359
+ readonly left: HTMLElement;
1360
+ /**
1361
+ * @type { HTMLElement}
1362
+ * @readonly
1363
+ */
1364
+ readonly center: HTMLElement;
1365
+ /**
1366
+ * @type { HTMLElement}
1367
+ * @readonly
1368
+ */
1369
+ readonly right: HTMLElement;
1370
+ /**
1371
+ * @type { HTMLElement}
1372
+ * @readonly
1373
+ */
1374
+ readonly innerRoot: HTMLElement;
1375
+ onMouseEnter: (e: any) => void;
1376
+ onMouseLeave: (e: any) => void;
1377
+ focus(): void;
1378
+ focusAwhile(): void;
1379
+ blur(): void;
1380
+ recoverAutoHide(): void;
1381
+ pauseAutoHide(): void;
1382
+ /**
1383
+ * @param {string} [value]
1384
+ * @returns
1385
+ */
1386
+ show(value?: string): void;
1387
+ /**
1388
+ * @type {string}
1389
+ */
1390
+ get mode(): string;
1391
+ /**
1392
+ *
1393
+ * @param {} plugin
1394
+ * @param { {config?: {[propName: string]: any}, position?:string, root?: HTMLElement, pluginName?: string}} options
1395
+ * @param { string } name
1396
+ * @returns { any }
1397
+ */
1398
+ registerPlugin(plugin: any, options: {
1399
+ config?: {
1400
+ [propName: string]: any;
1401
+ };
1402
+ position?: string;
1403
+ root?: HTMLElement;
1404
+ pluginName?: string;
1405
+ }, name: string): any;
1406
+ render(): string;
1407
+ }
1408
+ //#endregion
1409
+ //#region node_modules/xgplayer/es/instManager.d.ts
1410
+ declare const InstManager_base: eventemitter3.EventEmitterStatic;
1411
+ /**
1412
+ * Design as a class so that can be inherited to enhance functionality
1413
+ */
1414
+ declare class InstManager extends InstManager_base {
1415
+ static getInstance(): any;
1416
+ constructor();
1417
+ add(player: any): void;
1418
+ remove(player: any): void;
1419
+ /**
1420
+ * @private
1421
+ * @param {IterateFunction} fn
1422
+ * @param {?boolean} endEarly
1423
+ */
1424
+ private _iterate;
1425
+ /**
1426
+ * @param {IterateFunction} fn
1427
+ */
1428
+ forEach(fn: IterateFunction): void;
1429
+ /**
1430
+ * Iterates over items of store, returning the first one
1431
+ * @param {IterateFunction} fn
1432
+ * @returns {Player}
1433
+ */
1434
+ find(fn: IterateFunction): Player$1;
1435
+ /**
1436
+ * @param {IterateFunction} fn
1437
+ * @returns {Player[]}
1438
+ */
1439
+ findAll(fn: IterateFunction): Player$1[];
1440
+ /**
1441
+ * 设置实例的用户行为激活状态
1442
+ * @param { number | string } playerId
1443
+ * @param { boolean } isActive
1444
+ * @returns { number | null }
1445
+ */
1446
+ setActive(playerId: number | string, isActive?: boolean): number | null;
1447
+ /**
1448
+ * 获取当前处理激活态的实例id
1449
+ * @returns { number | null }
1450
+ */
1451
+ getActiveId(): number | null;
1452
+ /**
1453
+ * 标记下一个实例
1454
+ * @param { number | string } playerId
1455
+ * @param { boolean } isNext
1456
+ * @returns { number | null }
1457
+ */
1458
+ setNext(playerId: number | string, isNext?: boolean): number | null;
1459
+ }
1460
+ type IterateFunction = (Player: any) => boolean | null;
1461
+ type Player$1 = Player;
1462
+ //#endregion
1463
+ //#region node_modules/xgplayer/es/player.d.ts
1464
+ type IPlayerOptions$1 = IPlayerOptions$4;
1465
+ type IDefinition$2 = IDefinition$3;
1466
+ type IUrl = IUrl$1;
1467
+ type SwitchUrlOptions = boolean | {
1468
+ seamless?: boolean;
1469
+ currentTime?: number;
1470
+ bitrate?: number;
1471
+ };
1472
+ declare class Player extends MediaProxy {
1473
+ /**
1474
+ * @type {number}
1475
+ * @description set debugger level
1476
+ * 1 - only print error logs
1477
+ * 2 - print warn logs and error logs
1478
+ * 3 - print all debug logs and error stack logs
1479
+ */
1480
+ static set debugger(arg: number);
1481
+ static get debugger(): number;
1482
+ /**
1483
+ * @param {import('./instManager').InstManager} value
1484
+ */
1485
+ static set instManager(arg: InstManager);
1486
+ /**
1487
+ * @param {import('./instManager').InstManager} value
1488
+ */
1489
+ static get instManager(): InstManager;
1490
+ /**
1491
+ * 获取当前处理激活态的实例id
1492
+ * @returns { number | string | null }
1493
+ * @deprecated 该方法转移到 InstManager 上去使用: player.instManager.getActiveId()
1494
+ */
1495
+ static getCurrentUserActivePlayerId(): number | string | null;
1496
+ /**
1497
+ * 设置实例的用户行为激活状态
1498
+ * @param { number | string } playerId
1499
+ * @param { boolean } isActive
1500
+ * @deprecated 该方法转移到 InstManager 上去使用: player.instManager.setActive()
1501
+ */
1502
+ static setCurrentUserActive(playerId: number | string, isActive: boolean): void;
1503
+ /**
1504
+ * 当前浏览器是否支持hevc编码
1505
+ * @returns {boolean}
1506
+ */
1507
+ static isHevcSupported(): boolean;
1508
+ /**
1509
+ * 检测编码参数是否被当前浏览器支持
1510
+ * @doc https://developer.mozilla.org/en-US/docs/Web/API/MediaCapabilities/decodingInfo
1511
+ * @param {MediaDecodingConfiguration} info
1512
+ * @returns {MediaCapabilitiesDecodingInfo}
1513
+ */
1514
+ static probeConfigSupported(info: MediaDecodingConfiguration): MediaCapabilitiesDecodingInfo;
1515
+ /**
1516
+ * @deprecated
1517
+ * 插件全部迁移完成再做删除
1518
+ */
1519
+ static install(name: any, descriptor: any): void;
1520
+ /**
1521
+ * @deprecated
1522
+ * 插件全部迁移完成再做删除
1523
+ */
1524
+ static use(name: any, descriptor: any): void;
1525
+ static defaultPreset: any;
1526
+ /**
1527
+ * @description 自定义media构造函数
1528
+ */
1529
+ static XgVideoProxy: any;
1530
+ /**
1531
+ * @type { IPlayerOptions }
1532
+ * @description 当前播放器的配置信息
1533
+ */
1534
+ config: IPlayerOptions$1;
1535
+ /**
1536
+ * @type { string }
1537
+ * @private
1538
+ */
1539
+ private _pluginInfoId;
1540
+ userTimer: any;
1541
+ /**
1542
+ * @private
1543
+ */
1544
+ private waitTimer;
1545
+ /**
1546
+ * @public
1547
+ * @description This switch provides the playback plugin with the ability
1548
+ * to handle media source by itself.
1549
+ */
1550
+ public handleSource: boolean;
1551
+ /**
1552
+ * @private
1553
+ */
1554
+ private _state;
1555
+ /**
1556
+ * @public
1557
+ * @readonly
1558
+ * @type { boolean }
1559
+ */
1560
+ public readonly isAd: boolean;
1561
+ /**
1562
+ * @public
1563
+ * @readonly
1564
+ * @type { boolean }
1565
+ */
1566
+ public readonly isError: boolean;
1567
+ /**
1568
+ * Whether the player is in the seeking state
1569
+ * @type { boolean }
1570
+ * @readonly
1571
+ */
1572
+ readonly isSeeking: boolean;
1573
+ /**
1574
+ * @type { boolean }
1575
+ * @readonly
1576
+ */
1577
+ readonly isCanplay: boolean;
1578
+ /**
1579
+ * @private
1580
+ * @readonly
1581
+ */
1582
+ private readonly _useAutoplay;
1583
+ /**
1584
+ * @description 记录起播需要seek的时间点
1585
+ * @type { number }
1586
+ * @private
1587
+ * @readonly
1588
+ */
1589
+ private readonly __startTime;
1590
+ /**
1591
+ * @type { number }
1592
+ */
1593
+ rotateDeg: number;
1594
+ /**
1595
+ * Whether the player is focus
1596
+ * @type { boolean }
1597
+ * @readonly
1598
+ */
1599
+ readonly isActive: boolean;
1600
+ /**
1601
+ * Whether player is currently in fullscreen
1602
+ * @type { boolean }
1603
+ * @readonly
1604
+ */
1605
+ readonly fullscreen: boolean;
1606
+ /**
1607
+ * @type { boolean }
1608
+ * @readonly
1609
+ */
1610
+ readonly cssfullscreen: boolean;
1611
+ /**
1612
+ * @type { boolean }
1613
+ * @readonly
1614
+ */
1615
+ readonly isRotateFullscreen: boolean;
1616
+ /**
1617
+ * fullscreenElement
1618
+ * @type { HTMLElement | null }
1619
+ * @readonly
1620
+ */
1621
+ readonly _fullscreenEl: HTMLElement | null;
1622
+ timeSegments: any[];
1623
+ /**
1624
+ * cssfullscreen target Element
1625
+ * @type { HTMLElement | null }
1626
+ * @readonly
1627
+ */
1628
+ readonly _cssfullscreenEl: HTMLElement | null;
1629
+ /**
1630
+ * @type { ?IDefinition }
1631
+ * @public
1632
+ */
1633
+ public curDefinition: IDefinition$2 | null;
1634
+ /**
1635
+ * @private
1636
+ * @type { string }
1637
+ */
1638
+ private _orgCss;
1639
+ /**
1640
+ * @readonly
1641
+ * @type { number }
1642
+ */
1643
+ readonly _fullScreenOffset: number;
1644
+ /**
1645
+ * @private
1646
+ * @type { number }
1647
+ */
1648
+ private _videoHeight;
1649
+ /**
1650
+ * @private
1651
+ * @type { number }
1652
+ */
1653
+ private _videoWidth;
1654
+ videoPos: {
1655
+ pi: number;
1656
+ scale: number;
1657
+ rotate: number;
1658
+ x: number;
1659
+ y: number;
1660
+ h: number;
1661
+ w: number;
1662
+ vy: number;
1663
+ vx: number;
1664
+ };
1665
+ sizeInfo: {
1666
+ width: number;
1667
+ height: number;
1668
+ left: number;
1669
+ top: number;
1670
+ };
1671
+ /**
1672
+ * @private
1673
+ * @type { { t: number, acc:number, acc: number, loopAcc: number, [propName: string]: any;} }
1674
+ */
1675
+ private _accPlayed;
1676
+ /**
1677
+ * @description 播放器时长、播放时间偏移信息
1678
+ */
1679
+ _offsetInfo: {
1680
+ currentTime: number;
1681
+ duration: number;
1682
+ };
1683
+ /**
1684
+ * @type { null | HTMLElement }
1685
+ * @readonly
1686
+ * @description 控制栏和video不同布局的时候内部容器
1687
+ */
1688
+ readonly innerContainer: null | HTMLElement;
1689
+ /**
1690
+ * @type { ?Controls }
1691
+ * @readonly
1692
+ * @description 控制栏插件
1693
+ */
1694
+ readonly controls: Controls | null;
1695
+ /**
1696
+ * @type { null | HTMLElement }
1697
+ * @readonly
1698
+ */
1699
+ readonly topBar: null | HTMLElement;
1700
+ /**
1701
+ * @type { null | HTMLElement }
1702
+ * @readonly
1703
+ * @description 当前播放器根节点
1704
+ */
1705
+ readonly root: null | HTMLElement;
1706
+ __i18n: IXGI18n;
1707
+ /**
1708
+ * @readonly
1709
+ * @type {any}
1710
+ */
1711
+ readonly database: any;
1712
+ /**
1713
+ * @readonly
1714
+ * @type { boolean }
1715
+ */
1716
+ readonly isUserActive: boolean;
1717
+ /**
1718
+ * @private
1719
+ * @description seek之后canplay回调函数定义
1720
+ * @type { Function | null }
1721
+ */
1722
+ private _onceSeekCanplay;
1723
+ /**
1724
+ * @description 记录seek之前是否处于暂停状态
1725
+ * @type { number }
1726
+ * @private
1727
+ */
1728
+ private _isPauseBeforeSeek;
1729
+ /**
1730
+ * @description 内部状态记录
1731
+ * @type { {
1732
+ * isActiveLocked: boolean;
1733
+ * } }
1734
+ * @readonly
1735
+ */
1736
+ readonly innerStates: {
1737
+ isActiveLocked: boolean;
1738
+ };
1739
+ /**
1740
+ * @type {InstManager}
1741
+ */
1742
+ instManager: InstManager;
1743
+ /**
1744
+ * init control domElement
1745
+ * @private
1746
+ */
1747
+ private _initDOM;
1748
+ /**
1749
+ * @private
1750
+ */
1751
+ private _initBaseDoms;
1752
+ /**
1753
+ * @readonly
1754
+ * @type { HTMLElement |null }
1755
+ */
1756
+ readonly leftBar: HTMLElement | null;
1757
+ /**
1758
+ * @readonly
1759
+ * @type { HTMLElement | null }
1760
+ */
1761
+ readonly rightBar: HTMLElement | null;
1762
+ /**
1763
+ * @private
1764
+ */
1765
+ private _bindEvents;
1766
+ playFunc: () => void;
1767
+ /**
1768
+ * @private
1769
+ */
1770
+ private _unbindEvents;
1771
+ _clearUserTimer(): void;
1772
+ /**
1773
+ * @param { any } [url]
1774
+ * @param { { playSessionId?: number } } [options]
1775
+ * @returns
1776
+ */
1777
+ _startInit(url?: any, options?: {
1778
+ playSessionId?: number;
1779
+ }): void;
1780
+ _playSessionId: number;
1781
+ set hasStart(arg: boolean);
1782
+ /**
1783
+ * @type { boolean }
1784
+ * @description 是否开始播放
1785
+ */
1786
+ get hasStart(): boolean;
1787
+ /**
1788
+ * @description 注册组件 组件列表config.plugins
1789
+ * @param { {boolean} } [isInit] 是否是首次初始化
1790
+ * @private
1791
+ */
1792
+ private _registerPlugins;
1793
+ /**
1794
+ * @private
1795
+ */
1796
+ private _loadingPlugins;
1797
+ /**
1798
+ * @private
1799
+ */
1800
+ private _registerPresets;
1801
+ /**
1802
+ * @private
1803
+ * @param { string } position ]
1804
+ */
1805
+ private _getRootByPosition;
1806
+ /**
1807
+ *
1808
+ * @param { {plugin: function, options:object} | function } plugin
1809
+ * @param { {[propName: string]: any;} } [config]
1810
+ * @returns { any } plugin
1811
+ */
1812
+ registerPlugin(plugin: Function | {
1813
+ plugin: Function;
1814
+ options: object;
1815
+ }, config?: {
1816
+ [propName: string]: any;
1817
+ }): any;
1818
+ /**
1819
+ *
1820
+ * @param { any } plugin
1821
+ */
1822
+ deregister(plugin: any): void;
1823
+ /**
1824
+ *
1825
+ * @param { any } plugin
1826
+ * @param { boolean } removedFromConfig
1827
+ */
1828
+ unRegisterPlugin(plugin: any, removedFromConfig?: boolean): void;
1829
+ removePluginFromConfig(plugin: any): void;
1830
+ /**
1831
+ * 当前播放器挂载的插件实例列表
1832
+ * @type { {[propName: string]: any | null } }
1833
+ */
1834
+ get plugins(): {
1835
+ [propName: string]: any;
1836
+ };
1837
+ /**
1838
+ * get a plugin instance
1839
+ * @param { string } pluginName
1840
+ * @return { null | any } plugin
1841
+ */
1842
+ getPlugin(pluginName: string): null | any;
1843
+ /**
1844
+ *
1845
+ * @param { string } className
1846
+ */
1847
+ addClass(className: string): void;
1848
+ /**
1849
+ *
1850
+ * @param { string } className
1851
+ * @returns
1852
+ */
1853
+ removeClass(className: string): void;
1854
+ /**
1855
+ *
1856
+ * @param { string } className
1857
+ * @returns { boolean } has
1858
+ */
1859
+ hasClass(className: string): boolean;
1860
+ /**
1861
+ *
1862
+ * @param { string } key
1863
+ * @param { any } value
1864
+ * @returns void
1865
+ */
1866
+ setAttribute(key: string, value: any): void;
1867
+ /**
1868
+ *
1869
+ * @param { string } key
1870
+ * @param { any } value
1871
+ * @returns void
1872
+ */
1873
+ removeAttribute(key: string, value: any): void;
1874
+ /**
1875
+ *
1876
+ * @param { any } [url]
1877
+ * @returns { Promise<void> | void }
1878
+ * @description 启动播放器,start一般都是播放器内部隐式调用,主要功能是将video添加到DOM
1879
+ */
1880
+ start(url?: any): Promise<void> | void;
1881
+ /**
1882
+ * @param { string | object } url
1883
+ * @param { SwitchUrlOptions } [options]
1884
+ * @returns { Promise | null } 执行结果
1885
+ */
1886
+ switchURL(url: string | object, options?: SwitchUrlOptions): Promise<any> | null;
1887
+ /**
1888
+ * @description call play without play hook
1889
+ * @deprecated this api renamed to mediaPlay, you can call it as player.mediaPlay()
1890
+ */
1891
+ videoPlay(): void;
1892
+ /**
1893
+ * @description call play without play hook
1894
+ */
1895
+ mediaPlay(): Promise<void>;
1896
+ /**
1897
+ * @private
1898
+ */
1899
+ private _errorTimer;
1900
+ /**
1901
+ * @description call play without pause hook
1902
+ */
1903
+ mediaPause(): void;
1904
+ /**
1905
+ * @description call play without pause hook
1906
+ * @deprecated this api renamed to mediaPause, you can call it as player.mediaPause()
1907
+ */
1908
+ videoPause(): void;
1909
+ play(): any;
1910
+ /**
1911
+ *
1912
+ * @param { number } time
1913
+ * @param { 'play' | 'pause' | 'auto' } [status]
1914
+ * @returns
1915
+ */
1916
+ seek(time: number, status?: 'play' | 'pause' | 'auto'): void;
1917
+ currentTime: any;
1918
+ getInitDefinition(): void;
1919
+ /**
1920
+ * @typedef { import('./defaultConfig').IDefinition } definition
1921
+ */
1922
+ /**
1923
+ * @description change the definition of the current playback
1924
+ * @param { definition } to
1925
+ * @param { definition } [from]
1926
+ */
1927
+ changeDefinition(to: IDefinition$3, from?: IDefinition$3): void;
1928
+ reload(): void;
1929
+ /**
1930
+ * @private
1931
+ */
1932
+ private reloadFunc;
1933
+ resetState(): void;
1934
+ /**
1935
+ * 重置播放实例
1936
+ * @param { Array<string> } unregisterPlugins 重置的时候需要卸载重新初始化的插件列表
1937
+ * @param { boolean } [isResetConfig] 是否需要重置配置列表
1938
+ * @returns
1939
+ */
1940
+ reset(unregisterPlugins?: Array<string>, isResetConfig?: boolean): void;
1941
+ replay(): void;
1942
+ retry(): void;
1943
+ /**
1944
+ *
1945
+ * @param { HTMLElement } root
1946
+ * @param { HTMLElement } [el]
1947
+ * @param { string } [rootClass]
1948
+ * @param { string } [pClassName]
1949
+ */
1950
+ changeFullStyle(root: HTMLElement, el?: HTMLElement, rootClass?: string, pClassName?: string): void;
1951
+ /**
1952
+ * @private
1953
+ */
1954
+ private _orgPCss;
1955
+ /**
1956
+ *
1957
+ * @param { HTMLElement } root
1958
+ * @param { HTMLElement } [el]
1959
+ * @param { string } [rootClass]
1960
+ * @param { string } [pClassName]
1961
+ */
1962
+ recoverFullStyle(root: HTMLElement, el?: HTMLElement, rootClass?: string, pClassName?: string): void;
1963
+ /**
1964
+ * @param { HTMLElement } [el]
1965
+ * @returns { Promise<void> }
1966
+ */
1967
+ getFullscreen(el?: HTMLElement): Promise<void>;
1968
+ /**
1969
+ * @private
1970
+ */
1971
+ private _fullActionFrom;
1972
+ /**
1973
+ * @param { HTMLElement } [el]
1974
+ * @returns { Promise<void> }
1975
+ */
1976
+ exitFullscreen(el?: HTMLElement): Promise<void>;
1977
+ /**
1978
+ * @param { HTMLElement } [el]
1979
+ * @returns
1980
+ */
1981
+ getCssFullscreen(el?: HTMLElement): void;
1982
+ /**
1983
+ * @param { HTMLElement } [el]
1984
+ * @returns
1985
+ */
1986
+ exitCssFullscreen(): void;
1987
+ /**
1988
+ * 进入旋转全屏
1989
+ * @param { HTMLElement } [el]
1990
+ */
1991
+ getRotateFullscreen(el?: HTMLElement): void;
1992
+ _rootStyle: string | boolean;
1993
+ /**
1994
+ * 退出旋转全屏
1995
+ * @param { HTMLElement } [el]
1996
+ */
1997
+ exitRotateFullscreen(el?: HTMLElement): void;
1998
+ setRotateDeg(deg: any): void;
1999
+ /**
2000
+ * @description 播放器焦点状态,控制栏显示
2001
+ * @param { {
2002
+ * autoHide?: boolean, // 是否可以自动隐藏
2003
+ * delay?: number // 自动隐藏的延迟时间, ms, 不传默认使用3000ms
2004
+ * isLock?: boolean // 是否锁定, 锁定之后自动呼出和blur调用都不生效, 默认值false
2005
+ * } } [data]
2006
+ */
2007
+ focus(data?: {
2008
+ autoHide?: boolean;
2009
+ delay?: number;
2010
+ isLock?: boolean;
2011
+ }): void;
2012
+ /**
2013
+ * @description 取消播放器当前焦点状态
2014
+ * @param { { ignorePaused?: boolean } } [data]
2015
+ */
2016
+ blur(data?: {
2017
+ ignorePaused?: boolean;
2018
+ }): void;
2019
+ /**
2020
+ * @protected
2021
+ * @param { { autoHide?: boolean, delay?: number, isLock?: boolean } } [data]
2022
+ * @returns
2023
+ */
2024
+ protected onFocus(data?: {
2025
+ autoHide?: boolean;
2026
+ delay?: number;
2027
+ isLock?: boolean;
2028
+ }): void;
2029
+ /**
2030
+ * @protected
2031
+ * @param {{ ignorePaused?: boolean }} [data]
2032
+ * @returns
2033
+ */
2034
+ protected onBlur({
2035
+ ignorePaused
2036
+ }?: {
2037
+ ignorePaused?: boolean;
2038
+ }): void;
2039
+ canPlayFunc: () => void;
2040
+ /**
2041
+ *
2042
+ */
2043
+ onFullscreenChange: (event: any, isFullScreen: any) => void;
2044
+ _onWebkitbeginfullscreen: (e: any) => void;
2045
+ _onWebkitendfullscreen: (e: any) => void;
2046
+ onEmptied(): void;
2047
+ /**
2048
+ * @protected
2049
+ */
2050
+ protected onCanplay(): void;
2051
+ onLoadeddata(): void;
2052
+ onLoadstart(): void;
2053
+ /**
2054
+ * @protected
2055
+ */
2056
+ protected onPlay(): void;
2057
+ /**
2058
+ * @protected
2059
+ */
2060
+ protected onPause(): void;
2061
+ /**
2062
+ * @protected
2063
+ */
2064
+ protected onEnded(): void;
2065
+ /**
2066
+ * @protected
2067
+ */
2068
+ protected onError(): void;
2069
+ /**
2070
+ * @protected
2071
+ */
2072
+ protected onSeeking(): void;
2073
+ /**
2074
+ * @protected
2075
+ */
2076
+ protected onSeeked(): void;
2077
+ /**
2078
+ * @protected
2079
+ */
2080
+ protected onWaiting(): void;
2081
+ /**
2082
+ * @protected
2083
+ */
2084
+ protected onPlaying(): void;
2085
+ /**
2086
+ * @protected
2087
+ */
2088
+ protected onTimeupdate(): void;
2089
+ onVolumechange(): void;
2090
+ onRatechange(): void;
2091
+ /**
2092
+ * 触发用户行为事件,第一个参数是Dom事件
2093
+ * @param { Event } event
2094
+ * @param { string } action
2095
+ * @param {[propName: string]: any; } [params]
2096
+ * @returns
2097
+ */
2098
+ emitUserAction(event: Event, action: string, params: any): void;
2099
+ updateAcc(endType: any): void;
2100
+ /**
2101
+ * 目标时间点是否在buffer内
2102
+ * @param { number } time 时间点
2103
+ * @param options 判断阈值配置,可选的
2104
+ * @param options.startDiff 判断起始阈值,即该时间下距离buffer开始点超过阈值时才算作在buffer内,默认为0
2105
+ * @param options.endDiff 判断结束阈值,即该时间下距离buffer结束点超过阈值时才算作在buffer内,默认为0
2106
+ * @returns { boolean }
2107
+ */
2108
+ checkBuffer(time: number, options?: {
2109
+ startDiff: number;
2110
+ endDiff: number;
2111
+ }): boolean;
2112
+ resizePosition(): void;
2113
+ /**
2114
+ * @description position video/audio according to height ratio and y coordinate
2115
+ * @param { { h: number, y?: number, x?:number, w?:number} } pos
2116
+ * @returns
2117
+ */
2118
+ position(pos?: {
2119
+ h: number;
2120
+ y?: number;
2121
+ x?: number;
2122
+ w?: number;
2123
+ }): void;
2124
+ /**
2125
+ * @description Update configuration parameters
2126
+ * @param { IPlayerOptions } config
2127
+ */
2128
+ setConfig(config: IPlayerOptions$1): void;
2129
+ /**
2130
+ * @description play another video resource
2131
+ * @param { IPlayerOptions } config
2132
+ */
2133
+ playNext(config: IPlayerOptions$1): void;
2134
+ resize(): void;
2135
+ /**
2136
+ *
2137
+ * @param { number } left
2138
+ * @param { number } top
2139
+ * @returns
2140
+ */
2141
+ updateObjectPosition(left?: number, top?: number): void;
2142
+ /**
2143
+ * @protected
2144
+ * @param { number } newState
2145
+ */
2146
+ protected setState(newState: number): void;
2147
+ /**
2148
+ * @description url preprocessing
2149
+ * @param { IUrl } url
2150
+ * @param { {[propName: string]: any} } [ext]
2151
+ * @returns { url: IUrl, [propName: string]: any }
2152
+ * @public
2153
+ */
2154
+ public preProcessUrl(url: IUrl, ext?: {
2155
+ [propName: string]: any;
2156
+ }): IUrl$1;
2157
+ /**
2158
+ * @description 跳转至配置的起播时间点
2159
+ */
2160
+ _seekToStartTime(): void;
2161
+ /**
2162
+ * @type { number }
2163
+ */
2164
+ get state(): number;
2165
+ /**
2166
+ * @type { boolean }
2167
+ */
2168
+ get isFullscreen(): boolean;
2169
+ /**
2170
+ * @type { boolean }
2171
+ */
2172
+ get isCssfullScreen(): boolean;
2173
+ set isPlaying(arg: boolean);
2174
+ /**
2175
+ * @type { boolean }
2176
+ * @description 是否已经进入起播状态
2177
+ */
2178
+ get isPlaying(): boolean;
2179
+ /**
2180
+ * @type { Array.<IDefinition> }
2181
+ */
2182
+ set definitionList(arg: IDefinition$3[]);
2183
+ get definitionList(): IDefinition$3[];
2184
+ /**
2185
+ * @description VideoFrames infos
2186
+ * @type { {
2187
+ * total: number,
2188
+ * dropped: number,
2189
+ * corrupted: number,
2190
+ * droppedRate: number,
2191
+ * droppedDuration: number
2192
+ * } }
2193
+ */
2194
+ get videoFrameInfo(): {
2195
+ total: number;
2196
+ dropped: number;
2197
+ corrupted: number;
2198
+ droppedRate: number;
2199
+ droppedDuration: number;
2200
+ };
2201
+ /**
2202
+ * @type { string }
2203
+ */
2204
+ set lang(arg: string);
2205
+ get lang(): string;
2206
+ get i18n(): IXGI18nText;
2207
+ get i18nKeys(): {
2208
+ [propName: string]: string;
2209
+ };
2210
+ /**
2211
+ * @type { string }
2212
+ */
2213
+ get version(): string;
2214
+ /**
2215
+ * @type { number | string }
2216
+ */
2217
+ get playerId(): string | number;
2218
+ /**
2219
+ * @type { any }
2220
+ */
2221
+ set url(arg: any);
2222
+ get url(): any;
2223
+ /**
2224
+ * @private
2225
+ */
2226
+ private __url;
2227
+ /**
2228
+ * @type { string }
2229
+ */
2230
+ set poster(arg: any);
2231
+ get poster(): any;
2232
+ get error(): any;
2233
+ /**
2234
+ * @type { boolean }
2235
+ */
2236
+ get fullscreenChanging(): boolean;
2237
+ /**
2238
+ * 累计观看时长
2239
+ * @type { number }
2240
+ */
2241
+ get cumulateTime(): number;
2242
+ /**
2243
+ * @type { number }
2244
+ */
2245
+ set zoom(arg: number);
2246
+ /**
2247
+ * @type { number }
2248
+ */
2249
+ get zoom(): number;
2250
+ /**
2251
+ * @type {number}
2252
+ * @description Media element rotation angle, Only multiples of 90 degrees are supported
2253
+ */
2254
+ set videoRotateDeg(arg: number);
2255
+ get videoRotateDeg(): number;
2256
+ /**
2257
+ * @description 均衡下载速度,单位kb/s, 根据10条最新下载速度计算出来的加权值,如果没有测速能力则默认是0
2258
+ * @type { number }
2259
+ */
2260
+ set avgSpeed(arg: number);
2261
+ get avgSpeed(): number;
2262
+ /**
2263
+ * @type { number }
2264
+ * 最新一次下载速度,单位kb/s, 如果没有测速能力则默认是0
2265
+ */
2266
+ set realTimeSpeed(arg: number);
2267
+ get realTimeSpeed(): number;
2268
+ set offsetCurrentTime(arg: number);
2269
+ get offsetCurrentTime(): number;
2270
+ set offsetDuration(arg: number);
2271
+ get offsetDuration(): number;
2272
+ /**
2273
+ * @param { string } hookName
2274
+ * @param { Function } handler
2275
+ * @param { {pre: Function| null , next: Function | null} } preset
2276
+ * @returns
2277
+ */
2278
+ hook(hookName: string, handler: Function, preset?: {
2279
+ pre: Function | null;
2280
+ next: Function | null;
2281
+ }, ...args: any[]): any;
2282
+ /**
2283
+ * @param { string } hookName
2284
+ * @param { (player: any, ...args) => boolean | Promise<any> } handler
2285
+ * @param {...any} args
2286
+ * @returns {boolean} isSuccess
2287
+ */
2288
+ useHooks(hookName: string, handler: (player: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
2289
+ /**
2290
+ *
2291
+ * @param { string } hookName
2292
+ * @param { (player: any, ...args) => boolean | Promise<any> } handler
2293
+ * @returns
2294
+ */
2295
+ removeHooks(hookName: string, handler: (player: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): any;
2296
+ /**
2297
+ *
2298
+ * @param { string } pluginName
2299
+ * @param { string } hookName
2300
+ * @param { (plugin: any, ...args) => boolean | Promise<any> } handler
2301
+ * @param {...any} args
2302
+ * @returns { boolean } isSuccess
2303
+ */
2304
+ usePluginHooks(pluginName: string, hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
2305
+ /**
2306
+ *
2307
+ * @param { string } pluginName
2308
+ * @param { string } hookName
2309
+ * @param { (plugin: any, ...args) => boolean | Promise<any> } handler
2310
+ * @param {...any} args
2311
+ * @returns { boolean } isSuccess
2312
+ */
2313
+ removePluginHooks(pluginName: string, hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
2314
+ /**
2315
+ * 设置当前实例的用户激活态
2316
+ * @param { boolean } isActive
2317
+ * @param { boolean } [isMuted]
2318
+ */
2319
+ setUserActive(isActive: boolean, isMuted?: boolean): void;
2320
+ }
2321
+ //#endregion
2322
+ //#region node_modules/xgplayer/es/plugins/common/iconPlugin.d.ts
2323
+ declare class Icon extends Plugin {
2324
+ _onMouseenter: (e: any) => void;
2325
+ _onMouseLeave: (e: any) => void;
2326
+ }
2327
+ //#endregion
2328
+ //#region node_modules/xgplayer/es/plugins/fullscreen/index.d.ts
2329
+ /**
2330
+ * @typedef { {
2331
+ * position?: string,
2332
+ * index?: number,
2333
+ * useCssFullscreen?: boolean,
2334
+ * rotateFullscreen?: boolean,
2335
+ * useScreenOrientation?: boolean,
2336
+ * lockOrientationType?: OrientationType,
2337
+ * switchCallback?: () => any,
2338
+ * target?: null | HTMLElement,
2339
+ * disable?: boolean,
2340
+ * needBackIcon?: boolean,
2341
+ * [propName: string]: any
2342
+ * } } IFullscreenConfig
2343
+ */
2344
+ declare class Fullscreen extends Icon {
2345
+ /**
2346
+ * @type IFullscreenConfig
2347
+ */
2348
+ static get defaultConfig(): IFullscreenConfig;
2349
+ handleFullscreen: any;
2350
+ topBackIcon: any;
2351
+ /**
2352
+ * @private
2353
+ */
2354
+ private _onOrientationChange;
2355
+ registerIcons(): {
2356
+ fullscreen: {
2357
+ icon: any;
2358
+ class: string;
2359
+ };
2360
+ exitFullscreen: {
2361
+ icon: any;
2362
+ class: string;
2363
+ };
2364
+ };
2365
+ initIcons(): void;
2366
+ /**
2367
+ * 切换全屏
2368
+ * @param { Event } [e]
2369
+ */
2370
+ toggleFullScreen(e?: Event): void;
2371
+ /**
2372
+ *
2373
+ * @param { boolean } isFullScreen
2374
+ */
2375
+ animate(isFullScreen: boolean): void;
2376
+ /**
2377
+ * @returns
2378
+ */
2379
+ render(): string;
2380
+ /**
2381
+ * 锁定屏幕方向,只有部分移动端浏览器支持
2382
+ * 兼容性参考:https://caniuse.com/mdn-api_screenorientation_lock
2383
+ * @param {OrientationType} orientation
2384
+ */
2385
+ lockScreen(orientation: OrientationType): void;
2386
+ /**
2387
+ * 解锁屏幕方向锁定,只有部分移动端浏览器支持
2388
+ */
2389
+ unlockScreen(): void;
2390
+ }
2391
+ type IFullscreenConfig = {
2392
+ [propName: string]: any;
2393
+ position?: string;
2394
+ index?: number;
2395
+ useCssFullscreen?: boolean;
2396
+ rotateFullscreen?: boolean;
2397
+ useScreenOrientation?: boolean;
2398
+ lockOrientationType?: OrientationType;
2399
+ switchCallback?: () => any;
2400
+ target?: null | HTMLElement;
2401
+ disable?: boolean;
2402
+ needBackIcon?: boolean;
2403
+ };
2404
+ //#endregion
2405
+ //#region node_modules/xgplayer/es/plugins/play/index.d.ts
2406
+ declare class Play extends Icon {
2407
+ static get defaultConfig(): {
2408
+ position: string;
2409
+ index: number;
2410
+ disable: boolean;
2411
+ };
2412
+ listenEvents(): void;
2413
+ registerIcons(): {
2414
+ play: {
2415
+ icon: any;
2416
+ class: string;
2417
+ };
2418
+ pause: {
2419
+ icon: any;
2420
+ class: string;
2421
+ };
2422
+ };
2423
+ btnClick: (e: any) => boolean;
2424
+ initIcons(): void;
2425
+ animate(paused: any): void;
2426
+ render(): string;
2427
+ }
2428
+ //#endregion
2429
+ //#region node_modules/xgplayer/es/plugins/progress/innerList.d.ts
2430
+ declare class InnerList {
2431
+ constructor(args: any);
2432
+ fragments: any;
2433
+ _callBack: any;
2434
+ fragConfig: {
2435
+ fragFocusClass: any;
2436
+ fragAutoFocus: boolean;
2437
+ fragClass: any;
2438
+ };
2439
+ style: any;
2440
+ duration: number;
2441
+ cachedIndex: number;
2442
+ playedIndex: number;
2443
+ focusIndex: number;
2444
+ updateDuration(duration: any): void;
2445
+ updateProgress(type?: string, data?: {
2446
+ newIndex: number;
2447
+ curIndex: number;
2448
+ millisecond: number;
2449
+ }): void;
2450
+ updateFocus(data: any): void;
2451
+ update(data: {
2452
+ cached: number;
2453
+ played: number;
2454
+ }, duration: any): void;
2455
+ findIndex(time: any, curIndex: any): any;
2456
+ findHightLight(): {
2457
+ dom: Element;
2458
+ pos: DOMRect;
2459
+ };
2460
+ findFragment(index: any): {
2461
+ dom: Element;
2462
+ pos: DOMRect;
2463
+ };
2464
+ unHightLight(): void;
2465
+ setHightLight(index: any): {
2466
+ dom: Element;
2467
+ pos: DOMRect;
2468
+ };
2469
+ destroy(): void;
2470
+ progressList: any;
2471
+ /**
2472
+ * 重置当前
2473
+ * @param {*} newOptions
2474
+ */
2475
+ reset(newOptions: any): void;
2476
+ render(): HTMLElement;
2477
+ root: HTMLElement;
2478
+ }
2479
+ //#endregion
2480
+ //#region node_modules/xgplayer/es/plugins/progress/index.d.ts
2481
+ type IProgressConfig = {
2482
+ [propName: string]: any;
2483
+ position?: string;
2484
+ disable?: boolean;
2485
+ isDraggingSeek?: boolean;
2486
+ closeMoveSeek?: boolean;
2487
+ isPauseMoving?: boolean;
2488
+ isCloseClickSeek?: boolean;
2489
+ fragments?: Array<{
2490
+ percent: number;
2491
+ }>;
2492
+ fragFocusClass?: string;
2493
+ fragAutoFocus?: boolean;
2494
+ miniMoveStep?: number;
2495
+ miniStartStep?: number;
2496
+ onMoveStart?: () => any;
2497
+ onMoveEnd?: () => any;
2498
+ endedDiff?: number;
2499
+ };
2500
+ declare class Progress extends Plugin {
2501
+ /**
2502
+ * @type IProgressConfig
2503
+ */
2504
+ static get defaultConfig(): IProgressConfig;
2505
+ static get FRAGMENT_FOCUS_CLASS(): {
2506
+ POINT: string;
2507
+ HIGHLIGHT: string;
2508
+ };
2509
+ constructor(args: any);
2510
+ /**
2511
+ * @readonly
2512
+ */
2513
+ readonly useable: boolean;
2514
+ /**
2515
+ * @readonly
2516
+ */
2517
+ readonly isProgressMoving: boolean;
2518
+ /**
2519
+ * @private
2520
+ */
2521
+ private __dragCallBacks;
2522
+ /**
2523
+ * @private
2524
+ */
2525
+ private _state;
2526
+ _disableBlur: boolean;
2527
+ get offsetDuration(): number;
2528
+ get duration(): number;
2529
+ get timeOffset(): number;
2530
+ get currentTime(): any;
2531
+ changeState(useable?: boolean): void;
2532
+ /**
2533
+ * @param {string} [value]
2534
+ * @returns
2535
+ */
2536
+ show(value?: string): void;
2537
+ /**
2538
+ * @description 创建内部进度条,并挂载到xg-outer上,
2539
+ * 并把一些对外API绑定在progress上供外部调用
2540
+ *
2541
+ */
2542
+ _initInner(fragments?: any[], config?: {}): void;
2543
+ innerList: InnerList;
2544
+ _updateInnerFocus(data: any): void;
2545
+ pos: {
2546
+ x: number;
2547
+ y: number;
2548
+ moving: boolean;
2549
+ isDown: boolean;
2550
+ isEnter: boolean;
2551
+ isLocked: boolean;
2552
+ };
2553
+ outer: HTMLElement;
2554
+ isMobile: boolean;
2555
+ progressBtn: HTMLElement;
2556
+ /**
2557
+ * This method can be overridden.
2558
+ * Eg. xgplayer-ads/ui/adProgress.js
2559
+ */
2560
+ listenEvents(): void;
2561
+ /**
2562
+ * @description 配置更新响应,插件内置调用api, 播放器整体配置更新的时候调用
2563
+ * @param {IProgressConfig} config
2564
+ */
2565
+ setConfig(config: IProgressConfig): void;
2566
+ initCustomStyle(): void;
2567
+ /**
2568
+ * 触发某一类回调监听
2569
+ * @param { string } type 类型 drag/dragend
2570
+ * @param { any} data 具体数据
2571
+ */
2572
+ triggerCallbacks(type: string, data: any, event: any): void;
2573
+ /**
2574
+ * 供外部插件添加回调
2575
+ * @param {string} type 类型 drag/dragend
2576
+ * @param {function} handle 回调函数句柄
2577
+ */
2578
+ addCallBack(type: string, handle: Function): void;
2579
+ /**
2580
+ * 供外部插件移除回调
2581
+ * @param {string} type 类型 drag/dragend
2582
+ * @param {Function} event 回调函数句柄
2583
+ */
2584
+ removeCallBack(type: string, event: Function): void;
2585
+ /**
2586
+ * @description 解除进度条的所动状态
2587
+ * @returns
2588
+ */
2589
+ unlock(): void;
2590
+ bindDomEvents(): void;
2591
+ _mouseDownHandlerHook: any;
2592
+ _mouseUpHandlerHook: any;
2593
+ _mouseMoveHandlerHook: any;
2594
+ focus(): void;
2595
+ blur(): void;
2596
+ disableBlur(): void;
2597
+ enableBlur(): void;
2598
+ onMoveOnly: (e: any, data: any) => void;
2599
+ /**
2600
+ * 避免mouseup的时候触发父辈节点的click事件,和单击视频区域切换暂停/播放互斥
2601
+ * @param {*} e
2602
+ * @returns
2603
+ */
2604
+ onBodyClick: (e: any) => void;
2605
+ _mouseDownHandler: (event: any, data: any) => void;
2606
+ _mouseUpHandler: (e: any, data: any) => void;
2607
+ _mouseMoveHandler: (e: any, data: any) => void;
2608
+ onMouseDown: (e: any) => boolean;
2609
+ onMouseUp: (e: any) => void;
2610
+ onMouseMove: (e: any) => void;
2611
+ onMouseOut: (e: any) => void;
2612
+ onMouseOver: (e: any) => void;
2613
+ onMouseEnter: (e: any) => void;
2614
+ onMouseLeave: (e: any) => void;
2615
+ onVideoResize: () => void;
2616
+ /**
2617
+ * @description 根据currenTime和占用百分比更新进度条
2618
+ * @param {number} currentTime 需要更新到的时间
2619
+ * @param {number} seekTime 实际seek的时间
2620
+ * @param {number} percent 更新时间占比
2621
+ * @param {number} type 触发类型 0-down 1-move 2-up
2622
+ */
2623
+ updateWidth(currentTime: number, seekTime: number, percent: number, type: number): void;
2624
+ computeTime(e: any, x: any): {
2625
+ percent: number;
2626
+ currentTime: number;
2627
+ seekTime: any;
2628
+ offset: number;
2629
+ width: number;
2630
+ left: number;
2631
+ e: any;
2632
+ };
2633
+ /**
2634
+ * @description 更新时间插件,在拖拽状态下要接管时间插件的更新状态
2635
+ * 本位置会和time插件交互
2636
+ * @param {number} time 根据拖拽距离计算出的时间
2637
+ */
2638
+ updateTime(time: number): void;
2639
+ /**
2640
+ * @description 复位正在拖拽状态 ,拖拽的时候要避免timeupdate更新
2641
+ */
2642
+ resetSeekState(): void;
2643
+ /**
2644
+ * @description 拖拽过程中更新UI
2645
+ * @param {number} percent 小于0的小数
2646
+ *
2647
+ */
2648
+ updatePercent(percent: number, notSeek: any): void;
2649
+ /**
2650
+ * @description 播放进度更新
2651
+ * @param { boolean } isEnded 是否是播放结束的时候调用
2652
+ * @returns
2653
+ */
2654
+ onTimeupdate(isEnded: boolean): void;
2655
+ /**
2656
+ * @description 缓存进度更新
2657
+ * @param { boolean } isEnded 是否是结束时触发
2658
+ * @returns
2659
+ */
2660
+ onCacheUpdate(isEnded: boolean): void;
2661
+ onReset(): void;
2662
+ thumbnailPlugin: any;
2663
+ render(): string;
2664
+ }
2665
+ //#endregion
2666
+ //#region node_modules/xgplayer/es/plugins/time/index.d.ts
2667
+ declare class Time extends Plugin {
2668
+ static get defaultConfig(): {
2669
+ position: string;
2670
+ index: number;
2671
+ disable: boolean;
2672
+ };
2673
+ constructor(args: any);
2674
+ isActiving: boolean;
2675
+ get duration(): number;
2676
+ get currentTime(): any;
2677
+ get timeOffset(): number;
2678
+ mode: string;
2679
+ durationDom: HTMLElement;
2680
+ timeDom: HTMLElement;
2681
+ /**
2682
+ * This method can be overridden.
2683
+ * Eg. xgplayer-ads/ui/adTime.js
2684
+ */
2685
+ listenEvents(): void;
2686
+ /**
2687
+ * @param {string} [value]
2688
+ * @returns
2689
+ */
2690
+ show(value?: string): void;
2691
+ onTimeUpdate(isEnded: any): void;
2692
+ onReset(): void;
2693
+ createCenterTime(): void;
2694
+ centerCurDom: HTMLElement;
2695
+ centerDurDom: HTMLElement;
2696
+ extraEls: HTMLElement[];
2697
+ changeLiveState(isLive: any): void;
2698
+ updateTime(time: any): void;
2699
+ minWidthTime(timeStr: any): any;
2700
+ resetActive(): void;
2701
+ render(): string;
2702
+ }
2703
+ //#endregion
2704
+ //#region node_modules/xgplayer/es/plugins/volume/index.d.ts
2705
+ type IVolumeConfig = {
2706
+ [propName: string]: any;
2707
+ position?: string;
2708
+ index?: number;
2709
+ disable?: boolean;
2710
+ showValueLabel?: boolean;
2711
+ default?: number;
2712
+ };
2713
+ /**
2714
+ * @typedef {{
2715
+ * position?: string, // [可选]插件挂载的dom
2716
+ * index?: number // [可选]插件在播放器中挂载的位置
2717
+ * disable?: boolean, // [可选]是否禁用插件交互行为
2718
+ * showValueLabel?: boolean, // [可选]是否显示当前滑动的音量数值
2719
+ * default?: number // [可选]默认
2720
+ * [propName: string]: any
2721
+ * }} IVolumeConfig
2722
+ */
2723
+ declare class Volume extends Plugin {
2724
+ /**
2725
+ * @type IVolumeConfig
2726
+ */
2727
+ static get defaultConfig(): IVolumeConfig;
2728
+ registerIcons(): {
2729
+ volumeSmall: {
2730
+ icon: any;
2731
+ class: string;
2732
+ };
2733
+ volumeLarge: {
2734
+ icon: any;
2735
+ class: string;
2736
+ };
2737
+ volumeMuted: {
2738
+ icon: any;
2739
+ class: string;
2740
+ };
2741
+ };
2742
+ _timerId: any;
2743
+ _d: {
2744
+ isStart: boolean;
2745
+ isMoving: boolean;
2746
+ isActive: boolean;
2747
+ };
2748
+ changeMutedHandler: any;
2749
+ _onMouseenterHandler: any;
2750
+ _onMouseleaveHandler: any;
2751
+ onBarMousedown: (e: any) => boolean;
2752
+ pos: {
2753
+ x: number;
2754
+ y: number;
2755
+ clientX: number;
2756
+ clientY: number;
2757
+ offsetX: number;
2758
+ offsetY: number;
2759
+ pageX: number;
2760
+ pageY: number;
2761
+ };
2762
+ onBarMouseMove: (e: any) => void;
2763
+ onBarMouseUp: (e: any) => void;
2764
+ updateVolumePos(height: any, event: any): void;
2765
+ /**
2766
+ * 修改音量数值标签
2767
+ *
2768
+ * @memberof Volume
2769
+ */
2770
+ updateVolumeValue(): void;
2771
+ /**
2772
+ * @desc 聚焦
2773
+ */
2774
+ focus(): void;
2775
+ /**
2776
+ * 失去焦点
2777
+ * @param { number } delay 延迟隐藏时长,ms
2778
+ * @param { boolean } isForce 是否立即隐藏控制栏
2779
+ * @param { Event} [e] 事件
2780
+ * @returns
2781
+ */
2782
+ unFocus(delay?: number, isForce?: boolean, e?: Event): void;
2783
+ onMouseenter: (e: any) => void;
2784
+ onMouseleave: (e: any) => void;
2785
+ changeMuted(e: any): void;
2786
+ onVolumeChange: (e: any) => void;
2787
+ animate(muted: any, volume: any): void;
2788
+ initIcons(): void;
2789
+ render(): string;
2790
+ }
2791
+ //#endregion
2792
+ //#region node_modules/xgplayer/es/plugins/logger/index.d.ts
2793
+ declare class XGLogger extends Plugin {
2794
+ static get defaultConfig(): {
2795
+ waitTimeout: number;
2796
+ };
2797
+ _waitType: string | number;
2798
+ newPointTime: number;
2799
+ loadedCostTime: number;
2800
+ startCostTime: number;
2801
+ pt: number;
2802
+ vt: number;
2803
+ fvt: number;
2804
+ _initOnceEvents(): void;
2805
+ _sendFF(endType: any): void;
2806
+ s: number;
2807
+ _onTimeupdate: () => void;
2808
+ _onAutoplayStart: () => void;
2809
+ _onReset: () => void;
2810
+ _state: {
2811
+ autoplayStart: boolean;
2812
+ isFFLoading: boolean;
2813
+ isTimeUpdate: boolean;
2814
+ isFFSend: boolean;
2815
+ isLs: boolean;
2816
+ };
2817
+ _isSeeking: boolean;
2818
+ seekingStart: number;
2819
+ waitingStart: number;
2820
+ fixedWaitingStart: number;
2821
+ _isWaiting: boolean;
2822
+ _waitTimer: any;
2823
+ _waittTimer: any;
2824
+ _onSeeking: () => void;
2825
+ _onSeeked: () => void;
2826
+ _onWaitingLoadStart: () => void;
2827
+ _onWaiting: () => void;
2828
+ _onError: () => void;
2829
+ _startWaitTimeout(): void;
2830
+ _onPlaying: () => void;
2831
+ endState(endType: any): void;
2832
+ suspendSeekingStatus(endType: any): void;
2833
+ suspendWaitingStatus(endType: any): void;
2834
+ emitLog(eventType: any, data: any): void;
2835
+ }
2836
+ //#endregion
2837
+ //#region node_modules/xgplayer/es/plugins/replay/index.d.ts
2838
+ declare class Replay extends Plugin {
2839
+ static get defaultConfig(): {
2840
+ disable: boolean;
2841
+ };
2842
+ registerIcons(): {
2843
+ replay: any;
2844
+ };
2845
+ __handleReplay: any;
2846
+ handleReplay(e: any): void;
2847
+ /**
2848
+ * @param {string} [value]
2849
+ * @returns
2850
+ */
2851
+ show(value?: string): void;
2852
+ render(): string;
2853
+ }
2854
+ //#endregion
2855
+ //#region node_modules/xgplayer/es/plugins/poster/index.d.ts
2856
+ type IPosterConfig = {
2857
+ isEndedShow?: boolean;
2858
+ hideCanplay?: boolean;
2859
+ poster?: string;
2860
+ };
2861
+ /**
2862
+ * @typedef {{
2863
+ * isEndedShow?: boolean, // 是否在播放结束之后显示
2864
+ * hideCanplay?: boolean, // 设置为true时,播放后才隐藏,在视频地址更新后会重新显示poster。默认为false,即在play事件触发后隐藏poster
2865
+ * poster?: string // 封面图地址
2866
+ * }} IPosterConfig
2867
+ */
2868
+ declare class Poster extends Plugin {
2869
+ /**
2870
+ * @type IPosterConfig
2871
+ */
2872
+ static get defaultConfig(): IPosterConfig;
2873
+ set isEndedShow(arg: any);
2874
+ get isEndedShow(): any;
2875
+ /**
2876
+ * @param {string} [value]
2877
+ * @returns
2878
+ */
2879
+ show(value?: string): void;
2880
+ beforeCreate(args: any): void;
2881
+ setConfig(config: any): void;
2882
+ onTimeUpdate(): void;
2883
+ update(poster: any): void;
2884
+ getBgSize(mode: any): string;
2885
+ render(): string;
2886
+ }
2887
+ //#endregion
2888
+ //#region node_modules/xgplayer/es/plugins/start/index.d.ts
2889
+ type IStartConfig = {
2890
+ [propName: string]: any;
2891
+ isShowPause?: boolean;
2892
+ isShowEnd?: boolean;
2893
+ disableAnimate?: boolean;
2894
+ mode?: 'hide' | 'show' | 'auto';
2895
+ };
2896
+ declare class Start extends Plugin {
2897
+ /**
2898
+ * @type IStartConfig
2899
+ */
2900
+ static get defaultConfig(): IStartConfig;
2901
+ constructor(args: any);
2902
+ autoPlayStart: boolean;
2903
+ /**
2904
+ * @public
2905
+ * This method can be overridden.
2906
+ */
2907
+ public listenEvents(): void;
2908
+ /**
2909
+ * @public
2910
+ */
2911
+ public bindClickEvents(): void;
2912
+ clickHandler: any;
2913
+ onPlayerReset: () => void;
2914
+ onAutoplayStart: () => void;
2915
+ registerIcons(): {
2916
+ startPlay: {
2917
+ icon: any;
2918
+ class: string;
2919
+ };
2920
+ startPause: {
2921
+ icon: any;
2922
+ class: string;
2923
+ };
2924
+ };
2925
+ initIcons(): void;
2926
+ /**
2927
+ * @param {string} [value]
2928
+ * @returns
2929
+ */
2930
+ show(value?: string): void;
2931
+ focusHide(): void;
2932
+ recover(): void;
2933
+ switchStatus(isAnimate: any): void;
2934
+ animate(endShow: any): void;
2935
+ _animateId: any;
2936
+ endAnimate(): void;
2937
+ /**
2938
+ * @public
2939
+ */
2940
+ public switchPausePlay(e: any): void;
2941
+ /**
2942
+ * @deprecated
2943
+ */
2944
+ onPlayPause(status: any): void;
2945
+ /**
2946
+ * @param {'play'|'pause'} status
2947
+ */
2948
+ toggleTo(status: 'play' | 'pause'): void;
2949
+ render(): string;
2950
+ }
2951
+ //#endregion
2952
+ //#region node_modules/xgplayer/es/plugins/enter/index.d.ts
2953
+ type IEnterConfig = {
2954
+ [propName: string]: any;
2955
+ innerHtml?: string;
2956
+ };
2957
+ /**
2958
+ * @typedef { {
2959
+ * innerHtml?: string,
2960
+ * [propName: string]: any
2961
+ * } } IEnterConfig
2962
+ */
2963
+ declare class Enter extends Plugin {
2964
+ /**
2965
+ * @type IEnterConfig
2966
+ */
2967
+ static get defaultConfig(): IEnterConfig;
2968
+ render(): HTMLElement;
2969
+ }
2970
+ //#endregion
2971
+ //#region node_modules/xgplayer/es/utils/draggabilly.d.ts
2972
+ declare class Draggabilly {
2973
+ constructor(root: any, options?: {});
2974
+ isEnabled: boolean;
2975
+ isDragging: boolean;
2976
+ isDown: boolean;
2977
+ position: {};
2978
+ downPoint: {};
2979
+ dragPoint: {
2980
+ x: number;
2981
+ y: number;
2982
+ };
2983
+ startPos: {
2984
+ x: number;
2985
+ y: number;
2986
+ };
2987
+ _root: any;
2988
+ _handlerDom: any;
2989
+ _bindStartEvent(): void;
2990
+ _startKey: string;
2991
+ _unbindStartEvent(): void;
2992
+ _bindPostStartEvents(event: any): void;
2993
+ _boundPointerEvents: any;
2994
+ _unbindPostStartEvents(): void;
2995
+ enable(): void;
2996
+ disable(): void;
2997
+ onDocUp(e: any): void;
2998
+ animate(): void;
2999
+ positionDrag(): void;
3000
+ setLeftTop(): void;
3001
+ onmousedown(e: any): void;
3002
+ onmousemove(e: any): void;
3003
+ onmouseup(e: any): void;
3004
+ ontouchstart(e: any): void;
3005
+ touchIdentifier: any;
3006
+ ontouchmove(e: any): void;
3007
+ ontouchend(e: any): void;
3008
+ ontouchcancel(e: any): void;
3009
+ dragStart(e: any, pointer: any): void;
3010
+ dragRealStart(e: any, pointer: any): void;
3011
+ dragEnd(e: any, pointer: any): void;
3012
+ _dragPointerMove(e: any, pointer: any): {
3013
+ x: number;
3014
+ y: number;
3015
+ };
3016
+ dragMove(e: any, pointer: any): void;
3017
+ dragCancel(e: any, pointer: any): void;
3018
+ presetInfo(): void;
3019
+ destroy(): void;
3020
+ hasDragStarted(moveVector: any): boolean;
3021
+ checkContain(axis: any, drag: any, grid: any): any;
3022
+ _getPosition(): void;
3023
+ _addTransformPosition(style: any): void;
3024
+ _getPositionCoord(styleSide: any, measure: any): number;
3025
+ }
3026
+ //#endregion
3027
+ //#region node_modules/xgplayer/es/plugins/miniScreen/index.d.ts
3028
+ type IMiniScreenConfig = {
3029
+ [propName: string]: any;
3030
+ index?: number;
3031
+ disable?: boolean;
3032
+ width?: number;
3033
+ height?: number;
3034
+ left?: number;
3035
+ top?: number;
3036
+ isShowIcon?: boolean;
3037
+ isScrollSwitch?: boolean;
3038
+ scrollTop?: number;
3039
+ disableDrag?: boolean;
3040
+ };
3041
+ /**
3042
+ * @typedef {{
3043
+ * index?: number,
3044
+ * disable?: boolean,
3045
+ * width?: number,
3046
+ * height?: number,
3047
+ * left?: number, // 默认左下角
3048
+ * top?: number, // 默认左下角
3049
+ * isShowIcon?: boolean, // 是否显示icon
3050
+ * isScrollSwitch?: boolean, // 滚动自动切换自动切换
3051
+ * scrollTop?: number, // 触发滚动的高度
3052
+ * disableDrag?: boolean, // 禁用拖拽
3053
+ * [propName: string]: any
3054
+ * }} IMiniScreenConfig
3055
+ */
3056
+ declare class MiniScreen extends Plugin {
3057
+ /**
3058
+ * @type IMiniScreenConfig
3059
+ */
3060
+ static get defaultConfig(): IMiniScreenConfig;
3061
+ constructor(args: any);
3062
+ isMini: boolean;
3063
+ isClose: boolean;
3064
+ pos: {
3065
+ left: any;
3066
+ top: any;
3067
+ height: any;
3068
+ width: any;
3069
+ scrollY: number;
3070
+ };
3071
+ lastStyle: {};
3072
+ beforeCreate(args: any): void;
3073
+ _draggabilly: Draggabilly;
3074
+ registerIcons(): {
3075
+ play: {
3076
+ icon: any;
3077
+ class: string;
3078
+ };
3079
+ pause: {
3080
+ icon: any;
3081
+ class: string;
3082
+ };
3083
+ };
3084
+ initIcons(): void;
3085
+ onCancelClick: (e: any) => void;
3086
+ onCenterClick: (e: any) => void;
3087
+ onScroll: (e: any) => void;
3088
+ getMini(): void;
3089
+ exitMini(): boolean;
3090
+ updatePos(pos: any): void;
3091
+ render(): string;
3092
+ }
3093
+ //#endregion
3094
+ //#region node_modules/xgplayer/es/plugins/loading/index.d.ts
3095
+ declare class Loading extends Plugin {
3096
+ static get defaultConfig(): {
3097
+ position: string;
3098
+ };
3099
+ registerIcons(): {
3100
+ loadingIcon: any;
3101
+ };
3102
+ render(): string;
3103
+ }
3104
+ //#endregion
3105
+ //#region node_modules/xgplayer/es/plugins/rotate/index.d.ts
3106
+ declare class Rotate extends Icon {
3107
+ static get defaultConfig(): {
3108
+ position: string;
3109
+ index: number;
3110
+ innerRotate: boolean;
3111
+ clockwise: boolean;
3112
+ rotateDeg: number;
3113
+ disable: boolean;
3114
+ };
3115
+ constructor(args: any);
3116
+ rotateDeg: any;
3117
+ onBtnClick(e: any): void;
3118
+ rootWidth: string | number;
3119
+ rootHeight: string | number;
3120
+ updateRotateDeg(rotateDeg: any, innerRotate: any): void;
3121
+ rotate(clockwise?: boolean, innerRotate?: boolean, times?: number): void;
3122
+ registerIcons(): {
3123
+ rotate: any;
3124
+ };
3125
+ render(): string;
3126
+ }
3127
+ //#endregion
3128
+ //#region node_modules/xgplayer/es/plugins/pip/index.d.ts
3129
+ declare class PIP extends Icon {
3130
+ static get defaultConfig(): {
3131
+ position: string;
3132
+ index: number;
3133
+ showIcon: boolean;
3134
+ preferDocument: boolean;
3135
+ width: any;
3136
+ height: any;
3137
+ docPiPNode: any;
3138
+ docPiPStyle: any;
3139
+ };
3140
+ static checkWebkitSetPresentationMode(video: any): boolean;
3141
+ beforeCreate(args: any): void;
3142
+ pMode: any;
3143
+ registerIcons(): {
3144
+ pipIcon: {
3145
+ icon: any;
3146
+ class: string;
3147
+ };
3148
+ pipIconExit: {
3149
+ icon: any;
3150
+ class: string;
3151
+ };
3152
+ };
3153
+ initIcons(): void;
3154
+ initPipEvents(): void;
3155
+ leavePIPCallback: () => void;
3156
+ pipWindow: any;
3157
+ enterPIPCallback: (e: any) => void;
3158
+ onWebkitpresentationmodechanged: (e: any) => void;
3159
+ switchPIP: (e: any) => boolean;
3160
+ copyStyleIntoPiPWindow(pipWin: any): void;
3161
+ requestPIP(): boolean;
3162
+ /**
3163
+ * 退出画中画
3164
+ */
3165
+ exitPIP(): boolean;
3166
+ /**
3167
+ * 处于画中画状态
3168
+ */
3169
+ get isPip(): boolean;
3170
+ isPIPAvailable(): boolean;
3171
+ isDocPIPAvailable(): boolean;
3172
+ render(): string;
3173
+ }
3174
+ //#endregion
3175
+ //#region node_modules/xgplayer/es/plugins/playNext/index.d.ts
3176
+ declare class PlayNextIcon extends Plugin {
3177
+ static get defaultConfig(): {
3178
+ position: string;
3179
+ index: number;
3180
+ url: any;
3181
+ urlList: any[];
3182
+ };
3183
+ constructor(options: any);
3184
+ idx: number;
3185
+ registerIcons(): {
3186
+ playNext: any;
3187
+ };
3188
+ initEvents(): void;
3189
+ nextHandler: any;
3190
+ playNext: (e: any) => void;
3191
+ changeSrc(url: any): void;
3192
+ render(): string;
3193
+ }
3194
+ //#endregion
3195
+ //#region node_modules/xgplayer/es/plugins/download/index.d.ts
3196
+ /**
3197
+ * @typedef { {
3198
+ * position: string,
3199
+ * index: number,
3200
+ * disable: boolean,
3201
+ * [propName: string]: any
3202
+ * } } IDownloadConfig
3203
+ */
3204
+ declare class Download extends Icon {
3205
+ /**
3206
+ * @type IDownloadConfig
3207
+ */
3208
+ static get defaultConfig(): IDownloadConfig;
3209
+ constructor(args: any);
3210
+ timer: any;
3211
+ isLock: boolean;
3212
+ _handler: any;
3213
+ registerIcons(): {
3214
+ download: any;
3215
+ };
3216
+ download: (e: any) => void;
3217
+ getAbsoluteURL(url: any): any;
3218
+ render(): string;
3219
+ }
3220
+ type IDownloadConfig = {
3221
+ [propName: string]: any;
3222
+ position: string;
3223
+ index: number;
3224
+ disable: boolean;
3225
+ };
3226
+ //#endregion
3227
+ //#region node_modules/xgplayer/es/plugins/screenShot/index.d.ts
3228
+ declare class ScreenShot extends Icon {
3229
+ static get defaultConfig(): {
3230
+ position: string;
3231
+ index: number;
3232
+ quality: number;
3233
+ type: string;
3234
+ format: string;
3235
+ width: number;
3236
+ height: number;
3237
+ saveImg: boolean;
3238
+ fitVideo: boolean;
3239
+ disable: boolean;
3240
+ name: string;
3241
+ };
3242
+ beforeCreate(args: any): void;
3243
+ initSize: (data: any) => void;
3244
+ onClickBtn(e: any): void;
3245
+ saveScreenShot(data: any, filename: any): void;
3246
+ createCanvas(width: any, height: any): void;
3247
+ canvasCtx: CanvasRenderingContext2D;
3248
+ canvas: HTMLCanvasElement;
3249
+ shot(width: any, height: any, option?: {
3250
+ quality: number;
3251
+ type: string;
3252
+ }): Promise<any>;
3253
+ registerIcons(): {
3254
+ screenshotIcon: any;
3255
+ };
3256
+ render(): string;
3257
+ }
3258
+ //#endregion
3259
+ //#region node_modules/xgplayer/es/plugins/common/optionList.d.ts
3260
+ declare class OptionList {
3261
+ constructor(args: any);
3262
+ config: any;
3263
+ parent: any;
3264
+ root: HTMLElement;
3265
+ onItemClick(e: any): boolean;
3266
+ _delegates: any;
3267
+ renderItemList(data: any): void;
3268
+ attrKeys: string[];
3269
+ getAttrObj(dom: any, keys: any): {};
3270
+ show(): void;
3271
+ hide(): void;
3272
+ setStyle(style: any): void;
3273
+ destroy(): void;
3274
+ }
3275
+ //#endregion
3276
+ //#region node_modules/xgplayer/es/plugins/common/optionsIcon.d.ts
3277
+ declare class OptionsIcon extends Plugin {
3278
+ /**
3279
+ * @type { IOptionsIconConfig }
3280
+ */
3281
+ static get defaultConfig(): IOptionsIconConfig;
3282
+ constructor(args: any);
3283
+ isIcons: boolean;
3284
+ isActive: boolean;
3285
+ curValue: any;
3286
+ curIndex: number;
3287
+ activeEvent: string;
3288
+ initIcons(): void;
3289
+ /**
3290
+ * @param {string} [value]
3291
+ * @returns
3292
+ */
3293
+ show(value?: string): void;
3294
+ getTextByLang(item: any, key: any, lang: any): any;
3295
+ onEnter: (e: any) => void;
3296
+ switchActiveState: (e: any) => void;
3297
+ onLeave: (e: any) => void;
3298
+ onListEnter: (e: any) => void;
3299
+ enterType: number;
3300
+ onListLeave: (e: any) => void;
3301
+ toggle(isActive: any): void;
3302
+ onItemClick(e: any, data: any): void;
3303
+ curItem: any;
3304
+ onIconClick(e: any): void;
3305
+ changeCurrentText(): void;
3306
+ renderItemList(itemList: any, curIndex: any): void;
3307
+ optionsList: OptionList;
3308
+ _resizeList(): void;
3309
+ render(): string;
3310
+ }
3311
+ type IOptionsIconConfig = {
3312
+ [propName: string]: any;
3313
+ isShow?: boolean;
3314
+ index?: number;
3315
+ list?: Array<any>;
3316
+ listType?: string;
3317
+ hidePortrait?: boolean;
3318
+ };
3319
+ //#endregion
3320
+ //#region node_modules/xgplayer/es/plugins/definition/index.d.ts
3321
+ /**
3322
+ * @typedef {import('../../defaultConfig').IDefinition} IDefinition
3323
+ */
3324
+ /**
3325
+ * @typedef {{
3326
+ * position?: string,
3327
+ * index?: number,
3328
+ * list?: Array<IDefinition>,
3329
+ * defaultDefinition?: any,
3330
+ * disable?: any,
3331
+ * hidePortrait?: boolean,
3332
+ * className?: string
3333
+ * }} IDefinitionConfig
3334
+ */
3335
+ declare class DefinitionIcon extends OptionsIcon {
3336
+ /**
3337
+ * @type IDefinitionConfig
3338
+ */
3339
+ static get defaultConfig(): IDefinitionConfig;
3340
+ beforeCreate(args: any): void;
3341
+ curTime: number;
3342
+ isPaused: boolean;
3343
+ initDefinition(): void;
3344
+ changeDefinitionList(list: any): void;
3345
+ changeDefinition(to: any, from: any): void;
3346
+ onItemClick(e: any, data: any, ...args: any[]): void;
3347
+ }
3348
+ type IDefinition$1 = IDefinition$3;
3349
+ type IDefinitionConfig = {
3350
+ position?: string;
3351
+ index?: number;
3352
+ list?: Array<IDefinition$1>;
3353
+ defaultDefinition?: any;
3354
+ disable?: any;
3355
+ hidePortrait?: boolean;
3356
+ className?: string;
3357
+ };
3358
+ //#endregion
3359
+ //#region node_modules/xgplayer/es/plugins/playbackRate/index.d.ts
3360
+ /**
3361
+ * @typedef {{
3362
+ * position?: string,
3363
+ * index?: number,
3364
+ * list?: Array<number | { [propName: string]: any }>,
3365
+ * className?: string,
3366
+ * hidePortrait?: boolean,
3367
+ * [propName: string]: any
3368
+ * }} IPlaybackRateConfig
3369
+ */
3370
+ declare class PlaybackRate$1 extends OptionsIcon {
3371
+ /**
3372
+ * @type IPlaybackRateConfig
3373
+ */
3374
+ static get defaultConfig(): IPlaybackRateConfig;
3375
+ curRate: number;
3376
+ beforeCreate(args: any): void;
3377
+ onItemClick(e: any, _data: any): boolean;
3378
+ renderItemList(): void;
3379
+ }
3380
+ type IPlaybackRateConfig = {
3381
+ [propName: string]: any;
3382
+ position?: string;
3383
+ index?: number;
3384
+ list?: (number | {
3385
+ [propName: string]: any;
3386
+ })[];
3387
+ className?: string;
3388
+ hidePortrait?: boolean;
3389
+ };
3390
+ //#endregion
3391
+ //#region node_modules/xgplayer/es/plugins/error/index.d.ts
3392
+ declare class ErrorPlugin extends Plugin {
3393
+ clickHandler: any;
3394
+ onError: any;
3395
+ errorRetry(e: any): void;
3396
+ handleError(error?: {}): void;
3397
+ render(): string;
3398
+ }
3399
+ //#endregion
3400
+ //#region node_modules/xgplayer/es/plugins/prompt/index.d.ts
3401
+ /**
3402
+ * 消息组件
3403
+ */
3404
+ declare class Prompt extends Plugin {
3405
+ static get defaultConfig(): {
3406
+ interval: number;
3407
+ style: {};
3408
+ mode: string;
3409
+ autoHide: boolean;
3410
+ detail: {
3411
+ text: string;
3412
+ highlight: string;
3413
+ };
3414
+ onClick: () => void;
3415
+ };
3416
+ /**
3417
+ * @type {number}
3418
+ */
3419
+ intervalId: number;
3420
+ customConfig: any;
3421
+ setStyle(style: any): void;
3422
+ showPrompt(detail: any, config?: {}, onClick?: () => void): void;
3423
+ customOnClick: () => void;
3424
+ render(): string;
3425
+ }
3426
+ //#endregion
3427
+ //#region node_modules/xgplayer/es/plugins/progressPreview/index.d.ts
3428
+ /** */
3429
+ declare class ProgressPreview extends Plugin {
3430
+ /**
3431
+ * @type IProgressPreviewConfig
3432
+ */
3433
+ static get defaultConfig(): IProgressPreviewConfig;
3434
+ constructor(args: any);
3435
+ _ispots: any[];
3436
+ videoPreview: HTMLElement;
3437
+ videothumbnail: any;
3438
+ thumbnail: any;
3439
+ timeStr: string;
3440
+ _state: {
3441
+ now: number;
3442
+ f: boolean;
3443
+ };
3444
+ beforeCreate(args: any): void;
3445
+ _curDot: any;
3446
+ handlerSpotClick: any;
3447
+ transformTimeHook: any;
3448
+ extTextRoot: HTMLElement;
3449
+ setConfig(config: any): void;
3450
+ previewLine: HTMLElement;
3451
+ timePoint: HTMLElement;
3452
+ timeText: HTMLElement;
3453
+ tipText: HTMLElement;
3454
+ _hasThumnail: boolean;
3455
+ bindEvents(): void;
3456
+ handlerPreviewClick: (e: any) => void;
3457
+ onMousemove: (e: any) => void;
3458
+ onMousedown: (e: any) => void;
3459
+ onMouseup: (e: any) => void;
3460
+ onDotMouseLeave: (e: any) => void;
3461
+ onProgressMouseOver: (data: any, e: any) => void;
3462
+ onProgressMove(data: any, e: any): void;
3463
+ onProgressDragStart(data: any): void;
3464
+ isDrag: boolean;
3465
+ onProgressDragEnd(data: any): void;
3466
+ onProgressClick(data: any, e: any): void;
3467
+ updateLinePos(offset: any, cwidth: any): void;
3468
+ updateTimeText(timeStr: any): void;
3469
+ updatePosition(offset: any, cwidth: any, time: any, e: any): void;
3470
+ /**
3471
+ * @description 设置自定义时间显示字符串
3472
+ * @param {string} str
3473
+ */
3474
+ setTimeContent(str: string): void;
3475
+ updateThumbnails(time: any): void;
3476
+ registerThumbnail(thumbnailConfig?: {}): void;
3477
+ calcuPosition(time: any, duration: any): {
3478
+ left: number;
3479
+ width: number;
3480
+ isMini: boolean;
3481
+ };
3482
+ showDot(id: any): void;
3483
+ focusDot(target: any, id: any): void;
3484
+ _activeDotId: any;
3485
+ blurDot(target: any): void;
3486
+ showTips(text: any, isDefault: any, timeStr?: string): void;
3487
+ hideTips(): void;
3488
+ /**
3489
+ * @param {string} [value]
3490
+ * @returns
3491
+ */
3492
+ show(value?: string): void;
3493
+ render(): string;
3494
+ }
3495
+ type IProgressPreviewConfig = {
3496
+ [propName: string]: any;
3497
+ miniWidth?: number;
3498
+ ispots?: {
3499
+ time?: number;
3500
+ text?: string;
3501
+ id?: number | string;
3502
+ duration: number | null;
3503
+ color?: string;
3504
+ style?: {
3505
+ [propName: string]: any;
3506
+ };
3507
+ width?: number;
3508
+ height?: number;
3509
+ }[];
3510
+ defaultText?: '';
3511
+ isFocusDots?: true;
3512
+ isShowThumbnail?: true;
3513
+ isShowCoverPreview?: false;
3514
+ mode?: 'short' | 'production';
3515
+ };
3516
+ //#endregion
3517
+ //#region node_modules/xgplayer/es/plugins/common/thumbnail.d.ts
3518
+ /**
3519
+ * @typedef {{
3520
+ * isShow?: boolean,
3521
+ * urls?: Array<string>, // 有多张大图就多个url
3522
+ * pic_num?: number, // 每张图含有几个雪碧图
3523
+ * col?: number, // 截图列数
3524
+ * row?: number, // 截图行数
3525
+ * height?: number, // 缩略图高度
3526
+ * width?: number, // 缩略图宽度
3527
+ * scale?: number, // 缩放
3528
+ * className?: string, // 额外添加在dom上的class
3529
+ * hidePortrait?: boolean, // 是否在竖屏的时候隐藏
3530
+ * [propName: string]: any
3531
+ * }} IThumbnailConfig
3532
+ */
3533
+ declare class Thumbnail extends Plugin {
3534
+ /**
3535
+ * @type IThumbnailConfig
3536
+ */
3537
+ static get defaultConfig(): IThumbnailConfig;
3538
+ constructor(args: any);
3539
+ ratio: number;
3540
+ interval: any;
3541
+ _preloadMark: {};
3542
+ setConfig(config: any): void;
3543
+ get usable(): boolean;
3544
+ initThumbnail(): void;
3545
+ getUrlByIndex(index: any): any;
3546
+ preload(index: any): void;
3547
+ getPosition(now: any, containerWidth?: number, containerHeight?: number): {
3548
+ urlIndex: number;
3549
+ rowIndex: number;
3550
+ colIndex: number;
3551
+ url: any;
3552
+ height: number;
3553
+ width: number;
3554
+ style: {
3555
+ backgroundImage: string;
3556
+ backgroundSize: string;
3557
+ backgroundPosition: string;
3558
+ width: string;
3559
+ height: string;
3560
+ };
3561
+ };
3562
+ update(dom: any, now: any, containerWidth?: number, containerHeight?: number, customStyle?: string): void;
3563
+ changeConfig(newConfig?: {}): void;
3564
+ createThumbnail(root: any, className: any): HTMLElement;
3565
+ }
3566
+ type IThumbnailConfig = {
3567
+ [propName: string]: any;
3568
+ isShow?: boolean;
3569
+ urls?: Array<string>;
3570
+ pic_num?: number;
3571
+ col?: number;
3572
+ row?: number;
3573
+ height?: number;
3574
+ width?: number;
3575
+ scale?: number;
3576
+ className?: string;
3577
+ hidePortrait?: boolean;
3578
+ };
3579
+ //#endregion
3580
+ //#region node_modules/xgplayer/es/plugins/progress/miniProgress.d.ts
3581
+ declare class MiniProgress extends Plugin {
3582
+ static get defaultConfig(): {
3583
+ mode: string;
3584
+ height: number;
3585
+ };
3586
+ get offsetDuration(): number;
3587
+ get currentTime(): any;
3588
+ onTimeupdate: () => void;
3589
+ reset(): void;
3590
+ update(data: {
3591
+ cached: number;
3592
+ played: number;
3593
+ }, duration: any): void;
3594
+ render(): string;
3595
+ }
3596
+ //#endregion
3597
+ //#region node_modules/xgplayer/es/plugins/stats/index.d.ts
3598
+ declare class Stats extends BasePlugin {
3599
+ static get defaultConfig(): {};
3600
+ _recordUserActions: (actionData: any) => void;
3601
+ _getTime(): {
3602
+ timestamp: number;
3603
+ timeFormat: string;
3604
+ };
3605
+ _onReset: () => void;
3606
+ _recordInfo: (data: any) => void;
3607
+ _downloadStats: () => void;
3608
+ downloadStats(): void;
3609
+ /**
3610
+ * @params type
3611
+ */
3612
+ info(data: any): void;
3613
+ _info(data: any): void;
3614
+ _infoProfile(data: any): void;
3615
+ reset(): void;
3616
+ _stats: {
3617
+ info: any[];
3618
+ media: {};
3619
+ };
3620
+ getStats(): {
3621
+ raw: {
3622
+ info: any[];
3623
+ media: {};
3624
+ };
3625
+ timestat: string[];
3626
+ profile: {
3627
+ traceEvents: any[];
3628
+ };
3629
+ };
3630
+ _getTimeStats(): string[];
3631
+ _getProfile(): {
3632
+ traceEvents: any[];
3633
+ };
3634
+ }
3635
+ //#endregion
3636
+ //#region node_modules/xgplayer/es/plugins/gapJump/index.d.ts
3637
+ declare class GapJump extends Plugin {
3638
+ static get defaultConfig(): {
3639
+ useGapJump: boolean;
3640
+ smallGapLimit: number;
3641
+ gapDetectionThreshold: number;
3642
+ };
3643
+ hasPlayed: boolean;
3644
+ seekingEventReceived: boolean;
3645
+ isSafari: boolean;
3646
+ onGapJump: () => void;
3647
+ _getIndex(buffered: any, time: any, threshold: any): number;
3648
+ _getBuffered(b: any): {
3649
+ start: any;
3650
+ end: any;
3651
+ }[];
3652
+ }
3653
+ declare namespace GapJump {
3654
+ const BROWSER_GAP_TOLERANCE: number;
3655
+ }
3656
+ //#endregion
3657
+ //#region node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.d.ts
3658
+ declare class WaitingTimeoutJump extends Plugin {
3659
+ static get defaultConfig(): {
3660
+ useWaitingTimeoutJump: boolean;
3661
+ waitingTime: number;
3662
+ jumpSize: number;
3663
+ jumpCntMax: number;
3664
+ };
3665
+ hasPlayed: boolean;
3666
+ jumpCnt: number;
3667
+ /**
3668
+ * @type {null | number}
3669
+ */
3670
+ timer: null | number;
3671
+ jumpSize: any;
3672
+ onWaiting: () => void;
3673
+ onJump: () => void;
3674
+ }
3675
+ //#endregion
3676
+ //#region node_modules/xgplayer/es/plugins/time/timesegments.d.ts
3677
+ /**
3678
+ * 进行事件分段控制
3679
+ */
3680
+ declare class TimeSegmentsControls extends BasePlugin {
3681
+ static get defaultConfig(): {
3682
+ disable: boolean;
3683
+ segments: any[];
3684
+ };
3685
+ curIndex: any;
3686
+ curPos: any;
3687
+ lastCurrentTime: any;
3688
+ setConfig(newConfig: any): void;
3689
+ updateSegments(): void;
3690
+ formatTimeSegments(timeSegments: any, duration: any): any[];
3691
+ _onDurationChange: () => void;
3692
+ _onLoadedData: () => void;
3693
+ _onTimeupdate: () => void;
3694
+ _onSeeking: () => void;
3695
+ _onPlay: () => void;
3696
+ getSeekTime(currentTime: any, lastCurrentTime: any, index: any, timeSegments: any): number;
3697
+ _checkIfEnabled(segments: any): boolean;
3698
+ changeIndex(index: any, timeSegments: any): void;
3699
+ }
3700
+ //#endregion
3701
+ //#region node_modules/xgplayer/es/presets/default.d.ts
3702
+ declare class DefaultPreset {
3703
+ constructor(options: any, playerConfig: any);
3704
+ plugins: (typeof Fullscreen | typeof Play | typeof Progress | typeof Time | typeof Volume | typeof XGLogger | typeof Replay | typeof Poster | typeof Start | typeof Enter | typeof MiniScreen | typeof Loading | typeof TimeSegmentsControls | typeof Rotate | typeof PIP | typeof PlayNextIcon | typeof Download | typeof ScreenShot | typeof DefinitionIcon | typeof PlaybackRate$1 | typeof ErrorPlugin | typeof Prompt | typeof ProgressPreview | typeof Thumbnail | typeof MiniProgress | typeof Stats | typeof GapJump | typeof WaitingTimeoutJump)[];
3705
+ ignores: any[];
3706
+ i18n: any[];
3707
+ }
3708
+ //#endregion
3709
+ //#region node_modules/xgplayer/es/plugins/cssFullScreen/index.d.ts
3710
+ /**
3711
+ * @typedef { {
3712
+ * position: string,
3713
+ * index: number,
3714
+ * disable: boolean,
3715
+ * target: null | HTMLElement,
3716
+ * [propName: string]: any
3717
+ * } } ICssConfig
3718
+ */
3719
+ declare class CssFullScreen extends Icon {
3720
+ /**
3721
+ * @type ICssConfig
3722
+ */
3723
+ static get defaultConfig(): ICssConfig;
3724
+ beforeCreate(args: any): void;
3725
+ btnClick(e: any): void;
3726
+ handleCssFullscreen: any;
3727
+ initIcons(): void;
3728
+ animate(isFullScreen: any): void;
3729
+ switchTips(isFullScreen: any): void;
3730
+ registerIcons(): {
3731
+ cssFullscreen: {
3732
+ icon: any;
3733
+ class: string;
3734
+ };
3735
+ exitCssFullscreen: {
3736
+ icon: any;
3737
+ class: string;
3738
+ };
3739
+ };
3740
+ render(): string;
3741
+ }
3742
+ type ICssConfig = {
3743
+ [propName: string]: any;
3744
+ position: string;
3745
+ index: number;
3746
+ disable: boolean;
3747
+ target: null | HTMLElement;
3748
+ };
3749
+ //#endregion
3750
+ //#region node_modules/xgplayer/es/index.umd.d.ts
3751
+ declare class PresetPlayer extends Player {
3752
+ static defaultPreset: typeof DefaultPreset;
3753
+ static Util: typeof util;
3754
+ static Sniffer: ISniffer;
3755
+ static Errors: typeof Errors;
3756
+ static Events: typeof events_d_exports;
3757
+ static Plugin: typeof Plugin;
3758
+ static BasePlugin: typeof BasePlugin;
3759
+ static I18N: {
3760
+ readonly textKeys: any[];
3761
+ readonly langKeys: string[];
3762
+ readonly lang: {
3763
+ [propName: string]: {
3764
+ [propName: string]: string;
3765
+ };
3766
+ };
3767
+ extend: (I18nText: IXGI18nText) => {};
3768
+ use: (lang: IXGI18nText) => {};
3769
+ init: (id: any) => IXGI18n;
3770
+ };
3771
+ static STATE_CLASS: {
3772
+ DEFAULT: string;
3773
+ DEFAULT_SKIN: string;
3774
+ ENTER: string;
3775
+ PAUSED: string;
3776
+ PLAYING: string;
3777
+ ENDED: string;
3778
+ CANPLAY: string;
3779
+ LOADING: string;
3780
+ ERROR: string;
3781
+ REPLAY: string;
3782
+ NO_START: string;
3783
+ ACTIVE: string;
3784
+ INACTIVE: string;
3785
+ FULLSCREEN: string;
3786
+ CSS_FULLSCREEN: string;
3787
+ ROTATE_FULLSCREEN: string;
3788
+ PARENT_ROTATE_FULLSCREEN: string;
3789
+ PARENT_FULLSCREEN: string;
3790
+ INNER_FULLSCREEN: string;
3791
+ NO_CONTROLS: string;
3792
+ FLEX_CONTROLS: string;
3793
+ CONTROLS_FOLLOW: string;
3794
+ CONTROLS_AUTOHIDE: string;
3795
+ TOP_BAR_AUTOHIDE: string;
3796
+ NOT_ALLOW_AUTOPLAY: string;
3797
+ SEEKING: string;
3798
+ PC: string;
3799
+ MOBILE: string;
3800
+ MINI: string;
3801
+ };
3802
+ static InstManager: typeof InstManager;
3803
+ static PlayIcon: typeof Play;
3804
+ static TimeIcon: typeof Time;
3805
+ static Progress: typeof Progress;
3806
+ static FullscreenIcon: typeof Fullscreen;
3807
+ static CssFullscreenIcon: typeof CssFullScreen;
3808
+ static VolumeIcon: typeof Volume;
3809
+ }
3810
+ //#endregion
3811
+ //#region node_modules/xgplayer/es/index.d.ts
3812
+ type IPlayerOptions = IPlayerOptions$4;
3813
+ type IDefinition = IDefinition$3;
3814
+ //#endregion
3815
+ //#region src/components/C_VideoPlayer/types.d.ts
3816
+ /** 清晰度等级 */
3817
+ type QualityLevel = "360p" | "480p" | "720p" | "1080p" | "1440p" | "4K";
3818
+ /** 播放倍速 */
3819
+ type PlaybackRate = 0.5 | 0.75 | 1.0 | 1.25 | 1.5 | 2.0 | 3.0;
3820
+ /** 播放器状态 */
3821
+ type PlayerState = "idle" | "loading" | "ready" | "playing" | "paused" | "ended" | "error";
3822
+ /** 视频源类型 */
3823
+ type VideoSourceType = "mp4" | "hls" | "dash" | "flv";
3824
+ /** 章节标记 */
3825
+ interface Chapter {
3826
+ /** 章节ID */
3827
+ id: string;
3828
+ /** 章节标题 */
3829
+ title: string;
3830
+ /** 起始时间(秒) */
3831
+ startTime: number;
3832
+ /** 结束时间(秒) */
3833
+ endTime: number;
3834
+ }
3835
+ /** 书签 */
3836
+ interface Bookmark {
3837
+ /** 书签ID */
3838
+ id: string;
3839
+ /** 书签时间点(秒) */
3840
+ time: number;
3841
+ /** 书签备注 */
3842
+ note: string;
3843
+ /** 创建时间 */
3844
+ createdAt: number;
3845
+ }
3846
+ /** 字幕轨道 */
3847
+ interface SubtitleTrack {
3848
+ /** 字幕语言标识 */
3849
+ language: string;
3850
+ /** 字幕显示名称 */
3851
+ label: string;
3852
+ /** 字幕文件地址 */
3853
+ src: string;
3854
+ /** 是否为默认字幕 */
3855
+ default?: boolean;
3856
+ }
3857
+ /** 测验题类型 */
3858
+ type QuizType = "single" | "multiple" | "judge";
3859
+ /** 测验题选项 */
3860
+ interface QuizOption {
3861
+ /** 选项标识 */
3862
+ key: string;
3863
+ /** 选项内容 */
3864
+ label: string;
3865
+ }
3866
+ /** 视频内嵌测验 */
3867
+ interface VideoQuiz {
3868
+ /** 测验ID */
3869
+ id: string;
3870
+ /** 触发时间(秒) */
3871
+ triggerTime: number;
3872
+ /** 题目类型 */
3873
+ type: QuizType;
3874
+ /** 题目标题 */
3875
+ title: string;
3876
+ /** 选项列表 */
3877
+ options: QuizOption[];
3878
+ /** 正确答案 key(多选为数组) */
3879
+ answer: string | string[];
3880
+ /** 是否必须答对才能继续 */
3881
+ required?: boolean;
3882
+ }
3883
+ /** 清晰度定义 */
3884
+ interface QualityDefinition {
3885
+ /** 清晰度标识 */
3886
+ label: QualityLevel;
3887
+ /** 视频地址 */
3888
+ url: string;
3889
+ /** 码率(kbps) */
3890
+ bitrate?: number;
3891
+ }
3892
+ /** 学习进度数据 */
3893
+ interface ProgressData {
3894
+ /** 当前播放时间(秒) */
3895
+ currentTime: number;
3896
+ /** 视频总时长(秒) */
3897
+ duration: number;
3898
+ /** 已观看时长(秒) */
3899
+ watchedDuration: number;
3900
+ /** 完成百分比 0-100 */
3901
+ completionPercent: number;
3902
+ /** 最后更新时间戳 */
3903
+ updatedAt: number;
3904
+ }
3905
+ /** 进度上报回调 */
3906
+ type ProgressReporter = (data: ProgressData) => void | Promise<void>;
3907
+ /** 防作弊配置 */
3908
+ interface AntiCheatConfig {
3909
+ /** 是否禁止首次观看时拖动进度条 */
3910
+ preventSeekOnFirstWatch?: boolean;
3911
+ /** 是否开启焦点检测(切出页面暂停) */
3912
+ focusDetection?: boolean;
3913
+ /** 是否显示动态水印 */
3914
+ watermark?: boolean;
3915
+ /** 水印文本(如用户名/ID) */
3916
+ watermarkText?: string;
3917
+ /** 心跳上报间隔(毫秒),默认 30000 */
3918
+ heartbeatInterval?: number;
3919
+ /** 心跳回调 */
3920
+ onHeartbeat?: (data: ProgressData) => void | Promise<void>;
3921
+ }
3922
+ /** 缩略图配置 */
3923
+ interface ThumbnailConfig {
3924
+ /** 雪碧图地址列表 */
3925
+ urls: string[];
3926
+ /** 每张雪碧图包含的图片数量 */
3927
+ picNum: number;
3928
+ /** 雪碧图列数 */
3929
+ col: number;
3930
+ /** 雪碧图行数 */
3931
+ row: number;
3932
+ /** 缩略图宽度 */
3933
+ width?: number;
3934
+ /** 缩略图高度 */
3935
+ height?: number;
3936
+ }
3937
+ /** 播放器事件类型 */
3938
+ type AnalyticsEventType = "play" | "pause" | "ended" | "seek" | "quality_change" | "speed_change" | "error" | "buffer" | "fullscreen";
3939
+ /** 分析上报数据 */
3940
+ interface AnalyticsEvent {
3941
+ /** 事件类型 */
3942
+ type: AnalyticsEventType;
3943
+ /** 事件发生时的播放时间 */
3944
+ currentTime: number;
3945
+ /** 事件时间戳 */
3946
+ timestamp: number;
3947
+ /** 附加数据 */
3948
+ payload?: Record<string, unknown>;
3949
+ }
3950
+ /** 分析上报回调 */
3951
+ type AnalyticsReporter = (event: AnalyticsEvent) => void | Promise<void>;
3952
+ /** 视频播放器组件属性 */
3953
+ interface VideoPlayerProps {
3954
+ /** 视频源地址 */
3955
+ url: string;
3956
+ /** 视频源类型,默认自动检测 */
3957
+ sourceType?: VideoSourceType;
3958
+ /** 播放器宽度 */
3959
+ width?: number | string;
3960
+ /** 播放器高度 */
3961
+ height?: number | string;
3962
+ /** 封面图地址 */
3963
+ poster?: string;
3964
+ /** 是否自适应容器宽度 */
3965
+ fluid?: boolean;
3966
+ /** 是否自动播放 */
3967
+ autoplay?: boolean;
3968
+ /** 是否自动静音播放 */
3969
+ autoplayMuted?: boolean;
3970
+ /** 是否循环播放 */
3971
+ loop?: boolean;
3972
+ /** 初始音量 0-1 */
3973
+ volume?: number;
3974
+ /** 起始播放时间(秒),用于断点续播 */
3975
+ startTime?: number;
3976
+ /** 播放倍速列表 */
3977
+ playbackRates?: PlaybackRate[];
3978
+ /** 默认倍速 */
3979
+ defaultPlaybackRate?: PlaybackRate;
3980
+ /** 是否开启画中画 */
3981
+ pip?: boolean;
3982
+ /** 是否开启全屏功能 */
3983
+ fullscreen?: boolean;
3984
+ /** 是否开启网页全屏 */
3985
+ cssFullscreen?: boolean;
3986
+ /** 是否开启小窗播放 */
3987
+ miniPlayer?: boolean;
3988
+ /** 是否显示截图按钮 */
3989
+ screenshot?: boolean;
3990
+ /** 是否开启快捷键 */
3991
+ keyboard?: boolean;
3992
+ /** 语言 */
3993
+ lang?: string;
3994
+ /** 清晰度列表 */
3995
+ qualityList?: QualityDefinition[];
3996
+ /** 默认清晰度 */
3997
+ defaultQuality?: QualityLevel;
3998
+ /** 章节列表 */
3999
+ chapters?: Chapter[];
4000
+ /** 字幕轨道列表 */
4001
+ subtitles?: SubtitleTrack[];
4002
+ /** 视频内测验列表 */
4003
+ quizzes?: VideoQuiz[];
4004
+ /** 书签列表(已有的) */
4005
+ bookmarks?: Bookmark[];
4006
+ /** 缩略图预览配置 */
4007
+ thumbnail?: ThumbnailConfig;
4008
+ /** 进度上报回调 */
4009
+ onProgress?: ProgressReporter;
4010
+ /** 防作弊配置 */
4011
+ antiCheat?: AntiCheatConfig;
4012
+ /** 数据分析上报回调 */
4013
+ onAnalytics?: AnalyticsReporter;
4014
+ /** xgplayer 原生配置透传,会与组件生成的配置进行合并 */
4015
+ playerOptions?: Partial<IPlayerOptions>;
4016
+ }
4017
+ /** 视频播放器组件事件 */
4018
+ interface VideoPlayerEmits {
4019
+ /** 播放器就绪 */
4020
+ (e: "ready"): void;
4021
+ /** 播放状态变化 */
4022
+ (e: "stateChange", state: PlayerState): void;
4023
+ /** 播放时间更新 */
4024
+ (e: "timeUpdate", currentTime: number, duration: number): void;
4025
+ /** 播放结束 */
4026
+ (e: "ended"): void;
4027
+ /** 播放错误 */
4028
+ (e: "error", error: Error): void;
4029
+ /** 清晰度切换 */
4030
+ (e: "qualityChange", quality: QualityLevel): void;
4031
+ /** 倍速切换 */
4032
+ (e: "rateChange", rate: number): void;
4033
+ /** 全屏状态变化 */
4034
+ (e: "fullscreenChange", isFullscreen: boolean): void;
4035
+ /** 书签变化 */
4036
+ (e: "bookmarkChange", bookmarks: Bookmark[]): void;
4037
+ /** 测验作答 */
4038
+ (e: "quizAnswer", quizId: string, answer: string | string[], isCorrect: boolean): void;
4039
+ /** 章节切换 */
4040
+ (e: "chapterChange", chapter: Chapter): void;
4041
+ /** 进度更新 */
4042
+ (e: "progressUpdate", data: ProgressData): void;
4043
+ }
4044
+ /** 视频播放器暴露的方法 */
4045
+ interface VideoPlayerExpose {
4046
+ /** 播放 */
4047
+ play: () => void;
4048
+ /** 暂停 */
4049
+ pause: () => void;
4050
+ /** 跳转到指定时间 */
4051
+ seek: (time: number) => void;
4052
+ /** 设置倍速 */
4053
+ setPlaybackRate: (rate: number) => void;
4054
+ /** 设置音量 */
4055
+ setVolume: (volume: number) => void;
4056
+ /** 切换清晰度 */
4057
+ switchQuality: (quality: QualityLevel) => void;
4058
+ /** 获取当前进度数据 */
4059
+ getProgressData: () => ProgressData;
4060
+ /** 销毁播放器 */
4061
+ destroy: () => void;
4062
+ /** 获取 xgplayer 原始实例 */
4063
+ getPlayerInstance: () => InstanceType<typeof PresetPlayer> | null;
4064
+ }
4065
+ /** xgplayer 实例类型 */
4066
+ type PlayerInstance = InstanceType<typeof PresetPlayer>;
4067
+ //#endregion
4068
+ //#region src/components/C_VideoPlayer/index.vue.d.ts
4069
+ declare const __VLS_export: vue.DefineComponent<VideoPlayerProps, VideoPlayerExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
4070
+ error: (error: Error) => any;
4071
+ ready: () => any;
4072
+ ended: () => any;
4073
+ stateChange: (state: PlayerState) => any;
4074
+ timeUpdate: (currentTime: number, duration: number) => any;
4075
+ qualityChange: (quality: QualityLevel) => any;
4076
+ rateChange: (rate: number) => any;
4077
+ fullscreenChange: (isFullscreen: boolean) => any;
4078
+ bookmarkChange: (bookmarks: Bookmark[]) => any;
4079
+ quizAnswer: (quizId: string, answer: string | string[], isCorrect: boolean) => any;
4080
+ chapterChange: (chapter: Chapter) => any;
4081
+ progressUpdate: (data: ProgressData) => any;
4082
+ }, string, vue.PublicProps, Readonly<VideoPlayerProps> & Readonly<{
4083
+ onError?: ((error: Error) => any) | undefined;
4084
+ onReady?: (() => any) | undefined;
4085
+ onEnded?: (() => any) | undefined;
4086
+ onStateChange?: ((state: PlayerState) => any) | undefined;
4087
+ onTimeUpdate?: ((currentTime: number, duration: number) => any) | undefined;
4088
+ onQualityChange?: ((quality: QualityLevel) => any) | undefined;
4089
+ onRateChange?: ((rate: number) => any) | undefined;
4090
+ onFullscreenChange?: ((isFullscreen: boolean) => any) | undefined;
4091
+ onBookmarkChange?: ((bookmarks: Bookmark[]) => any) | undefined;
4092
+ onQuizAnswer?: ((quizId: string, answer: string | string[], isCorrect: boolean) => any) | undefined;
4093
+ onChapterChange?: ((chapter: Chapter) => any) | undefined;
4094
+ onProgressUpdate?: ((data: ProgressData) => any) | undefined;
4095
+ }>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
4096
+ declare const _default: typeof __VLS_export;
4097
+ //#endregion
4098
+ //#region src/components/C_VideoPlayer/composables/usePlayerCore.d.ts
4099
+ /**
4100
+ * 播放器核心 composable
4101
+ * - 管理 xgplayer 实例的创建 & 销毁
4102
+ * - 暴露播放器状态、引用
4103
+ */
4104
+ declare function usePlayerCore(props: VideoPlayerProps): {
4105
+ containerRef: Ref<HTMLElement | null, HTMLElement | null>;
4106
+ playerRef: vue.ShallowRef<PresetPlayer | null, PresetPlayer | null>;
4107
+ playerState: Ref<PlayerState, PlayerState>;
4108
+ currentTime: Ref<number, number>;
4109
+ duration: Ref<number, number>;
4110
+ isFullscreen: Ref<boolean, boolean>;
4111
+ initPlayer: () => Promise<void>;
4112
+ destroyPlayer: () => void;
4113
+ };
4114
+ //#endregion
4115
+ //#region src/components/C_VideoPlayer/composables/usePlaybackControl.d.ts
4116
+ /**
4117
+ * 播放控制 composable
4118
+ * - 播放 / 暂停 / 跳转
4119
+ * - 音量调节(本地持久化)
4120
+ * - 倍速调节(本地持久化)
4121
+ */
4122
+ declare function usePlaybackControl(playerRef: ShallowRef<PlayerInstance | null>): {
4123
+ volume: vue.Ref<number, number>;
4124
+ playbackRate: vue.Ref<number, number>;
4125
+ isMuted: vue.Ref<boolean, boolean>;
4126
+ play: () => void;
4127
+ pause: () => void;
4128
+ togglePlay: () => void;
4129
+ seek: (time: number) => void;
4130
+ setVolume: (val: number) => void;
4131
+ toggleMute: () => void;
4132
+ setPlaybackRate: (rate: number) => void;
4133
+ };
4134
+ //#endregion
4135
+ //#region src/components/C_VideoPlayer/composables/useBookmarks.d.ts
4136
+ /**
4137
+ * 书签笔记 composable
4138
+ * - 添加 / 删除 / 更新书签
4139
+ * - localStorage 持久化
4140
+ * - 按时间排序
4141
+ */
4142
+ declare function useBookmarks(url: Ref<string>, currentTime: Ref<number>, seekFn: (time: number) => void, initialBookmarks?: Bookmark[]): {
4143
+ bookmarks: Ref<{
4144
+ id: string;
4145
+ time: number;
4146
+ note: string;
4147
+ createdAt: number;
4148
+ }[], Bookmark[] | {
4149
+ id: string;
4150
+ time: number;
4151
+ note: string;
4152
+ createdAt: number;
4153
+ }[]>;
4154
+ addBookmark: (note?: string) => Bookmark;
4155
+ removeBookmark: (id: string) => void;
4156
+ updateBookmark: (id: string, note: string) => void;
4157
+ goToBookmark: (id: string) => void;
4158
+ clearBookmarks: () => void;
4159
+ };
4160
+ //#endregion
4161
+ //#region src/components/C_VideoPlayer/composables/useChapters.d.ts
4162
+ /**
4163
+ * 章节标记 composable
4164
+ * - 根据当前播放时间计算所在章节
4165
+ * - 提供跳转到指定章节的能力
4166
+ * - 计算进度条上章节标记的位置
4167
+ */
4168
+ declare function useChapters(chapters: Ref<Chapter[]>, currentTime: Ref<number>, duration: Ref<number>, seekFn: (time: number) => void): {
4169
+ currentChapter: vue.ComputedRef<Chapter | null>;
4170
+ currentChapterIndex: vue.ComputedRef<number>;
4171
+ chapterMarkers: vue.ComputedRef<{
4172
+ startPercent: number;
4173
+ endPercent: number;
4174
+ widthPercent: number;
4175
+ id: string;
4176
+ title: string;
4177
+ startTime: number;
4178
+ endTime: number;
4179
+ }[]>;
4180
+ goToChapter: (chapterId: string) => void;
4181
+ prevChapter: () => void;
4182
+ nextChapter: () => void;
4183
+ };
4184
+ //#endregion
4185
+ //#region src/components/C_VideoPlayer/composables/useSubtitle.d.ts
4186
+ /**
4187
+ * 字幕管理 composable
4188
+ * - fetch VTT → 解析 → 按当前播放时间匹配 cue
4189
+ * - 提供切换 / 关闭能力
4190
+ */
4191
+ declare function useSubtitle(playerRef: ShallowRef<PlayerInstance | null>, subtitles?: SubtitleTrack[], currentTime?: Ref<number>): {
4192
+ activeLanguage: Ref<string | null, string | null>;
4193
+ subtitleList: Ref<{
4194
+ language: string;
4195
+ label: string;
4196
+ src: string;
4197
+ default?: boolean | undefined;
4198
+ }[], SubtitleTrack[] | {
4199
+ language: string;
4200
+ label: string;
4201
+ src: string;
4202
+ default?: boolean | undefined;
4203
+ }[]>;
4204
+ currentText: vue.ComputedRef<string>;
4205
+ hasSubtitles: vue.ComputedRef<boolean>;
4206
+ isLoading: Ref<boolean, boolean>;
4207
+ initSubtitles: () => Promise<void>;
4208
+ switchSubtitle: (language: string) => Promise<void>;
4209
+ closeSubtitle: () => void;
4210
+ toggleSubtitle: () => void;
4211
+ };
4212
+ //#endregion
4213
+ //#region src/components/C_VideoPlayer/composables/useProgressTracker.d.ts
4214
+ /**
4215
+ * 学习进度追踪 composable
4216
+ * - 精确记录已观看时长(排除暂停和拖动时间)
4217
+ * - 节流上报进度
4218
+ * - 心跳上报
4219
+ * - 页面关闭时使用 sendBeacon 兜底上报
4220
+ * - 断点续播 localStorage 存储
4221
+ */
4222
+ declare function useProgressTracker(playerRef: ShallowRef<PlayerInstance | null>, currentTime: Ref<number>, duration: Ref<number>, url: Ref<string>, onProgress?: ProgressReporter, antiCheat?: AntiCheatConfig): {
4223
+ watchedDuration: Ref<number, number>;
4224
+ completionPercent: Ref<number, number>;
4225
+ getProgressData: () => ProgressData;
4226
+ restoreProgress: () => number;
4227
+ saveProgress: () => void;
4228
+ startTracking: () => void;
4229
+ stopTracking: () => void;
4230
+ onPlay: () => void;
4231
+ onPause: () => void;
4232
+ onTimeUpdate: () => void;
4233
+ };
4234
+ //#endregion
4235
+ //#region src/components/C_VideoPlayer/constants.d.ts
4236
+ /** 默认播放倍速列表 */
4237
+ declare const DEFAULT_PLAYBACK_RATES: PlaybackRate[];
4238
+ /** 默认播放倍速 */
4239
+ declare const DEFAULT_PLAYBACK_RATE: PlaybackRate;
4240
+ /** 默认音量 */
4241
+ declare const DEFAULT_VOLUME = 0.75;
4242
+ /** 心跳上报间隔(毫秒) */
4243
+ declare const DEFAULT_HEARTBEAT_INTERVAL = 30000;
4244
+ /** 进度上报节流间隔(毫秒) */
4245
+ declare const PROGRESS_THROTTLE_INTERVAL = 5000;
4246
+ /** 清晰度标签映射 */
4247
+ declare const QUALITY_LABEL_MAP: Record<QualityLevel, string>;
4248
+ /** 视频源文件扩展名与类型映射 */
4249
+ declare const SOURCE_TYPE_MAP: Record<string, VideoSourceType>;
4250
+ /** 快捷键映射描述 */
4251
+ declare const KEYBOARD_SHORTCUTS: {
4252
+ readonly SPACE: "播放/暂停";
4253
+ readonly ARROW_LEFT: "快退 5 秒";
4254
+ readonly ARROW_RIGHT: "快进 5 秒";
4255
+ readonly ARROW_UP: "音量增加 10%";
4256
+ readonly ARROW_DOWN: "音量减少 10%";
4257
+ readonly F: "全屏/退出全屏";
4258
+ readonly M: "静音/取消静音";
4259
+ readonly ESC: "退出全屏";
4260
+ };
4261
+ /** 快进/快退步长(秒) */
4262
+ declare const SEEK_STEP = 5;
4263
+ /** 音量调节步长 */
4264
+ declare const VOLUME_STEP = 0.1;
4265
+ /** localStorage 存储键前缀 */
4266
+ declare const STORAGE_PREFIX = "c_video_player_";
4267
+ /** 存储键 */
4268
+ declare const STORAGE_KEYS: {
4269
+ /** 音量 */readonly VOLUME: "c_video_player_volume"; /** 倍速 */
4270
+ readonly PLAYBACK_RATE: "c_video_player_playback_rate"; /** 播放进度前缀(后接视频标识) */
4271
+ readonly PROGRESS: "c_video_player_progress_"; /** 书签前缀(后接视频标识) */
4272
+ readonly BOOKMARKS: "c_video_player_bookmarks_";
4273
+ };
4274
+ /** 水印默认样式 */
4275
+ declare const WATERMARK_DEFAULT_STYLE: {
4276
+ readonly fontSize: 14;
4277
+ readonly color: "rgba(150, 150, 150, 0.15)";
4278
+ readonly rotate: -25;
4279
+ readonly gap: 120;
4280
+ };
4281
+ //#endregion
4282
+ export { ProgressData as A, VideoPlayerProps as B, AnalyticsReporter as C, PlaybackRate as D, Chapter as E, QuizType as F, VideoSourceType as H, SubtitleTrack as I, ThumbnailConfig as L, QualityDefinition as M, QualityLevel as N, PlayerInstance as O, QuizOption as P, VideoPlayerEmits as R, AnalyticsEventType as S, Bookmark as T, IDefinition as U, VideoQuiz as V, IPlayerOptions as W, useBookmarks as _, KEYBOARD_SHORTCUTS as a, _default as b, SEEK_STEP as c, STORAGE_PREFIX as d, VOLUME_STEP as f, useChapters as g, useSubtitle as h, DEFAULT_VOLUME as i, ProgressReporter as j, PlayerState as k, SOURCE_TYPE_MAP as l, useProgressTracker as m, DEFAULT_PLAYBACK_RATE as n, PROGRESS_THROTTLE_INTERVAL as o, WATERMARK_DEFAULT_STYLE as p, DEFAULT_PLAYBACK_RATES as r, QUALITY_LABEL_MAP as s, DEFAULT_HEARTBEAT_INTERVAL as t, STORAGE_KEYS as u, usePlaybackControl as v, AntiCheatConfig as w, AnalyticsEvent as x, usePlayerCore as y, VideoPlayerExpose as z };
4283
+ //# sourceMappingURL=constants5.d.ts.map