@volcengine/veplayer 2.6.2 → 2.7.0-rc.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 (40) hide show
  1. package/esm/index.d.ts +16 -19
  2. package/esm/veplayer.biz.live.development.css +1 -2
  3. package/esm/veplayer.biz.live.development.js +953 -345
  4. package/esm/veplayer.biz.live.production.css +1 -1
  5. package/esm/veplayer.biz.live.production.js +1 -1
  6. package/esm/veplayer.d.ts +285 -93
  7. package/esm/veplayer.development.css +1 -2
  8. package/esm/veplayer.development.js +912 -332
  9. package/esm/veplayer.live.d.ts +285 -93
  10. package/esm/veplayer.live.development.css +1 -2
  11. package/esm/veplayer.live.development.js +911 -331
  12. package/esm/veplayer.live.production.css +1 -1
  13. package/esm/veplayer.live.production.js +3 -3
  14. package/esm/veplayer.production.css +1 -1
  15. package/esm/veplayer.production.js +3 -3
  16. package/esm/veplayer.vod.d.ts +16 -19
  17. package/esm/veplayer.vod.development.js +36 -20
  18. package/esm/veplayer.vod.production.js +2 -2
  19. package/package.json +1 -1
  20. package/umd/index.d.ts +16 -19
  21. package/umd/veplayer.biz.live.development.css +1 -2
  22. package/umd/veplayer.biz.live.development.js +953 -345
  23. package/umd/veplayer.biz.live.production.css +1 -1
  24. package/umd/veplayer.biz.live.production.js +1 -1
  25. package/umd/veplayer.d.ts +285 -93
  26. package/umd/veplayer.development.css +1 -2
  27. package/umd/veplayer.development.js +912 -332
  28. package/umd/veplayer.live.d.ts +285 -93
  29. package/umd/veplayer.live.development.css +1 -2
  30. package/umd/veplayer.live.development.js +911 -331
  31. package/umd/veplayer.live.production.css +1 -1
  32. package/umd/veplayer.live.production.js +1 -1
  33. package/umd/veplayer.production.css +1 -1
  34. package/umd/veplayer.production.js +1 -1
  35. package/umd/veplayer.vod.d.ts +16 -19
  36. package/umd/veplayer.vod.development.js +36 -20
  37. package/umd/veplayer.vod.production.js +1 -1
  38. package/veplayer.d.ts +285 -93
  39. package/veplayer.live.d.ts +285 -93
  40. package/veplayer.vod.d.ts +16 -19
package/veplayer.vod.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import Player from "xgplayer";
2
2
  import { IXGI18nText, Plugin, IPluginOptions } from "xgplayer";
3
3
  import { IPlayerOptions as PlayerOptions } from "xgplayer";
4
- import { IDefinition as XGDefinition } from "xgplayer";
5
4
  import { default as Player$0 } from "xgplayer";
6
5
  import { IError as XGError } from "xgplayer";
7
6
  import { IBasePluginOptions as XGPluginOptions } from "xgplayer";
@@ -92,8 +91,8 @@ interface DefinitionUrl {
92
91
  url: string;
93
92
  next: DefinitionUrl | null;
94
93
  }
95
- declare class Definition implements XGDefinition {
96
- readonly definition: string;
94
+ declare class Definition {
95
+ readonly definition?: string;
97
96
  readonly source: Source;
98
97
  readonly text?: Record<Lang, string> | string;
99
98
  readonly fallbackUrl: DefinitionUrl;
@@ -101,7 +100,7 @@ declare class Definition implements XGDefinition {
101
100
  private _currentUrlRef;
102
101
  constructor(definitionSetting: {
103
102
  url: string;
104
- definition: string;
103
+ definition?: string;
105
104
  source: Source;
106
105
  text?: Record<Lang, string> | string;
107
106
  fallbackUrls?: string[];
@@ -139,7 +138,7 @@ interface ExposedDefinition {
139
138
  * @brief The resolution ID. This value must be unique.
140
139
  *
141
140
  */
142
- definition: string;
141
+ definition?: string;
143
142
  /** {zh}
144
143
  * @brief 清晰度展示名称。可设置多语言 `{text: {'zh-cn': '高清', 'en': 'HD'}}`。
145
144
  */
@@ -155,6 +154,7 @@ interface ExposedDefinition {
155
154
  *
156
155
  */
157
156
  fallbackUrls?: string[];
157
+ type?: string;
158
158
  }
159
159
  /** {zh}
160
160
  * @list option
@@ -1482,9 +1482,10 @@ type PrepareResult = {
1482
1482
  options?: Partial<VePlayerBaseOptions>;
1483
1483
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1484
1484
  plugins?: any[];
1485
+ protocol?: string;
1485
1486
  useSrc?: boolean;
1486
1487
  };
1487
- type PreparePlugins = (url: string) => Promise<PrepareResult> | undefined;
1488
+ type PreparePlugins = (url?: string) => Promise<PrepareResult | undefined> | undefined;
1488
1489
  /** {zh}
1489
1490
  * @detail option
1490
1491
  * @brief 视频的实际编码格式。如果您在 degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
@@ -1571,6 +1572,7 @@ declare class VePlayerBase {
1571
1572
  private _events;
1572
1573
  private _customMedia?;
1573
1574
  private _errorCallback;
1575
+ private _beforeFallbackError;
1574
1576
  /** {zh}
1575
1577
  * @hidden
1576
1578
  */
@@ -1721,7 +1723,7 @@ declare class VePlayerBase {
1721
1723
  /** {en}
1722
1724
  * @brief Gets the current resolution ID.
1723
1725
  */
1724
- get definition(): string;
1726
+ get definition(): string | undefined;
1725
1727
  /** {zh}
1726
1728
  * @brief 获取和设置播放器的跨域配置信息,更多信息参考 [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) 属性介绍。
1727
1729
  */
@@ -2333,8 +2335,8 @@ declare namespace strategy {
2333
2335
  next: DefinitionUrl | null;
2334
2336
  }
2335
2337
  function arrayToList(urls?: string[]): DefinitionUrl;
2336
- class Definition implements XGDefinition {
2337
- readonly definition: string;
2338
+ class Definition {
2339
+ readonly definition?: string;
2338
2340
  readonly source: Source;
2339
2341
  readonly text?: Record<Lang, string> | string;
2340
2342
  readonly fallbackUrl: DefinitionUrl;
@@ -2342,7 +2344,7 @@ declare namespace strategy {
2342
2344
  private _currentUrlRef;
2343
2345
  constructor(definitionSetting: {
2344
2346
  url: string;
2345
- definition: string;
2347
+ definition?: string;
2346
2348
  source: Source;
2347
2349
  text?: Record<Lang, string> | string;
2348
2350
  fallbackUrls?: string[];
@@ -2380,7 +2382,7 @@ declare namespace strategy {
2380
2382
  * @brief The resolution ID. This value must be unique.
2381
2383
  *
2382
2384
  */
2383
- definition: string;
2385
+ definition?: string;
2384
2386
  /** {zh}
2385
2387
  * @brief 清晰度展示名称。可设置多语言 `{text: {'zh-cn': '高清', 'en': 'HD'}}`。
2386
2388
  */
@@ -2396,6 +2398,7 @@ declare namespace strategy {
2396
2398
  *
2397
2399
  */
2398
2400
  fallbackUrls?: string[];
2401
+ type?: string;
2399
2402
  }
2400
2403
  /** {zh}
2401
2404
  * @list option
@@ -3783,9 +3786,10 @@ declare namespace strategy {
3783
3786
  options?: Partial<VePlayerBaseOptions>;
3784
3787
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3785
3788
  plugins?: any[];
3789
+ protocol?: string;
3786
3790
  useSrc?: boolean;
3787
3791
  };
3788
- type PreparePlugins = (url: string) => Promise<PrepareResult> | undefined;
3792
+ type PreparePlugins = (url?: string) => Promise<PrepareResult | undefined> | undefined;
3789
3793
  /** {zh}
3790
3794
  * @detail option
3791
3795
  * @brief 视频的实际编码格式。如果您在 degradation 设置了 SoftFirst 属性(即硬解不支持降级软解),建议您传入该参数,省去探测实际编码格式的操作。
@@ -3965,13 +3969,6 @@ declare namespace strategy {
3965
3969
  function detectCodec(url: string): Promise<"unknown" | Codec>;
3966
3970
  function isSoftDecode(options: VePlayerBaseOptions, currentCodec?: Codec | "unknown"): Promise<boolean>;
3967
3971
  function combineOptions<T = VePlayerBaseOptions>(strategyList: (Strategy<T> | undefined)[]): Partial<T>;
3968
- const getHlsStrategy: (options: VePlayerBaseOptions) => Promise<{
3969
- options?: undefined;
3970
- plugins?: undefined;
3971
- } | {
3972
- options: Partial<VePlayerBaseOptions>;
3973
- plugins: any[];
3974
- }>;
3975
3972
  }
3976
3973
  declare namespace error {
3977
3974
  const EN: {