@vindral/web-sdk 4.0.0 → 4.1.0-1-g31205a30

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/player.d.ts CHANGED
@@ -1,3 +1,47 @@
1
+ interface Channel {
2
+ /**
3
+ * Channel ID for the channel
4
+ */
5
+ channelId: string;
6
+ /**
7
+ * Display name
8
+ */
9
+ name: string;
10
+ /**
11
+ * Indicates whether there is an incoming source feed for the channel
12
+ */
13
+ isLive: boolean;
14
+ /**
15
+ * URLs to fetch thumbnail from
16
+ */
17
+ thumbnailUrls: string[];
18
+ }
19
+ interface ClientOverrides {
20
+ maxVideoBitRate?: number;
21
+ minBufferTime?: number;
22
+ maxBufferTime?: number;
23
+ burstEnabled?: boolean;
24
+ sizeBasedResolutionCapEnabled?: boolean;
25
+ separateVideoSocketEnabled?: boolean;
26
+ videoCodecs?: string[];
27
+ }
28
+ type AudioCodec = "aac" | "opus" | "mp3";
29
+ type VideoCodec = "h264" | "av1";
30
+ interface MinMaxAverage {
31
+ last: number;
32
+ /**
33
+ * Average value over a given interval.
34
+ */
35
+ average: number;
36
+ /**
37
+ * Maximum value over a given interval.
38
+ */
39
+ max: number;
40
+ /**
41
+ * Minimum value over a given interval.
42
+ */
43
+ min: number;
44
+ }
1
45
  type MatchingKeys<TRecord, TMatch, K extends keyof TRecord = keyof TRecord> = K extends (TRecord[K] extends TMatch ? K : never) ? K : never;
2
46
  type VoidKeys<Record> = MatchingKeys<Record, void>;
3
47
  type EventListenerReturnType = (() => void) | void;
@@ -5,6 +49,9 @@ declare class Emitter<TEvents, TEmits = TEvents, ArgLessEvents extends VoidKeys<
5
49
  private listeners;
6
50
  emit<T extends ArgLessEmits>(eventName: T): void;
7
51
  emit<T extends ArgEmits>(eventName: T, args: TEmits[T]): void;
52
+ /**
53
+ * Remove an event listener from `eventName`
54
+ */
8
55
  off<T extends ArgLessEvents>(eventName: T, fn: () => EventListenerReturnType): void;
9
56
  off<T extends ArgEvents>(eventName: T, fn: (args: TEvents[T]) => EventListenerReturnType): void;
10
57
  /**
@@ -23,10 +70,13 @@ declare class Emitter<TEvents, TEmits = TEvents, ArgLessEvents extends VoidKeys<
23
70
  */
24
71
  once<T extends ArgLessEvents>(eventName: T, fn: () => void): void;
25
72
  once<T extends ArgEvents>(eventName: T, fn: (args: TEvents[T]) => void): void;
73
+ /**
74
+ * Reset the event emitter
75
+ */
26
76
  reset(): void;
27
77
  private add;
28
78
  }
29
- declare const Levels: readonly [
79
+ declare const LogLevels: readonly [
30
80
  "off",
31
81
  "error",
32
82
  "warn",
@@ -34,8 +84,8 @@ declare const Levels: readonly [
34
84
  "debug",
35
85
  "trace"
36
86
  ];
37
- type Level = (typeof Levels)[number];
38
- declare const Level: {
87
+ type LogLevel = (typeof LogLevels)[number];
88
+ declare const LogLevel: {
39
89
  ERROR: "error";
40
90
  WARN: "warn";
41
91
  INFO: "info";
@@ -43,65 +93,81 @@ declare const Level: {
43
93
  TRACE: "trace";
44
94
  OFF: "off";
45
95
  };
46
- interface MinMaxAverage {
47
- last: number;
48
- /**
49
- * Average value over a given interval.
50
- */
51
- average: number;
52
- /**
53
- * Maximum value over a given interval.
54
- */
55
- max: number;
56
- /**
57
- * Minimum value over a given interval.
58
- */
59
- min: number;
60
- }
61
- type AudioCodec = "aac" | "opus" | "mp3";
62
- type VideoCodec = "h264" | "av1";
63
- interface Metadata {
64
- /**
65
- * The raw string content as it was ingested (if using JSON, it needs to be parsed on your end)
66
- */
67
- content: string;
68
- /**
69
- * Timestamp in ms
70
- */
71
- timestamp: number;
96
+ declare const tags: unique symbol;
97
+ type Tagged<BaseType, Tag extends PropertyKey> = BaseType & {
98
+ [tags]: {
99
+ [K in Tag]: void;
100
+ };
101
+ };
102
+ type Namespace = Tagged<Array<string>, "Namespace">;
103
+ interface TrackObject {
104
+ namespace?: Namespace;
105
+ name: string;
106
+ format: string;
107
+ label?: string;
108
+ renderGroup?: number;
109
+ altGroup?: number;
110
+ initData?: string;
111
+ initTrack?: string;
112
+ depends?: Array<string>;
113
+ temporalId?: number;
114
+ spatialId?: number;
115
+ codec?: string;
116
+ mimeType?: string;
117
+ framerate?: [
118
+ number,
119
+ number
120
+ ];
121
+ bitrate?: number;
122
+ width?: number;
123
+ height?: number;
124
+ samplerate?: number;
125
+ channelConfig?: string;
126
+ displayWidth?: number;
127
+ displayHeight?: number;
128
+ language?: string;
129
+ ["com.vindral.variant_uid"]?: string;
130
+ ["com.vindral.drm"]?: string;
72
131
  }
73
- interface TimeRange {
74
- start: number;
75
- end: number;
132
+ interface CatalogRoot {
133
+ version: number;
134
+ streamingFormat?: number;
135
+ streamingFormatVersion?: string;
76
136
  }
77
- interface ReconnectState {
78
- /**
79
- * The number or retry attempts so far.
80
- * This gets reset on every successful connect, so it will start from zero every
81
- * time the client instance gets disconnected and will increment until the
82
- * client instance makes a connection attempt is successful.
83
- */
84
- reconnectRetries: number;
137
+ interface TracksCatalog extends CatalogRoot {
138
+ namespace: Namespace;
139
+ tracks: Array<TrackObject>;
85
140
  }
86
141
  interface RenditionProps {
87
142
  id: number;
143
+ /** */
88
144
  bitRate: number;
145
+ /** */
89
146
  codecString?: string;
147
+ /** */
90
148
  language?: string;
149
+ /** */
91
150
  meta?: Record<string, string>;
92
151
  }
93
152
  interface VideoRenditionProps {
153
+ /** */
94
154
  codec: VideoCodec;
155
+ /** */
95
156
  frameRate: [
96
157
  number,
97
158
  number
98
159
  ];
160
+ /** */
99
161
  width: number;
162
+ /** */
100
163
  height: number;
101
164
  }
102
165
  interface AudioRenditionProps {
166
+ /** */
103
167
  codec: AudioCodec;
168
+ /** */
104
169
  channels: number;
170
+ /** */
105
171
  sampleRate: number;
106
172
  }
107
173
  interface TextRenditionProps {
@@ -113,15 +179,90 @@ type VideoRendition = VideoRenditionProps & RenditionProps;
113
179
  type AudioRendition = AudioRenditionProps & RenditionProps;
114
180
  type TextRendition = TextRenditionProps & RenditionProps;
115
181
  type Rendition = VideoRendition | AudioRendition | TextRendition;
182
+ interface Telemetry {
183
+ url: string;
184
+ probability?: number;
185
+ includeErrors?: boolean;
186
+ includeEvents?: boolean;
187
+ includeStats?: boolean;
188
+ maxRetries?: number;
189
+ maxErrorReports?: number;
190
+ interval?: number;
191
+ }
192
+ interface ChannelWithCatalog extends Channel {
193
+ catalog: TracksCatalog;
194
+ renditions: Rendition[];
195
+ overrides?: ClientOverrides;
196
+ }
197
+ interface ChannelWithRenditions extends Channel {
198
+ renditions: Rendition[];
199
+ overrides?: ClientOverrides;
200
+ }
201
+ interface ServerCertificateHash {
202
+ algorithm: string;
203
+ value: string;
204
+ }
205
+ interface Edge {
206
+ moqUrl?: string;
207
+ moqWsUrl: string;
208
+ serverCertificateHashes?: ServerCertificateHash[];
209
+ }
210
+ interface MoQConnectInfo {
211
+ logsUrl?: string;
212
+ statsUrl?: string;
213
+ telemetry?: Telemetry;
214
+ channels: ChannelWithCatalog[];
215
+ edges: Edge[];
216
+ }
217
+ interface VindralConnectInfo {
218
+ logsUrl?: string;
219
+ statsUrl?: string;
220
+ telemetry?: Telemetry;
221
+ channels: ChannelWithRenditions[];
222
+ edges: string[];
223
+ }
224
+ type ConnectInfo = VindralConnectInfo | MoQConnectInfo;
225
+ interface Metadata {
226
+ /**
227
+ * The raw string content as it was ingested (if using JSON, it needs to be parsed on your end)
228
+ */
229
+ content: string;
230
+ /**
231
+ * Timestamp in ms
232
+ */
233
+ timestamp: number;
234
+ }
235
+ interface TimeRange {
236
+ /** */
237
+ start: number;
238
+ /** */
239
+ end: number;
240
+ }
241
+ interface ReconnectState {
242
+ /**
243
+ * The number or retry attempts so far.
244
+ * This gets reset on every successful connect, so it will start from zero every
245
+ * time the client instance gets disconnected and will increment until the
246
+ * client instance makes a connection attempt is successful.
247
+ */
248
+ reconnectRetries: number;
249
+ }
116
250
  interface Size {
251
+ /** */
117
252
  width: number;
253
+ /** */
118
254
  height: number;
119
255
  }
120
256
  interface VideoConstraint {
257
+ /** */
121
258
  width: number;
259
+ /** */
122
260
  height: number;
261
+ /** */
123
262
  bitRate: number;
263
+ /** */
124
264
  codec?: VideoCodec;
265
+ /** */
125
266
  codecString?: string;
126
267
  }
127
268
  interface AdvancedOptions {
@@ -132,6 +273,16 @@ interface AdvancedOptions {
132
273
  */
133
274
  wasmDecodingConstraint: Partial<VideoConstraint>;
134
275
  }
276
+ interface DrmOptions {
277
+ /**
278
+ * Headers to be added to requests to license servers
279
+ */
280
+ headers?: Record<string, string>;
281
+ /**
282
+ * Query parameters to be added to requests to license servers
283
+ */
284
+ queryParams?: Record<string, string>;
285
+ }
135
286
  type Media = "audio" | "video" | "audio+video";
136
287
  interface Options {
137
288
  /**
@@ -168,7 +319,7 @@ interface Options {
168
319
  /**
169
320
  * Sets the log level - defaults to info
170
321
  */
171
- logLevel?: Level;
322
+ logLevel?: LogLevel;
172
323
  /**
173
324
  * Sets the minimum and initial buffer time
174
325
  */
@@ -298,6 +449,7 @@ interface Options {
298
449
  edgeUrl?: string;
299
450
  logShippingEnabled?: boolean;
300
451
  statsShippingEnabled?: boolean;
452
+ webtransportEnabled?: boolean;
301
453
  /**
302
454
  * Enable wake lock for iOS devices.
303
455
  * The wake lock requires that the audio has been activated at least once for the instance, othwerwise it will not work.
@@ -322,113 +474,17 @@ interface Options {
322
474
  advanced?: AdvancedOptions;
323
475
  media?: Media;
324
476
  videoCodecs?: VideoCodec[];
477
+ /**
478
+ * DRM options to provide to the Vindral instance
479
+ */
480
+ drm?: DrmOptions;
325
481
  }
326
482
  interface RenditionLevel {
483
+ /** */
327
484
  audio?: AudioRendition;
485
+ /** */
328
486
  video?: VideoRendition;
329
487
  }
330
- interface Channel {
331
- /**
332
- * Channel ID for the channel
333
- */
334
- channelId: string;
335
- /**
336
- * Display name
337
- */
338
- name: string;
339
- /**
340
- * Indicates whether there is an incoming source feed for the channel
341
- */
342
- isLive: boolean;
343
- /**
344
- * URLs to fetch thumbnail from
345
- */
346
- thumbnailUrls: string[];
347
- }
348
- interface ClientOverrides {
349
- maxVideoBitRate?: number;
350
- minBufferTime?: number;
351
- maxBufferTime?: number;
352
- burstEnabled?: boolean;
353
- sizeBasedResolutionCapEnabled?: boolean;
354
- separateVideoSocketEnabled?: boolean;
355
- videoCodecs?: string[];
356
- }
357
- interface ChannelWithRenditionsAndOverrides extends Channel {
358
- renditions: Rendition[];
359
- overrides?: ClientOverrides;
360
- }
361
- interface ConnectOptions {
362
- channelGroupId?: string;
363
- channelId: string;
364
- }
365
- interface Telemetry {
366
- url: string;
367
- probability?: number;
368
- includeErrors?: boolean;
369
- includeEvents?: boolean;
370
- includeStats?: boolean;
371
- maxRetries?: number;
372
- maxErrorReports?: number;
373
- interval?: number;
374
- }
375
- interface ConnectResponse {
376
- logsUrl?: string;
377
- statsUrl?: string;
378
- telemetry?: Telemetry;
379
- channels: ChannelWithRenditionsAndOverrides[];
380
- edges: string[];
381
- }
382
- interface ApiClientOptions {
383
- /**
384
- * String representing the URL to the public CDN API.
385
- */
386
- publicEndpoint: string;
387
- /**
388
- * Function that should return a string containing a signed authentication token.
389
- */
390
- tokenFactory?: AuthorizationTokenFactory;
391
- }
392
- interface AuthorizationContext {
393
- /**
394
- * The channelGroupId that might need authorization.
395
- */
396
- channelGroupId?: string;
397
- /**
398
- * The channelId that might need authorization.
399
- */
400
- channelId?: string;
401
- }
402
- type AuthorizationTokenFactory = (context: AuthorizationContext) => string | undefined;
403
- declare class ApiClient {
404
- private baseUrl;
405
- private tokenFactory?;
406
- constructor(options: ApiClientOptions);
407
- /**
408
- * Returns everything needed to setup the connection of Vindral instance.
409
- */
410
- connect(options: ConnectOptions): Promise<ConnectResponse>;
411
- /**
412
- * Fetches information regarding a single channel.
413
- *
414
- * @param channelId the channel to fetch
415
- * @returns a [[Channel]] containing information about the requested channel.
416
- */
417
- getChannel(channelId: string): Promise<Channel>;
418
- /**
419
- * Fetches channels within a channel group
420
- *
421
- * Note: The returned list includes inactive channels - check isLive to filter out only active channels
422
- *
423
- * @param channelGroup the channel group to fetch channels from
424
- * @returns an array of [[Channel]] that belong to the channel group
425
- */
426
- getChannels(channelGroupId: string): Promise<Channel[]>;
427
- private getHeaders;
428
- private getAuthToken;
429
- private toChannels;
430
- private toChannel;
431
- }
432
488
  interface VindralErrorProps {
433
489
  isFatal: boolean;
434
490
  type?: ErrorType;
@@ -481,170 +537,61 @@ interface NeedsUserInputContext {
481
537
  */
482
538
  forVideo: boolean;
483
539
  }
484
- type State = "connected" | "disconnected" | "connecting";
485
- type ContextSwitchState = "completed" | "started";
486
- interface ConnectionStatistics {
487
- /**
488
- * RTT (round trip time) between client and server(s).
489
- */
490
- rtt: MinMaxAverage;
491
- /**
492
- * A very rough initial estimation of minimum available bandwidth.
493
- */
494
- estimatedBandwidth: number;
495
- edgeUrl?: string;
540
+ interface ApiClientOptions {
496
541
  /**
497
- * Total number of connections that have been established since instantiation.
542
+ * String representing the URL to the public CDN API.
498
543
  */
499
- connectCount: number;
544
+ publicEndpoint: string;
500
545
  /**
501
- * Total number of connection attempts since instantiation.
546
+ * Function that should return a string containing a signed authentication token.
502
547
  */
503
- connectionAttemptCount: number;
548
+ tokenFactory?: AuthorizationTokenFactory;
504
549
  }
505
- interface LanguageSwitchContext {
550
+ interface AuthorizationContext {
506
551
  /**
507
- * The new language that was switched to
552
+ * The channelGroupId that might need authorization.
508
553
  */
509
- language: string;
510
- }
511
- interface ChannelSwitchContext {
554
+ channelGroupId?: string;
512
555
  /**
513
- * The new channel id that was switched to
556
+ * The channelId that might need authorization.
514
557
  */
515
- channelId: string;
558
+ channelId?: string;
516
559
  }
517
- interface VolumeState {
518
- /**
519
- * Wether the audio is muted
520
- */
521
- isMuted: boolean;
522
- /**
523
- * The volume level
524
- */
525
- volume: number;
560
+ interface ConnectOptions {
561
+ channelGroupId?: string;
562
+ channelId: string;
526
563
  }
527
- interface PublicVindralEvents {
528
- /**
529
- * When an error that requires action has occured
530
- *
531
- * Can be a fatal error that will unload the Vindral instance - this is indicated by `isFatal()` on the error object returning true.
532
- *
533
- * In case of a fatal error it is appropriate to indicate what the error was to the user, either by displaying the error.message or
534
- * by using the error.code() as a key to look up a localization string. To resume streaming it is required to create a new Vindral instance.
535
- */
536
- ["error"]: Readonly<VindralError>;
537
- /**
538
- * When the instance needs user input to activate audio or sometimes video playback.
539
- * Is called with an object
540
- * ```javascript
541
- * {
542
- * forAudio: boolean // true if user input is needed for audio playback
543
- * forVideo: boolean // true if user input is needed for video playback
544
- * }
545
- * ```
546
- */
547
- ["needs user input"]: NeedsUserInputContext;
548
- /**
549
- * When a timed metadata event has been triggered
550
- */
551
- ["metadata"]: Readonly<Metadata>;
552
- /**
553
- * When the playback state changes
554
- */
555
- ["playback state"]: Readonly<PlaybackState>;
556
- /**
557
- * When the connection state changes
558
- */
559
- ["connection state"]: Readonly<State>;
560
- /**
561
- * When the available rendition levels is changed
562
- */
563
- ["rendition levels"]: ReadonlyArray<RenditionLevel>;
564
- /**
565
- * When the rendition level is changed
566
- */
567
- ["rendition level"]: Readonly<RenditionLevel>;
568
- /**
569
- * When the available languages is changed
570
- */
571
- ["languages"]: ReadonlyArray<string>;
572
- /**
573
- * When the available text tracks are changed
574
- */
575
- ["text tracks"]: ReadonlyArray<string>;
576
- /**
577
- * When the available channels is changed
578
- */
579
- ["channels"]: ReadonlyArray<Channel>;
564
+ type AuthorizationTokenFactory = (context: AuthorizationContext) => string | undefined;
565
+ declare class ApiClient {
566
+ private baseUrl;
567
+ private tokenFactory?;
568
+ constructor(options: ApiClientOptions);
580
569
  /**
581
- * When a context switch state change has occured.
582
- * E.g. when a channel change has been requested, or quality is changed.
570
+ * @ignore
571
+ * Returns everything needed to setup the connection of Vindral instance.
583
572
  */
584
- ["context switch"]: Readonly<ContextSwitchState>;
573
+ connect(options: ConnectOptions): Promise<ConnectInfo>;
585
574
  /**
586
- * Emitted when a wallclock time message has been received from the server.
575
+ * Fetches information regarding a single channel.
587
576
  *
588
- * Note: This is the edge server wallclock time and thus may differ slightly
589
- * between two viewers if they are connected to different edge servers.
577
+ * @param channelId the channel to fetch
578
+ * @returns a [[Channel]] containing information about the requested channel.
590
579
  */
591
- ["server wallclock time"]: Readonly<number>;
580
+ getChannel(channelId: string): Promise<Channel>;
592
581
  /**
593
- * Is emitted during connection whether the channel is live or not.
594
- *
595
- * If the channel is not live, the Vindral instance will try to reconnect until the `reconnectHandler`
596
- * determines that no more retries should be made.
582
+ * Fetches channels within a channel group
597
583
  *
598
- * Note: If the web-sdk is instantiated at the same time as you are starting the stream it is possible
599
- * that this emits false until the started state has propagated through the system.
600
- */
601
- ["is live"]: boolean;
602
- /**
603
- * Emitted when a channel switch has been completed and the first frame of the new channel is rendered.
604
- * A string containing the channel id of the new channel is provided as an argument.
605
- */
606
- ["channel switch"]: Readonly<ChannelSwitchContext>;
607
- /**
608
- * Emitted when a language switch has been completed and the new language starts playing.
609
- */
610
- ["language switch"]: Readonly<LanguageSwitchContext>;
611
- /**
612
- * Emitted when the volume state changes.
584
+ * Note: The returned list includes inactive channels - check isLive to filter out only active channels
613
585
  *
614
- * This is triggered triggered both when the user changes the volume through the Vindral instance, but also
615
- * from external sources such as OS media shortcuts or other native UI outside of the browser.
586
+ * @param channelGroupId the channel group to fetch channels from
587
+ * @returns an array of [[Channel]] that belong to the channel group
616
588
  */
617
- ["volume state"]: Readonly<VolumeState>;
618
- ["buffer state event"]: Readonly<BufferStateEvent>;
619
- ["initialized media"]: void;
589
+ getChannels(channelGroupId: string): Promise<Channel[]>;
590
+ private getHeaders;
591
+ private getAuthToken;
592
+ private toChannels;
593
+ private toChannel;
620
594
  }
621
- declare const defaultOptions: {
622
- sizeBasedResolutionCapEnabled: boolean;
623
- pictureInPictureEnabled: boolean;
624
- abrEnabled: boolean;
625
- burstEnabled: boolean;
626
- mseEnabled: boolean;
627
- mseOpusEnabled: boolean;
628
- muted: boolean;
629
- minBufferTime: number;
630
- maxBufferTime: number;
631
- logLevel: Level;
632
- maxSize: Size;
633
- maxVideoBitRate: number;
634
- maxAudioBitRate: number;
635
- tags: string[];
636
- media: Media;
637
- poster: string | boolean;
638
- reconnectHandler: (state: ReconnectState) => Promise<boolean> | boolean;
639
- iosWakeLockEnabled: boolean;
640
- telemetryEnabled: boolean;
641
- iosMediaElementEnabled: boolean;
642
- pauseSupportEnabled: boolean;
643
- advanced: {
644
- wasmDecodingConstraint: Partial<VideoConstraint>;
645
- };
646
- videoCodecs: VideoCodec[];
647
- };
648
595
  interface AdaptivityStatistics {
649
596
  /**
650
597
  * True if adaptive bitrate (ABR) is enabled.
@@ -794,16 +741,7 @@ interface SyncModuleStatistics {
794
741
  drift: number | undefined;
795
742
  driftAdjustmentCount: number;
796
743
  timeshiftDriftAdjustmentCount: number;
797
- seekTime: number;
798
- }
799
- interface TelemetryModuleStatistics {
800
- /**
801
- * The total amount of errors being spawned. Note that some media errors can trigger
802
- * thousands of errors for a single client in a few seconds before recovering. Therefore,
803
- * consider the number of viewers with errors, not just the total amount. Also, consider the median
804
- * instead of the mean for average calculation.
805
- */
806
- errorCount: number;
744
+ seekTime: number;
807
745
  }
808
746
  interface VideoPlayerStatistics {
809
747
  renderedFrameCount: number;
@@ -890,7 +828,6 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
890
828
  #private;
891
829
  private static MAX_POOL_SIZE;
892
830
  private static INITIAL_MAX_BIT_RATE;
893
- private static PING_TIMEOUT;
894
831
  private static DISCONNECT_TIMEOUT;
895
832
  private static REMOVE_CUE_THRESHOLD;
896
833
  /**
@@ -916,6 +853,10 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
916
853
  */
917
854
  isSupported: () => boolean;
918
855
  };
856
+ readonly drm: {
857
+ setHeaders: (headers: Record<string, string>) => void;
858
+ setQueryParams: (queryParams: Record<string, string>) => void;
859
+ };
919
860
  private browser;
920
861
  private options;
921
862
  private element;
@@ -929,13 +870,11 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
929
870
  private _channels;
930
871
  private createdAt;
931
872
  private hasCalledConnect;
932
- private apiClient;
933
873
  private latestEmittedLanguages;
934
874
  private wakeLock;
935
- private cachedEdges;
936
- private shiftedEdges;
937
875
  private pool;
938
876
  private userAgentInformation;
877
+ private encryptedMediaExtensions;
939
878
  private sampleProcessingSesssions;
940
879
  private sizes;
941
880
  private isSuspended;
@@ -959,6 +898,9 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
959
898
  * [Read more about it on Apple docs](https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html)
960
899
  * for iOS-Specific Considerations. The following section is the important part:
961
900
  * On iOS devices, the audio level is always under the user's physical control. The volume property is not settable in JavaScript. Reading the volume property always returns 1.
901
+ *
902
+ * @param volume The volume to set. A floating point value between 0-1.
903
+ *
962
904
  */
963
905
  set volume(volume: number);
964
906
  /**
@@ -974,7 +916,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
974
916
  */
975
917
  get muted(): boolean;
976
918
  /**
977
- * Media (audio | video | audio+video)
919
+ * Which media type is currently being played
978
920
  */
979
921
  get media(): Media;
980
922
  /**
@@ -988,7 +930,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
988
930
  /**
989
931
  * The current connection state
990
932
  */
991
- get connectionState(): Readonly<State>;
933
+ get connectionState(): Readonly<ConnectionState>;
992
934
  /**
993
935
  * The current playback state
994
936
  */
@@ -1097,7 +1039,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1097
1039
  */
1098
1040
  set channelId(channelId: string);
1099
1041
  /**
1100
- * Max size that will be subcribed to
1042
+ * Max size that will be subscribed to
1101
1043
  */
1102
1044
  get maxSize(): Size;
1103
1045
  /**
@@ -1166,10 +1108,24 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1166
1108
  get timeSpentBuffering(): number;
1167
1109
  get timeActive(): number;
1168
1110
  get mediaElement(): HTMLMediaElement | HTMLCanvasElement;
1111
+ get audioNode(): AudioNode | undefined;
1112
+ get drmStatistics(): {
1113
+ keySystem?: string | undefined;
1114
+ licenseServerUrl?: string | undefined;
1115
+ mediaKeySystemConfiguration?: MediaKeySystemConfiguration | undefined;
1116
+ provider?: string | undefined;
1117
+ clearkeys?: Record<string, string>;
1118
+ playreadyLicenseUrl?: string;
1119
+ widevineLicenseUrl?: string;
1120
+ fairplayLicenseUrl?: string;
1121
+ fairplayCertificate?: ArrayBuffer;
1122
+ videoCodec?: string;
1123
+ audioCodec?: string;
1124
+ } | null;
1169
1125
  /**
1170
1126
  * Get active Vindral Options
1171
1127
  */
1172
- getOptions: () => Options & typeof defaultOptions;
1128
+ getOptions: () => Options;
1173
1129
  /**
1174
1130
  * Get url for fetching thumbnail. Note that fetching thumbnails only works for an active channel.
1175
1131
  */
@@ -1188,9 +1144,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1188
1144
  * Get options that can be used for CastSender
1189
1145
  */
1190
1146
  getCastOptions: () => Options;
1191
- private connectionInfo;
1192
- private estimateRTT;
1193
- private connectHandler;
1147
+ private onConnectInfo;
1194
1148
  private emitLanguagesIfChanged;
1195
1149
  private updateTextTracks;
1196
1150
  private cleanupTextTracks;
@@ -1271,6 +1225,158 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1271
1225
  private timeToFirstFrame;
1272
1226
  private willUseMediaSource;
1273
1227
  }
1228
+ interface TelemetryModuleStatistics {
1229
+ /**
1230
+ * The total amount of errors being spawned. Note that some media errors can trigger
1231
+ * thousands of errors for a single client in a few seconds before recovering. Therefore,
1232
+ * consider the number of viewers with errors, not just the total amount. Also, consider the median
1233
+ * instead of the mean for average calculation.
1234
+ */
1235
+ errorCount: number;
1236
+ }
1237
+ type ConnectionState = "connected" | "disconnected" | "connecting";
1238
+ type ContextSwitchState = "completed" | "started";
1239
+ interface ConnectionStatistics {
1240
+ /**
1241
+ * RTT (round trip time) between client and server(s).
1242
+ */
1243
+ rtt: MinMaxAverage;
1244
+ /**
1245
+ * A very rough initial estimation of minimum available bandwidth.
1246
+ */
1247
+ estimatedBandwidth: number;
1248
+ edgeUrl?: string;
1249
+ /**
1250
+ * Total number of connections that have been established since instantiation.
1251
+ */
1252
+ connectCount: number;
1253
+ /**
1254
+ * Total number of connection attempts since instantiation.
1255
+ */
1256
+ connectionAttemptCount: number;
1257
+ connectionProtocol: "vindral_ws" | "moq" | undefined;
1258
+ }
1259
+ interface LanguageSwitchContext {
1260
+ /**
1261
+ * The new language that was switched to
1262
+ */
1263
+ language: string;
1264
+ }
1265
+ interface ChannelSwitchContext {
1266
+ /**
1267
+ * The new channel id that was switched to
1268
+ */
1269
+ channelId: string;
1270
+ }
1271
+ interface VolumeState {
1272
+ /**
1273
+ * Wether the audio is muted
1274
+ */
1275
+ isMuted: boolean;
1276
+ /**
1277
+ * The volume level
1278
+ */
1279
+ volume: number;
1280
+ }
1281
+ interface PublicVindralEvents {
1282
+ /**
1283
+ * When an error that requires action has occured
1284
+ *
1285
+ * Can be a fatal error that will unload the Vindral instance - this is indicated by `isFatal()` on the error object returning true.
1286
+ *
1287
+ * In case of a fatal error it is appropriate to indicate what the error was to the user, either by displaying the error.message or
1288
+ * by using the error.code() as a key to look up a localization string. To resume streaming it is required to create a new Vindral instance.
1289
+ */
1290
+ ["error"]: Readonly<VindralError>;
1291
+ /**
1292
+ * When the instance needs user input to activate audio or sometimes video playback.
1293
+ * Is called with an object
1294
+ * ```javascript
1295
+ * {
1296
+ * forAudio: boolean // true if user input is needed for audio playback
1297
+ * forVideo: boolean // true if user input is needed for video playback
1298
+ * }
1299
+ * ```
1300
+ */
1301
+ ["needs user input"]: NeedsUserInputContext;
1302
+ /**
1303
+ * When a timed metadata event has been triggered
1304
+ */
1305
+ ["metadata"]: Readonly<Metadata>;
1306
+ /**
1307
+ * When the playback state changes
1308
+ */
1309
+ ["playback state"]: Readonly<PlaybackState>;
1310
+ /**
1311
+ * When the connection state changes
1312
+ */
1313
+ ["connection state"]: Readonly<ConnectionState>;
1314
+ /**
1315
+ * When the available rendition levels is changed
1316
+ */
1317
+ ["rendition levels"]: ReadonlyArray<RenditionLevel>;
1318
+ /**
1319
+ * When the rendition level is changed
1320
+ */
1321
+ ["rendition level"]: Readonly<RenditionLevel>;
1322
+ /**
1323
+ * When the available languages is changed
1324
+ */
1325
+ ["languages"]: ReadonlyArray<string>;
1326
+ /**
1327
+ * When the available text tracks are changed
1328
+ */
1329
+ ["text tracks"]: ReadonlyArray<string>;
1330
+ /**
1331
+ * When the available channels is changed
1332
+ */
1333
+ ["channels"]: ReadonlyArray<Channel>;
1334
+ /**
1335
+ * When a context switch state change has occured.
1336
+ * E.g. when a channel change has been requested, or quality is changed.
1337
+ */
1338
+ ["context switch"]: Readonly<ContextSwitchState>;
1339
+ /**
1340
+ * Emitted when a wallclock time message has been received from the server.
1341
+ *
1342
+ * Note: This is the edge server wallclock time and thus may differ slightly
1343
+ * between two viewers if they are connected to different edge servers.
1344
+ */
1345
+ ["server wallclock time"]: Readonly<number>;
1346
+ /**
1347
+ * Is emitted during connection whether the channel is live or not.
1348
+ *
1349
+ * If the channel is not live, the Vindral instance will try to reconnect until the `reconnectHandler`
1350
+ * determines that no more retries should be made.
1351
+ *
1352
+ * Note: If the web-sdk is instantiated at the same time as you are starting the stream it is possible
1353
+ * that this emits false until the started state has propagated through the system.
1354
+ */
1355
+ ["is live"]: boolean;
1356
+ /**
1357
+ * Emitted when a channel switch has been completed and the first frame of the new channel is rendered.
1358
+ * A string containing the channel id of the new channel is provided as an argument.
1359
+ */
1360
+ ["channel switch"]: Readonly<ChannelSwitchContext>;
1361
+ /**
1362
+ * Emmitted when a channel switch fails.
1363
+ * A string containing the channel id of the current channel is provided as an argument.
1364
+ */
1365
+ ["channel switch failed"]: Readonly<ChannelSwitchContext>;
1366
+ /**
1367
+ * Emitted when a language switch has been completed and the new language starts playing.
1368
+ */
1369
+ ["language switch"]: Readonly<LanguageSwitchContext>;
1370
+ /**
1371
+ * Emitted when the volume state changes.
1372
+ *
1373
+ * This is triggered triggered both when the user changes the volume through the Vindral instance, but also
1374
+ * from external sources such as OS media shortcuts or other native UI outside of the browser.
1375
+ */
1376
+ ["volume state"]: Readonly<VolumeState>;
1377
+ ["buffer state event"]: Readonly<BufferStateEvent>;
1378
+ ["initialized media"]: void;
1379
+ }
1274
1380
  declare abstract class VindralButton extends HTMLElement {
1275
1381
  #private;
1276
1382
  static observedAttributes: string[];
@@ -1283,7 +1389,7 @@ declare abstract class VindralButton extends HTMLElement {
1283
1389
  attributeChangedCallback(name: string, _old: string, value: string): void;
1284
1390
  protected abstract handleClick(e: Event): void;
1285
1391
  }
1286
- declare class AirPlayButton extends VindralButton {
1392
+ export declare class AirPlayButton extends VindralButton {
1287
1393
  #private;
1288
1394
  static observedAttributes: string[];
1289
1395
  constructor();
@@ -1294,14 +1400,23 @@ declare class AirPlayButton extends VindralButton {
1294
1400
  get isAirPlaying(): boolean;
1295
1401
  protected handleClick(_: Event): void;
1296
1402
  }
1297
- declare class BufferingOverlay extends HTMLElement {
1403
+ declare class BufferingIcon extends HTMLElement {
1298
1404
  #private;
1299
1405
  static observedAttributes: "buffering"[];
1300
1406
  constructor();
1301
1407
  connectedCallback(): void;
1302
1408
  disconnectedCallback(): void;
1303
1409
  }
1304
- declare class CastButton extends VindralButton {
1410
+ export declare class BufferingOverlay extends HTMLElement {
1411
+ #private;
1412
+ static observedAttributes: readonly [
1413
+ "buffering"
1414
+ ];
1415
+ constructor();
1416
+ connectedCallback(): void;
1417
+ disconnectedCallback(): void;
1418
+ }
1419
+ export declare class CastButton extends VindralButton {
1305
1420
  #private;
1306
1421
  static observedAttributes: string[];
1307
1422
  constructor();
@@ -1313,23 +1428,35 @@ declare class CastButton extends VindralButton {
1313
1428
  protected handleClick(_: Event): void;
1314
1429
  }
1315
1430
  type CastOverlayAttributes = (typeof CastOverlay.observedAttributes)[number];
1316
- declare class CastOverlay extends HTMLElement {
1431
+ export declare class CastOverlay extends HTMLElement {
1317
1432
  #private;
1318
- static observedAttributes: ("is-casting" | "cast-receiver-name")[];
1433
+ static observedAttributes: readonly [
1434
+ "is-casting",
1435
+ "cast-receiver-name"
1436
+ ];
1319
1437
  constructor();
1320
1438
  connectedCallback(): void;
1321
1439
  disconnectedCallback(): void;
1322
1440
  attributeChangedCallback(name: CastOverlayAttributes, oldValue: string, newValue: string): void;
1323
1441
  }
1324
- declare class ChannelGrid extends HTMLElement {
1442
+ export declare class ChannelGrid extends HTMLElement {
1325
1443
  #private;
1326
- static observedAttributes: string[];
1444
+ static observedAttributes: readonly [
1445
+ "channels",
1446
+ "channel-id",
1447
+ "authentication-token",
1448
+ "mode",
1449
+ "hidden"
1450
+ ];
1327
1451
  constructor();
1328
1452
  connectedCallback(): void;
1329
1453
  disconnectedCallback(): void;
1330
- attributeChangedCallback(name: string, _old: string, value: string): void;
1454
+ attributeChangedCallback(name: string, old: string, value: string): void;
1455
+ get keysUsed(): string[];
1456
+ handleEvent: (event: Event) => void;
1457
+ focus(): void;
1331
1458
  }
1332
- declare class ChannelGridButton extends VindralButton {
1459
+ export declare class ChannelGridButton extends VindralButton {
1333
1460
  #private;
1334
1461
  static observedAttributes: string[];
1335
1462
  constructor();
@@ -1338,26 +1465,100 @@ declare class ChannelGridButton extends VindralButton {
1338
1465
  attributeChangedCallback(name: string, old: string, value: string): void;
1339
1466
  enable(): void;
1340
1467
  protected handleClick(_: MouseEvent): void;
1468
+ get isOpen(): boolean;
1341
1469
  }
1342
- declare class ChannelGridItem extends HTMLElement {
1470
+ export declare class ChannelGridItem extends HTMLElement {
1343
1471
  #private;
1344
1472
  lastThumbnailUpdate?: number;
1345
- static observedAttributes: string[];
1473
+ static observedAttributes: readonly [
1474
+ "url",
1475
+ "title",
1476
+ "offline",
1477
+ "authentication-token",
1478
+ "visible"
1479
+ ];
1346
1480
  constructor();
1347
1481
  attributeChangedCallback(name: string, old: string, value: string): void;
1348
1482
  updateThumbnail(): void;
1349
1483
  }
1350
- declare class ControlBar extends HTMLElement {
1484
+ export declare class ControlBar extends HTMLElement {
1351
1485
  static observedAttributes: never[];
1352
1486
  constructor();
1353
1487
  connectedCallback(): void;
1354
1488
  disconnectedCallback(): void;
1355
1489
  }
1490
+ interface AirPlaySenderEvents {
1491
+ /**
1492
+ * When airplay targets are available.
1493
+ */
1494
+ ["available"]: void;
1495
+ /**
1496
+ * When a connection has been established with an airplay target.
1497
+ */
1498
+ ["connected"]: void;
1499
+ /**
1500
+ * When the airplay target has lost or stopped a connection.
1501
+ */
1502
+ ["disconnected"]: void;
1503
+ }
1504
+ interface AirPlayConfig {
1505
+ /**
1506
+ * URL to use when connecting to the stream.
1507
+ */
1508
+ url: string;
1509
+ /**
1510
+ * Channel ID to connect to.
1511
+ */
1512
+ channelId: string;
1513
+ /**
1514
+ * A container to attach the video element in. This should be the same container that the vindral video element is attached to.
1515
+ */
1516
+ container: HTMLElement;
1517
+ /**
1518
+ * An authentication token to provide to the server when connecting - only needed for channels with authentication enabled
1519
+ * Note: If not supplied when needed, an "Authentication Failed" error will be raised.
1520
+ */
1521
+ authenticationToken?: string;
1522
+ }
1523
+ declare class AirPlaySender extends Emitter<AirPlaySenderEvents> {
1524
+ private config;
1525
+ private hlsUrl;
1526
+ private element;
1527
+ private connectingTimeout?;
1528
+ constructor(config: AirPlayConfig);
1529
+ /**
1530
+ * True if the instance is casting right now.
1531
+ */
1532
+ get casting(): boolean;
1533
+ /**
1534
+ * Set the current channelId.
1535
+ */
1536
+ set channelId(channelId: string);
1537
+ /**
1538
+ * Update authentication token on an already established and authenticated connection.
1539
+ */
1540
+ updateAuthenticationToken: (_token: string) => void;
1541
+ /**
1542
+ * Fully unloads the instance. This disconnects the current listeners.
1543
+ */
1544
+ unload: () => void;
1545
+ /**
1546
+ * Show the AirPlay picker.
1547
+ */
1548
+ showPlaybackTargetPicker(): void;
1549
+ /**
1550
+ * Returns if AirPlay is supported.
1551
+ */
1552
+ static isAirPlaySupported(): boolean;
1553
+ private onAirPlayAvailable;
1554
+ private onAirPlayPlaybackChanged;
1555
+ private checkHlsUrl;
1556
+ }
1356
1557
  type ControllerAttributes = (typeof Controller.observedAttributes)[number];
1357
- declare class Controller extends HTMLElement {
1558
+ export declare class Controller extends HTMLElement {
1358
1559
  #private;
1359
1560
  static observedAttributes: readonly [
1360
- ...("language" | "channels" | "buffering" | "paused" | "volume" | "picture-in-picture" | "muted" | "languages" | "media" | "user-interacting" | "is-casting" | "cast-available" | "cast-receiver-name" | "ui-locked" | "is-fullscreen" | "is-fullscreen-fallback" | "rendition-levels" | "rendition-level" | "max-video-bit-rate" | "channel-id" | "channel-group-id" | "airplay-available" | "is-airplaying" | "text-tracks" | "text-track" | "needs-user-input" | "authentication-token" | "cast" | "airplay" | "pip" | "fullscreen")[],
1561
+ ...("language" | "channels" | "buffering" | "paused" | "volume" | "muted" | "user-interacting" | "is-casting" | "cast-available" | "cast-receiver-name" | "ui-locked" | "hide-ui-on-pause" | "is-fullscreen" | "is-fullscreen-fallback" | "rendition-levels" | "rendition-level" | "max-video-bit-rate" | "channel-id" | "channel-group-id" | "pip-available" | "is-pip" | "airplay-available" | "is-airplaying" | "media" | "languages" | "text-tracks" | "text-track" | "needs-user-input-video" | "needs-user-input-audio" | "authentication-token" | "volume-level" | "cast" | "airplay" | "pip" | "fullscreen" | "vu-meter" | "poster-src")[],
1361
1562
  "url",
1362
1563
  "edge-url",
1363
1564
  "target-buffer-time",
@@ -1379,7 +1580,13 @@ declare class Controller extends HTMLElement {
1379
1580
  "telemetry-enabled",
1380
1581
  "video-codecs",
1381
1582
  "poster",
1382
- "auto-instance-enabled"
1583
+ "advanced",
1584
+ "drm-headers",
1585
+ "drm-queryparams",
1586
+ "webtransport-enabled",
1587
+ "reconnect-retries",
1588
+ "auto-instance-enabled",
1589
+ "language"
1383
1590
  ];
1384
1591
  constructor();
1385
1592
  connectedCallback(): Promise<void>;
@@ -1389,9 +1596,10 @@ declare class Controller extends HTMLElement {
1389
1596
  connectListener(component: HTMLElement): void;
1390
1597
  disconnectListener(component: HTMLElement): void;
1391
1598
  get instance(): Vindral | undefined;
1599
+ get airPlay(): AirPlaySender | undefined;
1392
1600
  connect(): void;
1393
1601
  }
1394
- declare class FullscreenButton extends VindralButton {
1602
+ export declare class FullscreenButton extends VindralButton {
1395
1603
  static observedAttributes: string[];
1396
1604
  constructor();
1397
1605
  connectedCallback(): void;
@@ -1409,27 +1617,32 @@ declare class VindralMenuButton extends VindralButton {
1409
1617
  set listbox(listbox: HTMLElement);
1410
1618
  set listboxSlot(listboxSlot: HTMLElement);
1411
1619
  enable(): void;
1620
+ hide(): void;
1412
1621
  protected handleClick(e: Event): void;
1413
1622
  }
1414
- declare class LanguageMenu extends VindralMenuButton {
1623
+ export declare class LanguageMenu extends VindralMenuButton {
1415
1624
  #private;
1416
1625
  static observedAttributes: string[];
1417
1626
  constructor();
1418
1627
  connectedCallback(): void;
1419
1628
  attributeChangedCallback(name: string, old: string, value: string): void;
1420
1629
  }
1421
- declare class LanguageMenuList extends HTMLElement {
1630
+ export declare class LanguageMenuList extends HTMLElement {
1422
1631
  #private;
1423
1632
  static observedAttributes: ("language" | "languages" | "text-tracks" | "text-track")[];
1424
1633
  constructor();
1425
1634
  connectedCallback(): void;
1635
+ disconnectedCallback(): void;
1426
1636
  attributeChangedCallback(name: string, old: string, value: string): void;
1427
1637
  private set languages(value);
1428
1638
  private set textTracks(value);
1429
1639
  private set language(value);
1430
1640
  private set textTrack(value);
1641
+ get keysUsed(): string[];
1642
+ handleEvent: (event: Event) => void;
1643
+ focus(): void;
1431
1644
  }
1432
- declare class MuteButton extends VindralButton {
1645
+ export declare class MuteButton extends VindralButton {
1433
1646
  static observedAttributes: string[];
1434
1647
  constructor();
1435
1648
  connectedCallback(): void;
@@ -1439,7 +1652,7 @@ declare class MuteButton extends VindralButton {
1439
1652
  get muted(): boolean;
1440
1653
  protected handleClick(_: Event): void;
1441
1654
  }
1442
- declare class PictureInPictureButton extends VindralButton {
1655
+ export declare class PictureInPictureButton extends VindralButton {
1443
1656
  static observedAttributes: string[];
1444
1657
  constructor();
1445
1658
  connectedCallback(): void;
@@ -1449,7 +1662,7 @@ declare class PictureInPictureButton extends VindralButton {
1449
1662
  get isPictureInPictureActive(): boolean;
1450
1663
  protected handleClick(_: Event): void;
1451
1664
  }
1452
- declare class PlayButton extends VindralButton {
1665
+ export declare class PlayButton extends VindralButton {
1453
1666
  static observedAttributes: string[];
1454
1667
  constructor();
1455
1668
  connectedCallback(): void;
@@ -1459,34 +1672,61 @@ declare class PlayButton extends VindralButton {
1459
1672
  get paused(): boolean;
1460
1673
  protected handleClick(_: Event): void;
1461
1674
  }
1462
- declare class Player extends HTMLElement {
1675
+ export declare class Player extends HTMLElement {
1463
1676
  #private;
1464
- static observedAttributes: ("title" | "poster" | "language" | "channels" | "url" | "buffering" | "paused" | "volume" | "picture-in-picture" | "muted" | "languages" | "offline" | "media" | "user-interacting" | "is-casting" | "cast-available" | "cast-receiver-name" | "ui-locked" | "is-fullscreen" | "is-fullscreen-fallback" | "rendition-levels" | "rendition-level" | "max-video-bit-rate" | "channel-id" | "channel-group-id" | "airplay-available" | "is-airplaying" | "text-tracks" | "text-track" | "needs-user-input" | "authentication-token" | "cast" | "airplay" | "pip" | "fullscreen" | "edge-url" | "target-buffer-time" | "cast-receiver-id" | "cast-background" | "log-level" | "max-size" | "min-buffer-time" | "max-buffer-time" | "max-audio-bit-rate" | "burst-enabled" | "mse-enabled" | "mse-opus-enabled" | "ios-background-play-enabled" | "ios-wake-lock-enabled" | "ios-media-element-enabled" | "abr-enabled" | "size-based-resolution-cap-enabled" | "telemetry-enabled" | "video-codecs" | "auto-instance-enabled")[];
1677
+ static observedAttributes: readonly ("title" | "advanced" | "poster" | "language" | "channels" | "buffering" | "paused" | "volume" | "muted" | "user-interacting" | "is-casting" | "cast-available" | "cast-receiver-name" | "ui-locked" | "hide-ui-on-pause" | "is-fullscreen" | "is-fullscreen-fallback" | "rendition-levels" | "rendition-level" | "max-video-bit-rate" | "channel-id" | "channel-group-id" | "pip-available" | "is-pip" | "airplay-available" | "is-airplaying" | "media" | "languages" | "text-tracks" | "text-track" | "needs-user-input-video" | "needs-user-input-audio" | "authentication-token" | "volume-level" | "cast" | "airplay" | "pip" | "fullscreen" | "vu-meter" | "poster-src" | "url" | "offline" | "edge-url" | "target-buffer-time" | "cast-receiver-id" | "cast-background" | "log-level" | "max-size" | "min-buffer-time" | "max-buffer-time" | "max-audio-bit-rate" | "burst-enabled" | "mse-enabled" | "mse-opus-enabled" | "ios-background-play-enabled" | "ios-wake-lock-enabled" | "ios-media-element-enabled" | "abr-enabled" | "size-based-resolution-cap-enabled" | "telemetry-enabled" | "video-codecs" | "drm-headers" | "drm-queryparams" | "webtransport-enabled" | "reconnect-retries" | "auto-instance-enabled" | "refresh-poster-enabled" | "stream-poll-enabled")[];
1465
1678
  constructor();
1466
1679
  connectedCallback(): void;
1467
1680
  disconnectedCallback(): void;
1468
- attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
1681
+ attributeChangedCallback(name: string, oldValue?: string, newValue?: string): void;
1469
1682
  get instance(): Vindral | undefined;
1683
+ get airPlay(): AirPlaySender | undefined;
1684
+ }
1685
+ type PosterOverlayAttributes = (typeof PosterOverlay.observedAttributes)[number];
1686
+ export declare class PosterOverlay extends HTMLElement {
1687
+ #private;
1688
+ static observedAttributes: readonly [
1689
+ "poster-src",
1690
+ "paused",
1691
+ "disabled",
1692
+ "intersecting"
1693
+ ];
1694
+ constructor();
1695
+ connectedCallback(): void;
1696
+ disconnectedCallback(): void;
1697
+ attributeChangedCallback(name: PosterOverlayAttributes, oldValue: string, newValue: string): void;
1698
+ get disabled(): boolean;
1699
+ set disabled(value: boolean);
1700
+ get posterSrc(): string | null;
1701
+ get paused(): boolean;
1470
1702
  }
1471
- declare class RenditionLevelsMenu extends VindralMenuButton {
1703
+ export declare class RenditionLevelsMenu extends VindralMenuButton {
1472
1704
  #private;
1473
1705
  static observedAttributes: string[];
1474
1706
  constructor();
1475
1707
  connectedCallback(): void;
1476
1708
  attributeChangedCallback(name: string, old: string, value: string): void;
1477
1709
  }
1478
- declare class RenditionLevelsMenuList extends HTMLElement {
1710
+ export declare class RenditionLevelsMenuList extends HTMLElement {
1479
1711
  #private;
1480
1712
  static observedAttributes: ("rendition-levels" | "max-video-bit-rate")[];
1481
1713
  constructor();
1482
1714
  connectedCallback(): void;
1715
+ disconnectedCallback(): void;
1483
1716
  attributeChangedCallback(name: string, old: string, value: string): void;
1484
1717
  private set list(value);
1485
1718
  private set maxVideoBitrate(value);
1719
+ get keysUsed(): string[];
1720
+ handleEvent: (event: Event) => void;
1721
+ focus(): void;
1486
1722
  }
1487
- declare class ScrollOverlay extends HTMLElement {
1723
+ export declare class ScrollOverlay extends HTMLElement {
1488
1724
  #private;
1489
- static observedAttributes: string[];
1725
+ static observedAttributes: readonly [
1726
+ "user-interacting",
1727
+ "open",
1728
+ "touch-enabled"
1729
+ ];
1490
1730
  constructor();
1491
1731
  connectedCallback(): void;
1492
1732
  disconnectedCallback(): void;
@@ -1497,35 +1737,23 @@ declare class ScrollOverlay extends HTMLElement {
1497
1737
  set visible(value: boolean);
1498
1738
  get visible(): boolean;
1499
1739
  }
1500
- declare class VindralRange extends HTMLElement {
1740
+ declare class VindralUserInputPlayOverlay extends HTMLElement {
1501
1741
  #private;
1502
1742
  static observedAttributes: string[];
1503
- range: HTMLInputElement;
1504
1743
  constructor();
1744
+ get keysUsed(): string[];
1505
1745
  connectedCallback(): void;
1506
- disconnectedCallback(): void;
1507
- attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
1508
1746
  enable(): void;
1509
1747
  disable(): void;
1510
- handleEvent(event: Event): void;
1511
- updateBar(): void;
1748
+ disconnectedCallback(): void;
1512
1749
  }
1513
- declare class VolumeRange extends VindralRange {
1750
+ declare class VindralMessage extends HTMLElement {
1514
1751
  #private;
1515
1752
  static observedAttributes: string[];
1516
1753
  constructor();
1517
1754
  connectedCallback(): void;
1518
1755
  disconnectedCallback(): void;
1519
1756
  attributeChangedCallback(name: string, old: string, value: string): void;
1520
- get volume(): string;
1521
- get muted(): boolean;
1522
- }
1523
- declare class BufferingIcon extends HTMLElement {
1524
- #private;
1525
- static observedAttributes: "buffering"[];
1526
- constructor();
1527
- connectedCallback(): void;
1528
- disconnectedCallback(): void;
1529
1757
  }
1530
1758
  declare class VindralPlayOverlay extends HTMLElement {
1531
1759
  #private;
@@ -1533,26 +1761,39 @@ declare class VindralPlayOverlay extends HTMLElement {
1533
1761
  constructor();
1534
1762
  connectedCallback(): void;
1535
1763
  disconnectedCallback(): void;
1764
+ attributeChangedCallback(name: string, old: string | null, value: string | null): void;
1536
1765
  }
1537
- declare class VindralUserInputPlayOverlay extends VindralPlayOverlay {
1766
+ declare class VindralRange extends HTMLElement {
1538
1767
  #private;
1539
1768
  static observedAttributes: string[];
1769
+ range: HTMLInputElement;
1540
1770
  constructor();
1541
1771
  connectedCallback(): void;
1542
1772
  disconnectedCallback(): void;
1773
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
1774
+ enable(): void;
1775
+ disable(): void;
1776
+ handleEvent(event: Event): void;
1777
+ updateBar(): void;
1778
+ get keysUsed(): string[];
1543
1779
  }
1544
- declare class VindralMessage extends HTMLElement {
1780
+ export declare class VolumeRange extends VindralRange {
1545
1781
  #private;
1546
1782
  static observedAttributes: string[];
1547
1783
  constructor();
1548
1784
  connectedCallback(): void;
1549
1785
  disconnectedCallback(): void;
1550
1786
  attributeChangedCallback(name: string, old: string, value: string): void;
1787
+ get volume(): string;
1788
+ get muted(): boolean;
1551
1789
  }
1552
1790
  /**
1553
- * Register all custom elements for the Vindral player
1791
+ * Register custom elements for the Vindral player
1554
1792
  */
1555
1793
  export declare function registerComponents(): void;
1794
+ /**
1795
+ * @ignore
1796
+ */
1556
1797
  export declare interface VindralHTMLElementTagNameMap {
1557
1798
  "vindral-controller": Controller;
1558
1799
  "vindral-control-bar": ControlBar;
@@ -1577,6 +1818,7 @@ export declare interface VindralHTMLElementTagNameMap {
1577
1818
  "vindral-language-menu-list": LanguageMenuList;
1578
1819
  "vindral-message": VindralMessage;
1579
1820
  "vindral-volume-range": VolumeRange;
1821
+ "vindral-poster-overlay": PosterOverlay;
1580
1822
  "vindral-player": Player;
1581
1823
  }
1582
1824