xgplayer 3.0.25-rc.9 → 3.0.26

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 (109) hide show
  1. package/dist/index.min.js +1 -1
  2. package/dist/index.min.js.map +1 -1
  3. package/es/defaultConfig.d.ts +15 -15
  4. package/es/error.d.ts +12 -12
  5. package/es/events.d.ts +3 -3
  6. package/es/icons.d.ts +1 -1
  7. package/es/index.d.ts +19 -19
  8. package/es/index.umd.d.ts +17 -17
  9. package/es/instManager.d.ts +1 -1
  10. package/es/lang/br.d.ts +54 -54
  11. package/es/lang/de.d.ts +54 -54
  12. package/es/lang/en.d.ts +55 -55
  13. package/es/lang/es.d.ts +54 -54
  14. package/es/lang/fr.d.ts +54 -54
  15. package/es/lang/i18n.d.ts +7 -0
  16. package/es/lang/id.d.ts +54 -54
  17. package/es/lang/index.d.ts +1 -1
  18. package/es/lang/it.d.ts +54 -54
  19. package/es/lang/jp.d.ts +55 -55
  20. package/es/lang/kr.d.ts +54 -54
  21. package/es/lang/ms-my.d.ts +54 -54
  22. package/es/lang/ru.d.ts +54 -54
  23. package/es/lang/th.d.ts +54 -54
  24. package/es/lang/vn.d.ts +54 -54
  25. package/es/lang/zh-cn.d.ts +55 -55
  26. package/es/lang/zh-hk.d.ts +55 -55
  27. package/es/lang/zh-hk.js +1 -1
  28. package/es/mediaProxy.d.ts +42 -30
  29. package/es/mediaProxy.js +35 -21
  30. package/es/player.d.ts +51 -52
  31. package/es/player.js +3 -3
  32. package/es/plugin/basePlugin.d.ts +12 -12
  33. package/es/plugin/hooksDescriptor.d.ts +3 -3
  34. package/es/plugin/index.d.ts +12 -12
  35. package/es/plugin/plugin.d.ts +26 -23
  36. package/es/plugin/plugin.js +3 -1
  37. package/es/plugin/pluginsManager.d.ts +9 -71
  38. package/es/plugin/pluginsManager.js +22 -9
  39. package/es/plugin/resizeObserver.d.ts +1 -1
  40. package/es/plugins/common/iconPlugin.d.ts +1 -1
  41. package/es/plugins/common/optionList.d.ts +4 -4
  42. package/es/plugins/common/optionsIcon.d.ts +7 -7
  43. package/es/plugins/common/thumbnail.d.ts +4 -4
  44. package/es/plugins/controls/index.d.ts +8 -8
  45. package/es/plugins/cssFullScreen/index.d.ts +4 -4
  46. package/es/plugins/danmu/danmuIcon.d.ts +1 -1
  47. package/es/plugins/danmu/danmuPanel.d.ts +2 -2
  48. package/es/plugins/danmu/index.d.ts +3 -3
  49. package/es/plugins/definition/index.d.ts +2 -2
  50. package/es/plugins/download/index.d.ts +5 -5
  51. package/es/plugins/download/saveAs.d.ts +6 -6
  52. package/es/plugins/dynamicBg/index.d.ts +14 -15
  53. package/es/plugins/enter/index.d.ts +3 -3
  54. package/es/plugins/error/index.d.ts +3 -3
  55. package/es/plugins/fpsDetect/index.d.ts +5 -5
  56. package/es/plugins/fullscreen/backicon.d.ts +2 -2
  57. package/es/plugins/fullscreen/index.d.ts +4 -4
  58. package/es/plugins/gapJump/index.d.ts +6 -6
  59. package/es/plugins/heatmap/index.d.ts +3 -4
  60. package/es/plugins/keyboard/index.d.ts +5 -5
  61. package/es/plugins/keyboard/index.js +1 -1
  62. package/es/plugins/loading/index.d.ts +1 -1
  63. package/es/plugins/logger/index.d.ts +22 -22
  64. package/es/plugins/miniScreen/index.d.ts +8 -8
  65. package/es/plugins/miniScreen/miniScreenIcon.d.ts +1 -1
  66. package/es/plugins/mobile/index.d.ts +8 -8
  67. package/es/plugins/netAdaption/index.d.ts +2 -2
  68. package/es/plugins/pc/index.d.ts +2 -2
  69. package/es/plugins/pc/index.js +1 -1
  70. package/es/plugins/pip/index.d.ts +12 -12
  71. package/es/plugins/play/index.d.ts +2 -2
  72. package/es/plugins/playNext/index.d.ts +5 -5
  73. package/es/plugins/playbackRate/index.d.ts +5 -5
  74. package/es/plugins/poster/index.d.ts +3 -3
  75. package/es/plugins/progress/index.d.ts +15 -15
  76. package/es/plugins/progress/innerList.d.ts +6 -6
  77. package/es/plugins/progress/innerList.js +1 -1
  78. package/es/plugins/progress/miniProgress.d.ts +4 -4
  79. package/es/plugins/progressPreview/dotsApi.js +1 -1
  80. package/es/plugins/progressPreview/index.d.ts +17 -17
  81. package/es/plugins/prompt/index.d.ts +3 -3
  82. package/es/plugins/replay/index.d.ts +2 -2
  83. package/es/plugins/rotate/index.d.ts +5 -5
  84. package/es/plugins/screenShot/index.d.ts +6 -6
  85. package/es/plugins/start/index.d.ts +5 -5
  86. package/es/plugins/stats/index.d.ts +7 -7
  87. package/es/plugins/stats/index.js +1 -1
  88. package/es/plugins/testspeed/index.d.ts +6 -6
  89. package/es/plugins/time/index.d.ts +8 -9
  90. package/es/plugins/time/timesegments.d.ts +3 -3
  91. package/es/plugins/time/timesegments.js +1 -1
  92. package/es/plugins/track/index.d.ts +14 -15
  93. package/es/plugins/track/nativeSubTitle.d.ts +2 -1
  94. package/es/plugins/volume/index.d.ts +9 -9
  95. package/es/plugins/waitingTimeoutJump/index.d.ts +4 -4
  96. package/es/presets/default-en.d.ts +27 -27
  97. package/es/presets/default.d.ts +28 -28
  98. package/es/presets/live.d.ts +14 -14
  99. package/es/presets/mobile.d.ts +23 -23
  100. package/es/state.d.ts +8 -8
  101. package/es/stateClassMap.d.ts +29 -29
  102. package/es/utils/database.d.ts +11 -4
  103. package/es/utils/debug.d.ts +1 -1
  104. package/es/utils/draggabilly.d.ts +3 -2
  105. package/es/utils/sniffer.d.ts +2 -2
  106. package/es/utils/util.d.ts +61 -59
  107. package/es/utils/util.js +2 -0
  108. package/es/version.js +1 -1
  109. package/package.json +3 -3
package/es/player.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export type IPlayerOptions = import('./defaultConfig').IPlayerOptions;
2
- export type IDefinition = import('./defaultConfig').IDefinition;
3
- export type IUrl = import('./defaultConfig').IUrl;
1
+ export type IPlayerOptions = import("./defaultConfig").IPlayerOptions;
2
+ export type IDefinition = import("./defaultConfig").IDefinition;
3
+ export type IUrl = import("./defaultConfig").IUrl;
4
4
  export type SwitchUrlOptions = boolean | {
5
5
  seamless?: boolean;
6
6
  currentTime?: number;
@@ -14,16 +14,16 @@ declare class Player extends MediaProxy {
14
14
  * 2 - print warn logs and error logs
15
15
  * 3 - print all debug logs and error stack logs
16
16
  */
17
- static set debugger(arg: number);
17
+ static set debugger(value: number);
18
18
  static get debugger(): number;
19
19
  /**
20
20
  * @param {import('./instManager').InstManager} value
21
21
  */
22
- static set instManager(arg: InstManager);
22
+ static set instManager(value: import("./instManager").InstManager);
23
23
  /**
24
24
  * @param {import('./instManager').InstManager} value
25
25
  */
26
- static get instManager(): InstManager;
26
+ static get instManager(): import("./instManager").InstManager;
27
27
  /**
28
28
  * 获取当前处理激活态的实例id
29
29
  * @returns { number | string | null }
@@ -59,11 +59,11 @@ declare class Player extends MediaProxy {
59
59
  * 插件全部迁移完成再做删除
60
60
  */
61
61
  static use(name: any, descriptor: any): void;
62
- static defaultPreset: any;
62
+ static defaultPreset: null;
63
63
  /**
64
64
  * @description 自定义media构造函数
65
65
  */
66
- static XgVideoProxy: any;
66
+ static XgVideoProxy: null;
67
67
  /**
68
68
  * @type { IPlayerOptions }
69
69
  * @description 当前播放器的配置信息
@@ -290,17 +290,17 @@ declare class Player extends MediaProxy {
290
290
  * @readonly
291
291
  * @type { HTMLElement |null }
292
292
  */
293
- readonly leftBar: HTMLElement | null;
293
+ readonly leftBar: HTMLElement | null | undefined;
294
294
  /**
295
295
  * @readonly
296
296
  * @type { HTMLElement | null }
297
297
  */
298
- readonly rightBar: HTMLElement | null;
298
+ readonly rightBar: HTMLElement | null | undefined;
299
299
  /**
300
300
  * @private
301
301
  */
302
302
  private _bindEvents;
303
- playFunc: () => void;
303
+ playFunc: (() => void) | undefined;
304
304
  /**
305
305
  * @private
306
306
  */
@@ -314,8 +314,8 @@ declare class Player extends MediaProxy {
314
314
  _startInit(url?: any, options?: {
315
315
  playSessionId?: number;
316
316
  }): void;
317
- _playSessionId: number;
318
- set hasStart(arg: boolean);
317
+ _playSessionId: number | undefined;
318
+ set hasStart(bool: boolean);
319
319
  /**
320
320
  * @type { boolean }
321
321
  * @description 是否开始播放
@@ -346,10 +346,10 @@ declare class Player extends MediaProxy {
346
346
  * @param { {[propName: string]: any;} } [config]
347
347
  * @returns { any } plugin
348
348
  */
349
- registerPlugin(plugin: Function | {
349
+ registerPlugin(plugin: {
350
350
  plugin: Function;
351
351
  options: object;
352
- }, config?: {
352
+ } | Function, config?: {
353
353
  [propName: string]: any;
354
354
  }): any;
355
355
  /**
@@ -369,14 +369,14 @@ declare class Player extends MediaProxy {
369
369
  * @type { {[propName: string]: any | null } }
370
370
  */
371
371
  get plugins(): {
372
- [propName: string]: any;
372
+ [propName: string]: any | null;
373
373
  };
374
374
  /**
375
375
  * get a plugin instance
376
- * @param { string } pluginName
376
+ * @param { string | function } condition
377
377
  * @return { null | any } plugin
378
378
  */
379
- getPlugin(pluginName: string): null | any;
379
+ getPlugin(condition: string | Function): null | any;
380
380
  /**
381
381
  *
382
382
  * @param { string } className
@@ -429,7 +429,7 @@ declare class Player extends MediaProxy {
429
429
  /**
430
430
  * @description call play without play hook
431
431
  */
432
- mediaPlay(): Promise<void>;
432
+ mediaPlay(): Promise<void> | null | undefined;
433
433
  /**
434
434
  * @private
435
435
  */
@@ -450,8 +450,7 @@ declare class Player extends MediaProxy {
450
450
  * @param { 'play' | 'pause' | 'auto' } [status]
451
451
  * @returns
452
452
  */
453
- seek(time: number, status?: 'play' | 'pause' | 'auto'): void;
454
- currentTime: any;
453
+ seek(time: number, status?: "play" | "pause" | "auto"): void;
455
454
  getInitDefinition(): void;
456
455
  /**
457
456
  * @typedef { import('./defaultConfig').IDefinition } definition
@@ -526,7 +525,7 @@ declare class Player extends MediaProxy {
526
525
  * @param { HTMLElement } [el]
527
526
  */
528
527
  getRotateFullscreen(el?: HTMLElement): void;
529
- _rootStyle: string | boolean;
528
+ _rootStyle: string | boolean | null | undefined;
530
529
  /**
531
530
  * 退出旋转全屏
532
531
  * @param { HTMLElement } [el]
@@ -705,7 +704,7 @@ declare class Player extends MediaProxy {
705
704
  * @type { boolean }
706
705
  */
707
706
  get isCssfullScreen(): boolean;
708
- set isPlaying(arg: boolean);
707
+ set isPlaying(value: boolean);
709
708
  /**
710
709
  * @type { boolean }
711
710
  * @description 是否已经进入起播状态
@@ -714,7 +713,7 @@ declare class Player extends MediaProxy {
714
713
  /**
715
714
  * @type { Array.<IDefinition> }
716
715
  */
717
- set definitionList(arg: import("./defaultConfig").IDefinition[]);
716
+ set definitionList(list: import("./defaultConfig").IDefinition[]);
718
717
  get definitionList(): import("./defaultConfig").IDefinition[];
719
718
  /**
720
719
  * @description VideoFrames infos
@@ -736,9 +735,9 @@ declare class Player extends MediaProxy {
736
735
  /**
737
736
  * @type { string }
738
737
  */
739
- set lang(arg: string);
740
- get lang(): string;
741
- get i18n(): import("./lang/i18n").IXGI18nText;
738
+ set lang(lang: string | undefined);
739
+ get lang(): string | undefined;
740
+ get i18n(): any;
742
741
  get i18nKeys(): {
743
742
  [propName: string]: string;
744
743
  };
@@ -749,11 +748,11 @@ declare class Player extends MediaProxy {
749
748
  /**
750
749
  * @type { number | string }
751
750
  */
752
- get playerId(): string | number;
751
+ get playerId(): number | string;
753
752
  /**
754
753
  * @type { any }
755
754
  */
756
- set url(arg: any);
755
+ set url(url: any);
757
756
  get url(): any;
758
757
  /**
759
758
  * @private
@@ -762,7 +761,7 @@ declare class Player extends MediaProxy {
762
761
  /**
763
762
  * @type { string }
764
763
  */
765
- set poster(arg: any);
764
+ set poster(posterUrl: any);
766
765
  get poster(): any;
767
766
  get error(): any;
768
767
  /**
@@ -777,7 +776,7 @@ declare class Player extends MediaProxy {
777
776
  /**
778
777
  * @type { number }
779
778
  */
780
- set zoom(arg: number);
779
+ set zoom(value: number);
781
780
  /**
782
781
  * @type { number }
783
782
  */
@@ -786,23 +785,23 @@ declare class Player extends MediaProxy {
786
785
  * @type {number}
787
786
  * @description Media element rotation angle, Only multiples of 90 degrees are supported
788
787
  */
789
- set videoRotateDeg(arg: number);
788
+ set videoRotateDeg(val: number);
790
789
  get videoRotateDeg(): number;
791
790
  /**
792
791
  * @description 均衡下载速度,单位kb/s, 根据10条最新下载速度计算出来的加权值,如果没有测速能力则默认是0
793
792
  * @type { number }
794
793
  */
795
- set avgSpeed(arg: number);
794
+ set avgSpeed(val: number);
796
795
  get avgSpeed(): number;
797
796
  /**
798
797
  * @type { number }
799
798
  * 最新一次下载速度,单位kb/s, 如果没有测速能力则默认是0
800
799
  */
801
- set realTimeSpeed(arg: number);
800
+ set realTimeSpeed(val: number);
802
801
  get realTimeSpeed(): number;
803
- set offsetCurrentTime(arg: number);
802
+ set offsetCurrentTime(val: number);
804
803
  get offsetCurrentTime(): number;
805
- set offsetDuration(arg: number);
804
+ set offsetDuration(val: number);
806
805
  get offsetDuration(): number;
807
806
  /**
808
807
  * @param { string } hookName
@@ -813,7 +812,7 @@ declare class Player extends MediaProxy {
813
812
  hook(hookName: string, handler: Function, preset?: {
814
813
  pre: Function | null;
815
814
  next: Function | null;
816
- }, ...args: any[]): any;
815
+ }, ...args: any[]): (...args: any[]) => void;
817
816
  /**
818
817
  * @param {...any} args
819
818
  */
@@ -824,14 +823,14 @@ declare class Player extends MediaProxy {
824
823
  * @param {...any} args
825
824
  * @returns {boolean} isSuccess
826
825
  */
827
- useHooks(hookName: string, handler: (player: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
826
+ useHooks(hookName: string, handler: (player: any, ...args: any) => boolean | Promise<any>, ...args: any[]): boolean;
828
827
  /**
829
828
  *
830
829
  * @param { string } hookName
831
830
  * @param { (player: any, ...args) => boolean | Promise<any> } handler
832
831
  * @returns
833
832
  */
834
- removeHooks(hookName: string, handler: (player: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): any;
833
+ removeHooks(hookName: string, handler: (player: any, ...args: any) => boolean | Promise<any>, ...args: any[]): void;
835
834
  /**
836
835
  *
837
836
  * @param { string } pluginName
@@ -840,7 +839,7 @@ declare class Player extends MediaProxy {
840
839
  * @param {...any} args
841
840
  * @returns { boolean } isSuccess
842
841
  */
843
- usePluginHooks(pluginName: string, hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
842
+ usePluginHooks(pluginName: string, hookName: string, handler: (plugin: any, ...args: any) => boolean | Promise<any>, ...args: any[]): boolean;
844
843
  /**
845
844
  *
846
845
  * @param { string } pluginName
@@ -849,7 +848,7 @@ declare class Player extends MediaProxy {
849
848
  * @param {...any} args
850
849
  * @returns { boolean } isSuccess
851
850
  */
852
- removePluginHooks(pluginName: string, hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
851
+ removePluginHooks(pluginName: string, hookName: string, handler: (plugin: any, ...args: any) => boolean | Promise<any>, ...args: any[]): boolean;
853
852
  /**
854
853
  * 设置当前实例的用户激活态
855
854
  * @param { boolean } isActive
@@ -857,15 +856,15 @@ declare class Player extends MediaProxy {
857
856
  */
858
857
  setUserActive(isActive: boolean, isMuted?: boolean): void;
859
858
  }
860
- import Plugin from "./plugin/plugin";
861
- import BasePlugin from "./plugin/basePlugin";
862
- import * as Events from "./events";
863
- import Errors from "./error";
864
- import Sniffer from "./utils/sniffer";
865
- import Util from "./utils/util";
866
- import STATE_CLASS from "./stateClassMap";
867
- import I18N from "./lang/i18n";
868
- import MediaProxy from "./mediaProxy";
869
- import Controls from "./plugins/controls/index";
870
- import { InstManager } from "./instManager";
859
+ import Plugin from './plugin/plugin';
860
+ import BasePlugin from './plugin/basePlugin';
861
+ import * as Events from './events';
862
+ import Errors from './error';
863
+ import Sniffer from './utils/sniffer';
864
+ import Util from './utils/util';
865
+ import STATE_CLASS from './stateClassMap';
866
+ import I18N from './lang/i18n';
867
+ import MediaProxy from './mediaProxy';
868
+ import Controls from './plugins/controls/index';
869
+ import { InstManager } from './instManager';
871
870
  export { Player as default, Plugin, BasePlugin, Events, Errors, Sniffer, Util, STATE_CLASS, I18N };
package/es/player.js CHANGED
@@ -573,9 +573,9 @@ var Player = /* @__PURE__ */ function(_MediaProxy) {
573
573
  }
574
574
  }, {
575
575
  key: "getPlugin",
576
- value: function getPlugin(pluginName) {
577
- var plugin = pluginsManager.findPlugin(this, pluginName);
578
- return plugin && plugin.pluginName ? plugin : null;
576
+ value: function getPlugin(condition) {
577
+ var plugin = pluginsManager.findPlugin(this, condition);
578
+ return plugin !== null && plugin !== void 0 && plugin.pluginName ? plugin : null;
579
579
  }
580
580
  }, {
581
581
  key: "addClass",
@@ -1,13 +1,13 @@
1
- export type Player = import('../player').default;
2
- export type IPlayerOptions = import('../defaultConfig').IPlayerOptions;
1
+ export type Player = import("../player").default;
2
+ export type IPlayerOptions = import("../defaultConfig").IPlayerOptions;
3
3
  export type IBasePluginOptions = {
4
- [propName: string]: any;
5
4
  index?: number;
6
5
  player: Player;
7
6
  pluginName: string;
8
7
  config: {
9
8
  [propName: string]: any;
10
9
  };
10
+ [propName: string]: any;
11
11
  };
12
12
  /**
13
13
  * @typedef { import ('../player').default } Player
@@ -94,7 +94,7 @@ declare class BasePlugin {
94
94
  * @type { string }
95
95
  */
96
96
  get lang(): string;
97
- get i18n(): import("../lang/i18n").IXGI18nText;
97
+ get i18n(): any;
98
98
  get i18nKeys(): {
99
99
  [propName: string]: string;
100
100
  };
@@ -142,21 +142,21 @@ declare class BasePlugin {
142
142
  hook(hookName: string, handler: Function, preset?: {
143
143
  pre: Function | null;
144
144
  next: Function | null;
145
- }, ...args: any[]): any;
145
+ }, ...args: any[]): (...args: any[]) => void;
146
146
  /**
147
147
  * @param { string } hookName
148
148
  * @param { (plugin: any, ...args) => boolean | Promise<any> } handler
149
149
  * @param {...any} args
150
150
  * @returns { boolean } isSuccess
151
151
  */
152
- useHooks(hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
152
+ useHooks(hookName: string, handler: (plugin: any, ...args: any) => boolean | Promise<any>, ...args: any[]): boolean;
153
153
  /**
154
154
  * @param { string } hookName
155
155
  * @param { (plugin: any, ...args) => boolean | Promise<any> } handler
156
156
  * @param {...any} args
157
157
  * @returns { boolean } isSuccess
158
158
  */
159
- removeHooks(hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
159
+ removeHooks(hookName: string, handler: (plugin: any, ...args: any) => boolean | Promise<any>, ...args: any[]): boolean;
160
160
  /**
161
161
  * 注册子插件
162
162
  * @param { any } plugin
@@ -173,9 +173,9 @@ declare class BasePlugin {
173
173
  getPlugin(name: string): any | null;
174
174
  __destroy(): void;
175
175
  }
176
- import Util from "../utils/util";
177
- import Sniffer from "../utils/sniffer";
178
- import Errors from "../error";
179
- import * as Events from "../events";
180
- import XG_DEBUG from "../utils/debug";
176
+ import Util from '../utils/util';
177
+ import Sniffer from '../utils/sniffer';
178
+ import Errors from '../error';
179
+ import * as Events from '../events';
180
+ import XG_DEBUG from '../utils/debug';
181
181
  export { BasePlugin as default, Util, Sniffer, Errors, Events, XG_DEBUG };
@@ -17,7 +17,7 @@ declare function hooksDescriptor(instance: any, presetHooks?: any[]): void;
17
17
  export function hook(hookName: string, handler: Function, preset?: {
18
18
  pre?: any;
19
19
  next?: any;
20
- }): any;
20
+ }): (...args: any[]) => void;
21
21
  export class hook {
22
22
  /**
23
23
  * 给某个处理函数添加hook能力
@@ -40,7 +40,7 @@ export class hook {
40
40
  * @param { string } hookName
41
41
  * @param { Function } handler
42
42
  */
43
- export function useHooks(hookName: string, handler: Function): boolean;
43
+ export function useHooks(hookName: string, handler: Function): boolean | undefined;
44
44
  /**
45
45
  * Add hooks to a plugin
46
46
  * @param { string } pluginName
@@ -54,7 +54,7 @@ export function removePluginHooks(pluginName: any, ...args: any[]): any;
54
54
  * @param { (plugin: any, ..args) => {} } handler
55
55
  * @returns void
56
56
  */
57
- export function removeHooks(hookName: string, handler: (plugin: any, args: any) => {}): void;
57
+ export function removeHooks(hookName: string, handler: any): void;
58
58
  export function delHooksDescriptor(instance: any): void;
59
59
  export function runHooks(obj: any, hookName: any, handler: any, ...args: any[]): any;
60
60
  export { hooksDescriptor as default };
@@ -1,13 +1,13 @@
1
- import pluginsManager from "./pluginsManager";
2
- import BasePlugin from "./basePlugin";
3
- import hooksDescriptor from "./hooksDescriptor";
4
- import STATE_CLASS from "../stateClassMap";
5
- import { POSITIONS } from "./plugin";
6
- import { ROOT_TYPES } from "./plugin";
7
- import Sniffer from "../utils/sniffer";
8
- import Errors from "../error";
9
- import Util from "../utils/util";
10
- import * as Events from "../events";
11
- import { STATES } from "../state";
12
- import Plugin from "./plugin";
1
+ import pluginsManager from './pluginsManager';
2
+ import BasePlugin from './basePlugin';
3
+ import hooksDescriptor from './hooksDescriptor';
4
+ import STATE_CLASS from '../stateClassMap';
5
+ import { POSITIONS } from './plugin';
6
+ import { ROOT_TYPES } from './plugin';
7
+ import Sniffer from '../utils/sniffer';
8
+ import Errors from '../error';
9
+ import Util from '../utils/util';
10
+ import * as Events from '../events';
11
+ import { STATES } from '../state';
12
+ import Plugin from './plugin';
13
13
  export { pluginsManager, BasePlugin, hooksDescriptor, STATE_CLASS, POSITIONS, ROOT_TYPES, Sniffer, Errors, Util, Events, STATES, Plugin as default };
@@ -1,6 +1,5 @@
1
- export type Player = import('../player').default;
1
+ export type Player = import("../player").default;
2
2
  export type IPluginOptions = {
3
- [propName: string]: any;
4
3
  index?: number;
5
4
  player: Player;
6
5
  pluginName: string;
@@ -9,6 +8,7 @@ export type IPluginOptions = {
9
8
  };
10
9
  root?: HTMLElement;
11
10
  position?: string;
11
+ [propName: string]: any;
12
12
  };
13
13
  /**
14
14
  * @typedef { import ('../player').default } Player
@@ -46,6 +46,7 @@ declare class Plugin extends BasePlugin {
46
46
  * @returns
47
47
  */
48
48
  static delegate(root: HTMLElement, querySelector: string, eventType: string | Array<string>, callback: Function, capture?: boolean): any[];
49
+ static iconTip: typeof xgIconTips;
49
50
  static get ROOT_TYPES(): {
50
51
  CONTROLS: string;
51
52
  ROOT: string;
@@ -76,27 +77,27 @@ declare class Plugin extends BasePlugin {
76
77
  /**
77
78
  * @readonly
78
79
  */
79
- readonly icons: {};
80
+ readonly icons: {} | undefined;
80
81
  /**
81
82
  * @readonly
82
83
  * @type { HTMLElement }
83
84
  */
84
- readonly root: HTMLElement;
85
+ readonly root: HTMLElement | undefined;
85
86
  /**
86
87
  * @readonly
87
88
  * @type { HTMLElement }
88
89
  */
89
- readonly parent: HTMLElement;
90
+ readonly parent: HTMLElement | undefined;
90
91
  /**
91
92
  * store the extra HTMLElements except root
92
93
  * @readonly
93
94
  * @type {HTMLElement[]}
94
95
  */
95
- readonly extraEls: HTMLElement[];
96
+ readonly extraEls: HTMLElement[] | undefined;
96
97
  /**
97
98
  * @readonly
98
99
  */
99
- readonly langText: {};
100
+ readonly langText: {} | undefined;
100
101
  /**
101
102
  * @private
102
103
  */
@@ -106,8 +107,9 @@ declare class Plugin extends BasePlugin {
106
107
  */
107
108
  private _children;
108
109
  updateLang(lang: any): void;
110
+ get lang(): string | undefined;
109
111
  changeLangTextKey(dom: any, key?: string): void;
110
- plugins(): any[];
112
+ plugins(): any[] | null | undefined;
111
113
  /**
112
114
  *
113
115
  */
@@ -182,7 +184,7 @@ declare class Plugin extends BasePlugin {
182
184
  * @param { string } [value]
183
185
  * @returns
184
186
  */
185
- show(value?: string): string;
187
+ show(value?: string): "block" | undefined;
186
188
  hide(): void;
187
189
  /**
188
190
  *
@@ -198,25 +200,26 @@ declare class Plugin extends BasePlugin {
198
200
  render(): string | HTMLElement;
199
201
  }
200
202
  export namespace ROOT_TYPES {
201
- const CONTROLS: string;
202
- const ROOT: string;
203
+ let CONTROLS: string;
204
+ let ROOT: string;
203
205
  }
204
206
  export namespace POSITIONS {
205
- const ROOT_1: string;
207
+ let ROOT_1: string;
206
208
  export { ROOT_1 as ROOT };
207
- export const ROOT_LEFT: string;
208
- export const ROOT_RIGHT: string;
209
- export const ROOT_TOP: string;
210
- export const CONTROLS_LEFT: string;
211
- export const CONTROLS_RIGTH: string;
212
- export const CONTROLS_RIGHT: string;
213
- export const CONTROLS_CENTER: string;
214
- const CONTROLS_1: string;
209
+ export let ROOT_LEFT: string;
210
+ export let ROOT_RIGHT: string;
211
+ export let ROOT_TOP: string;
212
+ export let CONTROLS_LEFT: string;
213
+ export let CONTROLS_RIGTH: string;
214
+ export let CONTROLS_RIGHT: string;
215
+ export let CONTROLS_CENTER: string;
216
+ let CONTROLS_1: string;
215
217
  export { CONTROLS_1 as CONTROLS };
216
218
  }
217
219
  export namespace PLUGIN_STATE_CLASS {
218
- const ICON_DISABLE: string;
219
- const ICON_HIDE: string;
220
+ let ICON_DISABLE: string;
221
+ let ICON_HIDE: string;
220
222
  }
221
- import BasePlugin from "./basePlugin";
223
+ import BasePlugin from './basePlugin';
224
+ import { xgIconTips } from '../plugins/common/iconTools';
222
225
  export { Plugin as default };
@@ -1,6 +1,7 @@
1
- import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, get as _get, getPrototypeOf as _getPrototypeOf, typeof as _typeof } from "../_virtual/_rollupPluginBabelHelpers.js";
1
+ import { defineProperty as _defineProperty, inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, get as _get, getPrototypeOf as _getPrototypeOf, typeof as _typeof } from "../_virtual/_rollupPluginBabelHelpers.js";
2
2
  import BasePlugin from "./basePlugin.js";
3
3
  import _delegate from "delegate";
4
+ import { xgIconTips } from "../plugins/common/iconTools.js";
4
5
  import XG_DEBUG from "../utils/debug.js";
5
6
  import util from "../utils/util.js";
6
7
  var ROOT_TYPES = {
@@ -557,4 +558,5 @@ var Plugin = /* @__PURE__ */ function(_BasePlugin) {
557
558
  }]);
558
559
  return Plugin2;
559
560
  }(BasePlugin);
561
+ _defineProperty(Plugin, "iconTip", xgIconTips);
560
562
  export { PLUGIN_STATE_CLASS, POSITIONS, ROOT_TYPES, Plugin as default };