@byteplus/veplayer 1.15.3-rc.32 → 1.15.3-rc.33

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.
package/lite.d.ts CHANGED
@@ -20,6 +20,64 @@ export declare enum UmdKeys {
20
20
  }
21
21
  /** Resolved UMD module values keyed by their public UMD key. */
22
22
  export type UmdModules = Partial<Record<UmdKeys, unknown>>;
23
+ /** Video and audio codec names supported by the player. */
24
+ export declare const CodecType: {
25
+ readonly H264: "h264";
26
+ readonly H265: "h265";
27
+ readonly H266: "h266";
28
+ readonly AAC: "aac";
29
+ readonly MP3: "mp3";
30
+ readonly OPUS: "opus";
31
+ readonly UNKNOWN: "unknown";
32
+ };
33
+ /** MIME type mapping for the supported MSE video codecs. */
34
+ export declare const ContentType: {
35
+ readonly h265: string;
36
+ readonly h264: string;
37
+ };
38
+ export declare enum EVideoFormat {
39
+ MP4 = "mp4",
40
+ DASH = "dash",
41
+ HLS = "hls"
42
+ }
43
+ export declare enum EAudioFormat {
44
+ M4A = "m4a",
45
+ MP4 = "mp4",
46
+ MP3 = "mp3",
47
+ DASH = "dash",
48
+ HLS = "hls",
49
+ OGG = "ogg"
50
+ }
51
+ export declare const enum EDRMTYPE {
52
+ DRM_ENCRYPT = "drm_encrypt",
53
+ PRIVATE_ENCRYPT = "private_encrypt",
54
+ PRIVATE_ENCRYPT_UPGRADE = "private_encrypt_upgrade",
55
+ STANDARD_ENCRYPT = "standard_encrypt"
56
+ }
57
+ /** Plugin placement values compatible with the Full entry. */
58
+ export declare const enum POSITIONS {
59
+ ROOT = "root",
60
+ ROOT_LEFT = "rootLeft",
61
+ ROOT_RIGHT = "rootRight",
62
+ ROOT_TOP = "rootTop",
63
+ CONTROLS_LEFT = "controlsLeft",
64
+ CONTROLS_RIGTH = "controlsRight",
65
+ CONTROLS_RIGHT = "controlsRight",
66
+ CONTROLS_CENTER = "controlsCenter",
67
+ CONTROLS = "controls"
68
+ }
69
+ /** Public event-name map shared by Lite and Full UMD constructors. */
70
+ export interface LiteEvents {
71
+ readonly READY: "ready";
72
+ readonly [eventName: string]: string;
73
+ }
74
+ /** Legacy grouped event-name map. */
75
+ export interface LiteEvent {
76
+ readonly SDKEvents: LiteEvents;
77
+ readonly PluginEvents: Record<string, string>;
78
+ }
79
+ export declare const Events: LiteEvents;
80
+ export declare const Event: LiteEvent;
23
81
  export type LiteStreamType = "mp4" | "hls" | "dash" | "flv";
24
82
  export type LiteCodecType = "h264" | "h265" | "h266" | "aac" | "mp3" | "opus" | "unknown";
25
83
  export type LiteDrmType = "drm_encrypt" | "private_encrypt" | "private_encrypt_upgrade" | "standard_encrypt";
@@ -87,6 +145,35 @@ export interface LitePreloadUpdateConfig {
87
145
  prevCount?: number;
88
146
  nextCount?: number;
89
147
  }
148
+ /** Lite-safe media information cache settings. */
149
+ export interface LiteMediaInfoCacheConfig {
150
+ enable?: boolean;
151
+ cacheType?: "memory" | "localStorage";
152
+ expireTime?: number;
153
+ maxEntries?: number;
154
+ }
155
+ /** Current media information cache settings, with defaults resolved. */
156
+ export interface LiteMediaInfoCacheState {
157
+ enable: boolean;
158
+ cacheType: "memory" | "localStorage";
159
+ expireTime: number;
160
+ maxEntries: number;
161
+ }
162
+ /** Minimal preloader operations available from the Lite static surface. */
163
+ export interface LitePreloaderManager {
164
+ removeAll(): void;
165
+ removeAllPreloadTask(): void;
166
+ clearPreloadList(): void;
167
+ }
168
+ /** Lite preloader lifecycle states. */
169
+ export type LitePreloaderStatus = 0 | 1 | 2 | 3;
170
+ /** Lite-safe view of the strategy controller exposed by the player. */
171
+ export interface LiteVeStrategy {
172
+ readonly preloader?: LitePreloaderManager;
173
+ readonly preloaderStatus: LitePreloaderStatus;
174
+ }
175
+ /** Encryption metadata generated by a registered encryption module. */
176
+ export type LiteEncryptInfo = Record<string, unknown>;
90
177
  /** A direct media entry accepted by Lite preload APIs. */
91
178
  export interface LitePreloadResolvedStream {
92
179
  vid: string;
@@ -500,6 +587,12 @@ type CollectorConstructor = new (name: string) => any;
500
587
  export interface LiteVePlayerConstructor {
501
588
  readonly prototype: LiteVePlayer;
502
589
  readonly sdkVersion: string;
590
+ readonly Events: LiteEvents;
591
+ readonly Event: LiteEvent;
592
+ readonly veStrategy: LiteVeStrategy;
593
+ readonly ttDramaEnv: LiteTTDramaEnv | null;
594
+ readonly preloader: LitePreloaderManager | undefined;
595
+ readonly preloaderStatus: LitePreloaderStatus;
503
596
  new <MediaUrl extends LiteMediaUrl = LiteMediaUrl, StreamUrl extends LiteMediaUrl = LiteMediaUrl>(configs: LitePlayerConfig<MediaUrl, StreamUrl>): LiteVePlayer;
504
597
  prepare(options: LiteStrategyInitOptions): Promise<void>;
505
598
  registerModules(modules: UmdModules): void;
@@ -512,6 +605,10 @@ export interface LiteVePlayerConstructor {
512
605
  setAppendVideoUrlTimestamp(enable?: boolean): void;
513
606
  setCollector(Collector?: CollectorConstructor): void;
514
607
  setDebug(enable: boolean): void;
608
+ setMediaInfoCacheConfig(config: LiteMediaInfoCacheConfig): void;
609
+ getMediaInfoCacheConfig(): LiteMediaInfoCacheState;
610
+ clearMediaInfoCache(): void;
611
+ generateEncryptInfo(unionId: string, streamType: "hls" | "mp4" | "dash"): Promise<LiteEncryptInfo | undefined>;
515
612
  }
516
613
  declare const LiteVePlayer: LiteVePlayerConstructor;
517
614
  export declare const Subtitle: LitePluginConstructor;