@theoplayer/extended 5.7.0 → 5.9.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.
- package/THEOplayer.chromeless.d.ts +1 -1
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.d.ts +948 -920
- package/THEOplayer.d.ts +1 -1
- package/THEOplayer.js +3 -3
- package/THEOplayer.transmux.asmjs.js +3 -3
- package/THEOplayer.transmux.js +3 -3
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.e.js +3 -3
- package/theoplayer.p.js +3 -3
- package/ui.css +1 -1
package/THEOplayer.common.d.ts
CHANGED
|
@@ -2482,1409 +2482,1419 @@ interface HlsPlaybackConfiguration {
|
|
|
2482
2482
|
}
|
|
2483
2483
|
|
|
2484
2484
|
/**
|
|
2485
|
-
*
|
|
2486
|
-
*
|
|
2487
|
-
* @remarks
|
|
2488
|
-
* <br/> - Can be a string value representing the URL of a media resource, a {@link TypedSource} or a {@link VerizonMediaSource}.
|
|
2485
|
+
* Fired when a text track cue is entered.
|
|
2489
2486
|
*
|
|
2490
2487
|
* @public
|
|
2491
2488
|
*/
|
|
2492
|
-
|
|
2489
|
+
interface TextTrackCueEnterEvent extends Event<'enter'> {
|
|
2490
|
+
/**
|
|
2491
|
+
* The text track cue that is entered.
|
|
2492
|
+
*/
|
|
2493
|
+
readonly cue: TextTrackCue;
|
|
2494
|
+
}
|
|
2493
2495
|
/**
|
|
2494
|
-
*
|
|
2495
|
-
*
|
|
2496
|
-
* @remarks
|
|
2497
|
-
* <br/> - The order of sources when using a list determines their priority when attempting playback.
|
|
2496
|
+
* Fired when a text track cue is exited.
|
|
2498
2497
|
*
|
|
2499
2498
|
* @public
|
|
2500
2499
|
*/
|
|
2501
|
-
|
|
2500
|
+
interface TextTrackCueExitEvent extends Event<'exit'> {
|
|
2501
|
+
/**
|
|
2502
|
+
* The text track cue that is exited.
|
|
2503
|
+
*/
|
|
2504
|
+
readonly cue: TextTrackCue;
|
|
2505
|
+
}
|
|
2502
2506
|
/**
|
|
2503
|
-
*
|
|
2504
|
-
* <br/> - `'anonymous'`: CORS requests will have the credentials flag set to 'same-origin'.
|
|
2505
|
-
* <br/> - `'use-credentials'`: CORS requests will have the credentials flag set to 'include'.
|
|
2506
|
-
* <br/> - `''`: Setting the empty string is the same as `'anonymous'`
|
|
2507
|
-
*
|
|
2508
|
-
* @remarks
|
|
2509
|
-
* <br/> - See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes | The crossorigin attribute: Requesting CORS access to content}
|
|
2507
|
+
* Fired when a text track cue is updated.
|
|
2510
2508
|
*
|
|
2511
2509
|
* @public
|
|
2512
2510
|
*/
|
|
2513
|
-
|
|
2511
|
+
interface TextTrackCueUpdateEvent extends Event<'update'> {
|
|
2512
|
+
/**
|
|
2513
|
+
* The text track cue that is updated.
|
|
2514
|
+
*/
|
|
2515
|
+
readonly cue: TextTrackCue;
|
|
2516
|
+
}
|
|
2514
2517
|
/**
|
|
2515
|
-
*
|
|
2518
|
+
* The events fired by the {@link TextTrackCue}.
|
|
2516
2519
|
*
|
|
2517
2520
|
* @public
|
|
2518
2521
|
*/
|
|
2519
|
-
interface
|
|
2520
|
-
/**
|
|
2521
|
-
* List of {@link AdDescription}s to be queued for playback.
|
|
2522
|
-
*/
|
|
2523
|
-
ads?: AdDescription[];
|
|
2522
|
+
interface TextTrackCueEventMap {
|
|
2524
2523
|
/**
|
|
2525
|
-
*
|
|
2526
|
-
*
|
|
2527
|
-
* @remarks
|
|
2528
|
-
* <br/> - A blocked player is not usable anymore. This has the same effect as invoking {@link ChromelessPlayer.destroy}.
|
|
2529
|
-
*
|
|
2530
|
-
* @defaultValue `false`
|
|
2524
|
+
* Fired when the cue is entered.
|
|
2531
2525
|
*/
|
|
2532
|
-
|
|
2526
|
+
enter: TextTrackCueEnterEvent;
|
|
2533
2527
|
/**
|
|
2534
|
-
*
|
|
2535
|
-
*
|
|
2536
|
-
* @remarks
|
|
2537
|
-
* <br/> - This setting is strictly after - e.g. setting `playAdsAfterTime` to 15 will cause the player to ignore an ad break scheduled to play at 15s.
|
|
2538
|
-
*
|
|
2528
|
+
* Fired when the cue is exited.
|
|
2539
2529
|
*/
|
|
2540
|
-
|
|
2530
|
+
exit: TextTrackCueExitEvent;
|
|
2541
2531
|
/**
|
|
2542
|
-
*
|
|
2532
|
+
* Fired when the cue is updated.
|
|
2543
2533
|
*/
|
|
2544
|
-
|
|
2534
|
+
update: TextTrackCueUpdateEvent;
|
|
2535
|
+
}
|
|
2536
|
+
/**
|
|
2537
|
+
* Represents a cue of a text track.
|
|
2538
|
+
*
|
|
2539
|
+
* @public
|
|
2540
|
+
*/
|
|
2541
|
+
interface TextTrackCue extends EventDispatcher<TextTrackCueEventMap> {
|
|
2545
2542
|
/**
|
|
2546
|
-
*
|
|
2547
|
-
* @deprecated Superseded by {@link SourceConfiguration.contentProtection}.
|
|
2543
|
+
* The text track of the cue.
|
|
2548
2544
|
*/
|
|
2549
|
-
|
|
2545
|
+
track: TextTrack;
|
|
2550
2546
|
/**
|
|
2551
|
-
* The
|
|
2552
|
-
*
|
|
2553
|
-
* @remarks
|
|
2554
|
-
* <br/> - An empty string (`''`) clears the current poster.
|
|
2555
|
-
* <br/> - This poster has priority over {@link ChromelessPlayer.poster}.
|
|
2547
|
+
* The identifier of the cue.
|
|
2556
2548
|
*/
|
|
2557
|
-
|
|
2549
|
+
id: string;
|
|
2558
2550
|
/**
|
|
2559
|
-
*
|
|
2551
|
+
* A unique identifier of the text track cue.
|
|
2560
2552
|
*
|
|
2561
2553
|
* @remarks
|
|
2562
|
-
* <br/> -
|
|
2554
|
+
* <br/> - This identifier is unique across text track cues of a THEOplayer instance and can be used to distinguish between cues.
|
|
2555
|
+
* <br/> - This identifier is a randomly generated number.
|
|
2563
2556
|
*/
|
|
2564
|
-
|
|
2557
|
+
readonly uid: number;
|
|
2565
2558
|
/**
|
|
2566
|
-
*
|
|
2559
|
+
* The playback position at which the cue becomes active, in seconds.
|
|
2567
2560
|
*/
|
|
2568
|
-
|
|
2561
|
+
startTime: number;
|
|
2569
2562
|
/**
|
|
2570
|
-
*
|
|
2563
|
+
* The playback position at which the cue becomes inactive, in seconds.
|
|
2571
2564
|
*/
|
|
2572
|
-
|
|
2565
|
+
endTime: number;
|
|
2573
2566
|
/**
|
|
2574
|
-
* The
|
|
2567
|
+
* The content of the cue.
|
|
2575
2568
|
*
|
|
2576
2569
|
* @remarks
|
|
2577
|
-
*
|
|
2578
|
-
*
|
|
2579
|
-
*
|
|
2570
|
+
* The content differs depending on the {@link TextTrackCue.track}'s {@link TextTrack."type" | type }:
|
|
2571
|
+
* <br/> - `'emsg'`: Content is a Uint8Array representing the binary message data from the `emsg` box.
|
|
2572
|
+
* <br/> - `'eventstream'`: Content is the value of the `messageData` attribute which was specified in the manifest.
|
|
2573
|
+
* <br/> - `'ttml'`: Content is an intermediate TTML document’s body element. This is a view of a TTML document where all nodes in the document are active during the cue’s startTime and endTime. As a result, all begin, dur and end properties have been removed. TTML Styles, Regions and Metadata are stored in cue.styles, cue.regions, cue.metadata respectively. Combining those properties with the given content should suffice to render a TTML cue.
|
|
2574
|
+
* <br/> - `'webvtt'`: Content is the cue text in raw unparsed form.
|
|
2580
2575
|
*/
|
|
2581
|
-
|
|
2576
|
+
content: any;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
/**
|
|
2580
|
+
* List of text track cues.
|
|
2581
|
+
*
|
|
2582
|
+
* @public
|
|
2583
|
+
*/
|
|
2584
|
+
interface TextTrackCueList extends ReadonlyArray<TextTrackCue> {
|
|
2582
2585
|
/**
|
|
2583
|
-
* The
|
|
2584
|
-
*
|
|
2585
|
-
* @remarks
|
|
2586
|
-
* <br/> - The time server should return time in ISO-8601 format.
|
|
2587
|
-
* <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.
|
|
2588
|
-
* <br/> - All sources will use the time server. Alternatively, for one source use {@link BaseSource.timeServer}.
|
|
2586
|
+
* The number of text track cues in the list.
|
|
2589
2587
|
*/
|
|
2590
|
-
|
|
2588
|
+
readonly length: number;
|
|
2591
2589
|
/**
|
|
2592
|
-
*
|
|
2590
|
+
* Return the text track cue at the requested index in the list.
|
|
2593
2591
|
*
|
|
2594
|
-
* @
|
|
2595
|
-
*
|
|
2592
|
+
* @param index - A `number` representing the index of a text track cue in the list.
|
|
2593
|
+
* @returns The text track cue with index `index` in the list.
|
|
2596
2594
|
*/
|
|
2597
|
-
|
|
2595
|
+
item(index: number): TextTrackCue;
|
|
2598
2596
|
/**
|
|
2599
|
-
*
|
|
2600
|
-
*
|
|
2601
|
-
* @deprecated Do not use this feature without consulting THEO Technologies.
|
|
2597
|
+
* Index signature to get the text track cue at the requested index in the list.
|
|
2602
2598
|
*/
|
|
2603
|
-
|
|
2599
|
+
readonly [index: number]: TextTrackCue;
|
|
2604
2600
|
}
|
|
2601
|
+
|
|
2605
2602
|
/**
|
|
2606
|
-
*
|
|
2603
|
+
* Fired when a new track has been added to this list.
|
|
2607
2604
|
*
|
|
2608
2605
|
* @public
|
|
2609
2606
|
*/
|
|
2610
|
-
interface
|
|
2607
|
+
interface AddTrackEvent extends Event<'addtrack'> {
|
|
2611
2608
|
/**
|
|
2612
|
-
*
|
|
2613
|
-
*
|
|
2614
|
-
* @remarks
|
|
2615
|
-
* <br/> - Multiple media sources should be used to increase platform compatibility. See examples below for important use cases.
|
|
2616
|
-
* <br/> - The player will try each source in the provided order.
|
|
2617
|
-
*
|
|
2618
|
-
* @example
|
|
2619
|
-
* In this example, the player will first try to play the DASH source.
|
|
2620
|
-
* This might fail if the browser does not support the {@link https://www.widevine.com/ | Widevine} or {@link https://www.microsoft.com/playready/ | PlayReady} CDM, for example on Safari.
|
|
2621
|
-
* In that case, the player will try to play the HLS source instead.
|
|
2622
|
-
*
|
|
2623
|
-
* ```
|
|
2624
|
-
* [{
|
|
2625
|
-
* src: 'dash-source-with-drm.mpd'
|
|
2626
|
-
* contentProtection: {
|
|
2627
|
-
* widevine: {
|
|
2628
|
-
* licenseAcquisitionURL: 'https://license.company.com/wv'
|
|
2629
|
-
* },
|
|
2630
|
-
* playready: {
|
|
2631
|
-
* licenseAcquisitionURL: 'https://license.company.com/pr'
|
|
2632
|
-
* }
|
|
2633
|
-
* }
|
|
2634
|
-
* },{
|
|
2635
|
-
* src: 'hls-source-with-drm.m3u8',
|
|
2636
|
-
* contentProtection: {
|
|
2637
|
-
* fairplay: {
|
|
2638
|
-
* certificateURL: 'https://license.company.com/fp'
|
|
2639
|
-
* }
|
|
2640
|
-
* }
|
|
2641
|
-
* }]
|
|
2642
|
-
* ```
|
|
2643
|
-
*
|
|
2644
|
-
* @example
|
|
2645
|
-
* In this example, the player will first try to play the DASH source.
|
|
2646
|
-
* This might fail if the browser does not support the {@link https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API | Media Source Extensions API}.
|
|
2647
|
-
* In that case, the player will try to play the MP4 source instead, though without features such as adaptive bitrate switching.
|
|
2648
|
-
*
|
|
2649
|
-
* ```
|
|
2650
|
-
* [{
|
|
2651
|
-
* src: 'source.mpd'
|
|
2652
|
-
* },{
|
|
2653
|
-
* src: 'source.mp4'
|
|
2654
|
-
* }]
|
|
2655
|
-
* ```
|
|
2609
|
+
* The track that has been added.
|
|
2656
2610
|
*/
|
|
2657
|
-
|
|
2611
|
+
readonly track: Track;
|
|
2658
2612
|
}
|
|
2659
2613
|
/**
|
|
2660
|
-
*
|
|
2614
|
+
* Fired when a track has been removed to this list.
|
|
2661
2615
|
*
|
|
2662
2616
|
* @public
|
|
2663
2617
|
*/
|
|
2664
|
-
interface
|
|
2618
|
+
interface RemoveTrackEvent extends Event<'removetrack'> {
|
|
2665
2619
|
/**
|
|
2666
|
-
*
|
|
2667
|
-
*
|
|
2668
|
-
* @remarks
|
|
2669
|
-
* <br/> - Only one text track per {@link TextTrack.kind} may be marked as default.
|
|
2670
|
-
*
|
|
2671
|
-
* @defaultValue `false`
|
|
2620
|
+
* The track that has been removed.
|
|
2672
2621
|
*/
|
|
2673
|
-
|
|
2622
|
+
readonly track: Track;
|
|
2623
|
+
}
|
|
2624
|
+
/**
|
|
2625
|
+
* Fired when a track has been changed.
|
|
2626
|
+
*
|
|
2627
|
+
* @public
|
|
2628
|
+
*/
|
|
2629
|
+
interface TrackChangeEvent extends Event<'change'> {
|
|
2674
2630
|
/**
|
|
2675
|
-
* The
|
|
2676
|
-
* <br/> - `'subtitles'`: The track provides subtitles, used to display subtitles in a video.
|
|
2677
|
-
* <br/> - `'captions'`: The track provides a translation of dialogue and sound effects (suitable for users with a hearing impairment).
|
|
2678
|
-
* <br/> - `'descriptions'`: The track provides a textual description of the video (suitable for users with a vision impairment).
|
|
2679
|
-
* <br/> - `'chapters'`: The track provides chapter titles (suitable for navigating the media resource).
|
|
2680
|
-
* <br/> - `'metadata'`: The track provides content used by scripts and is not visible for users.
|
|
2681
|
-
*
|
|
2682
|
-
* @remarks
|
|
2683
|
-
* <br/> - If an unrecognized value is provided, the player will interpret it as `'metadata'`.
|
|
2684
|
-
*
|
|
2685
|
-
* @defaultValue `'subtitles'`
|
|
2631
|
+
* The track that has changed.
|
|
2686
2632
|
*/
|
|
2687
|
-
|
|
2633
|
+
readonly track: Track;
|
|
2634
|
+
}
|
|
2635
|
+
/**
|
|
2636
|
+
* The events fired by a {@link TrackList}.
|
|
2637
|
+
*
|
|
2638
|
+
* @public
|
|
2639
|
+
*/
|
|
2640
|
+
interface TrackListEventMap {
|
|
2688
2641
|
/**
|
|
2689
|
-
*
|
|
2690
|
-
* <br/> - `'srt'`
|
|
2691
|
-
* <br/> - `'ttml'`
|
|
2692
|
-
* <br/> - `'webvtt'`
|
|
2693
|
-
* <br/> - `'emsg'`
|
|
2694
|
-
* <br/> - `'eventstream'`
|
|
2695
|
-
* <br/> - `'id3'`
|
|
2696
|
-
* <br/> - `'cea608'`
|
|
2697
|
-
* <br/> - `'daterange'`
|
|
2698
|
-
*
|
|
2699
|
-
* @defaultValue `''`
|
|
2642
|
+
* Fired when a track is added.
|
|
2700
2643
|
*/
|
|
2701
|
-
|
|
2644
|
+
addtrack: AddTrackEvent;
|
|
2702
2645
|
/**
|
|
2703
|
-
*
|
|
2646
|
+
* Fired when a track is removed.
|
|
2704
2647
|
*/
|
|
2705
|
-
|
|
2648
|
+
removetrack: RemoveTrackEvent;
|
|
2706
2649
|
/**
|
|
2707
|
-
*
|
|
2650
|
+
* Fired when a track is activated or deactivated.
|
|
2708
2651
|
*/
|
|
2709
|
-
|
|
2652
|
+
change: TrackChangeEvent;
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
/**
|
|
2656
|
+
* Fired when one or more properties of a track have been updated.
|
|
2657
|
+
*
|
|
2658
|
+
* @public
|
|
2659
|
+
*/
|
|
2660
|
+
interface TrackUpdateEvent extends Event<'update'> {
|
|
2710
2661
|
/**
|
|
2711
|
-
*
|
|
2712
|
-
*
|
|
2713
|
-
* @remarks
|
|
2714
|
-
* <br/> - This will be used as an identifier on the player API and in the UI.
|
|
2662
|
+
* The track that has been updated.
|
|
2715
2663
|
*/
|
|
2716
|
-
|
|
2664
|
+
readonly track: Track;
|
|
2665
|
+
}
|
|
2666
|
+
/**
|
|
2667
|
+
* The events fired by a {@link Track}.
|
|
2668
|
+
*
|
|
2669
|
+
* @public
|
|
2670
|
+
*/
|
|
2671
|
+
interface TrackEventMap {
|
|
2717
2672
|
/**
|
|
2718
|
-
*
|
|
2673
|
+
* Fired when a media track's {@link MediaTrack.enabled | enabled} or a text track's {@link TextTrack.mode | mode} changes.
|
|
2674
|
+
*/
|
|
2675
|
+
change: TrackChangeEvent;
|
|
2676
|
+
/**
|
|
2677
|
+
* Fired when the track updates.
|
|
2719
2678
|
*
|
|
2720
|
-
* @
|
|
2679
|
+
* @remarks
|
|
2680
|
+
* <br/> - A track might update because a change propagated from a remote player (e.g. Chromecast).
|
|
2721
2681
|
*/
|
|
2722
|
-
|
|
2682
|
+
update: TrackUpdateEvent;
|
|
2723
2683
|
}
|
|
2724
2684
|
/**
|
|
2725
|
-
* Represents
|
|
2685
|
+
* Represents a track of a media resource.
|
|
2686
|
+
*
|
|
2687
|
+
* @remarks
|
|
2688
|
+
* <br/> - A specific track type (e.g. {@link TextTrack}) will always be used.
|
|
2726
2689
|
*
|
|
2727
2690
|
* @public
|
|
2728
2691
|
*/
|
|
2729
|
-
interface
|
|
2692
|
+
interface Track extends EventDispatcher<TrackEventMap> {
|
|
2730
2693
|
/**
|
|
2731
|
-
* The
|
|
2694
|
+
* The kind of the track.
|
|
2732
2695
|
*
|
|
2733
2696
|
* @remarks
|
|
2734
|
-
* <br/> -
|
|
2697
|
+
* <br/> - The values for this property depend on the specific type of the track.
|
|
2735
2698
|
*/
|
|
2736
|
-
|
|
2699
|
+
kind: string;
|
|
2737
2700
|
/**
|
|
2738
|
-
* The
|
|
2739
|
-
*
|
|
2740
|
-
* @defaultValue `''`
|
|
2701
|
+
* The identifier of the track.
|
|
2741
2702
|
*
|
|
2742
2703
|
* @remarks
|
|
2743
|
-
* <br/> -
|
|
2704
|
+
* <br/> - This identifier can be used to distinguish between related tracks, e.g. tracks in the same list.
|
|
2744
2705
|
*/
|
|
2745
|
-
|
|
2706
|
+
id: string;
|
|
2746
2707
|
/**
|
|
2747
|
-
*
|
|
2708
|
+
* A unique identifier of the track.
|
|
2748
2709
|
*
|
|
2749
2710
|
* @remarks
|
|
2750
|
-
* <br/> -
|
|
2751
|
-
*
|
|
2752
|
-
* @defaultValue `false`
|
|
2711
|
+
* <br/> - This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks.
|
|
2712
|
+
* <br/> - This identifier is a randomly generated number.
|
|
2753
2713
|
*/
|
|
2754
|
-
|
|
2714
|
+
uid: number;
|
|
2755
2715
|
/**
|
|
2756
|
-
* The
|
|
2757
|
-
* This live point is the end of the manifest minus the provided offset.
|
|
2758
|
-
*
|
|
2759
|
-
* @remarks
|
|
2760
|
-
* <br/> - Available since v2.35.0.
|
|
2761
|
-
*
|
|
2762
|
-
* @defaultValue Three times the segment's target duration.
|
|
2716
|
+
* The label of the track.
|
|
2763
2717
|
*/
|
|
2764
|
-
|
|
2718
|
+
label: string;
|
|
2765
2719
|
/**
|
|
2766
|
-
* The
|
|
2767
|
-
*
|
|
2768
|
-
* @remarks
|
|
2769
|
-
* <br/> - Available since v2.47.0.
|
|
2770
|
-
* <br/> - The time server should return time in ISO-8601 format.
|
|
2771
|
-
* <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.
|
|
2772
|
-
* <br/> - Only this source will use the time server. Alternatively, for all source use {@link SourceConfiguration.timeServer}.
|
|
2720
|
+
* The language of the track.
|
|
2773
2721
|
*/
|
|
2774
|
-
|
|
2722
|
+
language: string;
|
|
2775
2723
|
/**
|
|
2776
|
-
*
|
|
2777
|
-
*
|
|
2778
|
-
* @defaultValue `false`
|
|
2724
|
+
* The accessibility settings of the track.
|
|
2779
2725
|
*
|
|
2780
2726
|
* @remarks
|
|
2781
|
-
* <br/> -
|
|
2727
|
+
* <br/> - For DASH: the accessibility descriptors for the corresponding AdaptationSet.
|
|
2728
|
+
* <br/> - For HLS: the CHARACTERISTICS for the corresponding #EXT-X-MEDIA tag.
|
|
2782
2729
|
*/
|
|
2783
|
-
|
|
2730
|
+
readonly accessibility: AccessibilityRole[];
|
|
2731
|
+
}
|
|
2732
|
+
/**
|
|
2733
|
+
* Possible accessibility roles.
|
|
2734
|
+
*
|
|
2735
|
+
* @public
|
|
2736
|
+
*/
|
|
2737
|
+
type AccessibilityRole = 'caption' | 'sign' | 'description' | 'enhanced audio intelligibility' | 'easy reader' | 'transcribes spoken dialog' | 'describes music and sound' | 'describes video';
|
|
2738
|
+
|
|
2739
|
+
/**
|
|
2740
|
+
* A code that indicates the type of error that has occurred.
|
|
2741
|
+
*
|
|
2742
|
+
* @public
|
|
2743
|
+
*/
|
|
2744
|
+
declare enum ErrorCode {
|
|
2784
2745
|
/**
|
|
2785
|
-
*
|
|
2786
|
-
*
|
|
2787
|
-
* @remarks
|
|
2788
|
-
* <br/> - The availability of an experimental rendering pipeline depends on the platform.
|
|
2789
|
-
* <br/> - Only use after specifically being advised to.
|
|
2790
|
-
*
|
|
2791
|
-
* @internal
|
|
2746
|
+
* The configuration provided is invalid.
|
|
2792
2747
|
*/
|
|
2793
|
-
|
|
2748
|
+
CONFIGURATION_ERROR = 1000,
|
|
2794
2749
|
/**
|
|
2795
|
-
*
|
|
2796
|
-
*
|
|
2797
|
-
* @internal
|
|
2750
|
+
* The license provided is invalid.
|
|
2798
2751
|
*/
|
|
2799
|
-
|
|
2752
|
+
LICENSE_ERROR = 2000,
|
|
2800
2753
|
/**
|
|
2801
|
-
*
|
|
2802
|
-
*
|
|
2803
|
-
* @defaultValue `false`
|
|
2804
|
-
*
|
|
2805
|
-
* @remarks
|
|
2806
|
-
* <br/> - This setting must be `true` when using Low-Latency CMAF with ABR.
|
|
2807
|
-
* <br/> - Available since v2.62.0.
|
|
2754
|
+
* The provided license does not contain the current domain.
|
|
2808
2755
|
*/
|
|
2809
|
-
|
|
2756
|
+
LICENSE_INVALID_DOMAIN = 2001,
|
|
2810
2757
|
/**
|
|
2811
|
-
*
|
|
2812
|
-
*
|
|
2813
|
-
* @defaultValue `false`
|
|
2814
|
-
*
|
|
2815
|
-
* @remarks
|
|
2816
|
-
* <br/> - Available since v2.68.0.
|
|
2817
|
-
* <br/> - Ignored for DASH streams.
|
|
2818
|
-
* <br/> - Only supported on browsers that can play HLS streams natively, will error otherwise.
|
|
2758
|
+
* The current source is not allowed in the license provided.
|
|
2819
2759
|
*/
|
|
2820
|
-
|
|
2760
|
+
LICENSE_INVALID_SOURCE = 2002,
|
|
2821
2761
|
/**
|
|
2822
|
-
* The
|
|
2823
|
-
*
|
|
2824
|
-
* @remarks
|
|
2825
|
-
* <br/> - Available since v2.79.0.
|
|
2826
|
-
* <br/> - Ignored for non-DASH streams.
|
|
2762
|
+
* The license has expired.
|
|
2827
2763
|
*/
|
|
2828
|
-
|
|
2764
|
+
LICENSE_EXPIRED = 2003,
|
|
2829
2765
|
/**
|
|
2830
|
-
* The
|
|
2831
|
-
*
|
|
2832
|
-
* @remarks
|
|
2833
|
-
* <br/> - Available since v2.82.0.
|
|
2834
|
-
* <br/> - Ignored for non-HLS streams.
|
|
2766
|
+
* The provided license does not contain the necessary feature.
|
|
2835
2767
|
*/
|
|
2836
|
-
|
|
2768
|
+
LICENSE_INVALID_FEATURE = 2004,
|
|
2837
2769
|
/**
|
|
2838
|
-
* The source
|
|
2839
|
-
*
|
|
2840
|
-
* @remarks
|
|
2841
|
-
* <br/> - Available since v3.1.0.
|
|
2842
|
-
* <br/> - Overrides {@link PlayerConfiguration.abr}.
|
|
2843
|
-
* <br/> - Used for DASH and LL-HLS streams.
|
|
2770
|
+
* The source provided is not valid.
|
|
2844
2771
|
*/
|
|
2845
|
-
|
|
2772
|
+
SOURCE_INVALID = 3000,
|
|
2846
2773
|
/**
|
|
2847
|
-
*
|
|
2848
|
-
*
|
|
2849
|
-
* @remarks
|
|
2850
|
-
* <br/> - Requires the LCEVC feature to be enabled.
|
|
2851
|
-
* <br/> - Requires the V-Nova LCEVC SDK to be loaded on the page.
|
|
2852
|
-
* <br/> - Only available for DASH and HLS streams.
|
|
2774
|
+
* The provided source is not supported.
|
|
2853
2775
|
*/
|
|
2854
|
-
|
|
2855
|
-
}
|
|
2856
|
-
/**
|
|
2857
|
-
* Represents a media resource characterized by a URL to the resource and optionally information about the resource.
|
|
2858
|
-
*
|
|
2859
|
-
* @public
|
|
2860
|
-
*/
|
|
2861
|
-
interface TypedSource extends BaseSource {
|
|
2776
|
+
SOURCE_NOT_SUPPORTED = 3001,
|
|
2862
2777
|
/**
|
|
2863
|
-
* The
|
|
2864
|
-
*
|
|
2865
|
-
* @remarks
|
|
2866
|
-
* <br/> - Required if the `ssai` property is absent.
|
|
2867
|
-
* <br/> - Available since v2.4.0.
|
|
2778
|
+
* The manifest could not be loaded.
|
|
2868
2779
|
*/
|
|
2869
|
-
|
|
2780
|
+
MANIFEST_LOAD_ERROR = 4000,
|
|
2870
2781
|
/**
|
|
2871
|
-
*
|
|
2872
|
-
* <br/> - `'application/dash+xml'`: The media resource is an MPEG-DASH stream.
|
|
2873
|
-
* <br/> - `'application/x-mpegURL'` or `'application/vnd.apple.mpegurl'`: The media resource is an HLS stream.
|
|
2874
|
-
* <br/> - `'video/mp4'`, `'video/webm'` and other formats: The media resource should use native HTML5 playback if supported by the browser.
|
|
2875
|
-
* <br/> - `'application/vnd.theo.hesp+json'`: The media resource is an HESP stream.
|
|
2782
|
+
* An Error related to Cross-origin resource sharing (CORS).
|
|
2876
2783
|
*
|
|
2877
2784
|
* @remarks
|
|
2878
|
-
* <br/> -
|
|
2785
|
+
* <br/> - See {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | Cross-Origin Resource Sharing (CORS)}.
|
|
2879
2786
|
*/
|
|
2880
|
-
|
|
2787
|
+
MANIFEST_CORS_ERROR = 4001,
|
|
2881
2788
|
/**
|
|
2882
|
-
* The
|
|
2883
|
-
*
|
|
2884
|
-
* @remarks
|
|
2885
|
-
* <br/> - Available since v2.15.0.
|
|
2789
|
+
* The manifest could not be parsed.
|
|
2886
2790
|
*/
|
|
2887
|
-
|
|
2791
|
+
MANIFEST_PARSE_ERROR = 4002,
|
|
2888
2792
|
/**
|
|
2889
|
-
* The
|
|
2890
|
-
*
|
|
2891
|
-
* @deprecated Superseded by {@link TypedSource.contentProtection}.
|
|
2793
|
+
* The media is not supported.
|
|
2892
2794
|
*/
|
|
2893
|
-
|
|
2795
|
+
MEDIA_NOT_SUPPORTED = 5000,
|
|
2894
2796
|
/**
|
|
2895
|
-
* The
|
|
2896
|
-
*
|
|
2897
|
-
* @remarks
|
|
2898
|
-
* <br/> - Available since v2.12.0.
|
|
2797
|
+
* The media could not be loaded.
|
|
2899
2798
|
*/
|
|
2900
|
-
|
|
2799
|
+
MEDIA_LOAD_ERROR = 5001,
|
|
2901
2800
|
/**
|
|
2902
|
-
*
|
|
2903
|
-
*
|
|
2904
|
-
* @internal
|
|
2801
|
+
* The media could not be decoded.
|
|
2905
2802
|
*/
|
|
2906
|
-
|
|
2907
|
-
}
|
|
2908
|
-
/**
|
|
2909
|
-
* The integration identifier of a source specific to a pre-integration, represented by a value from the following list:
|
|
2910
|
-
* <br/> - `'verizon-media'`: The source is a {@link VerizonMediaSource}
|
|
2911
|
-
* <br/> - `'mediatailor'`: The source contains the MediaTailor initialization url
|
|
2912
|
-
*
|
|
2913
|
-
* @public
|
|
2914
|
-
*/
|
|
2915
|
-
type SourceIntegrationId = 'verizon-media' | 'mediatailor';
|
|
2916
|
-
/**
|
|
2917
|
-
* The integration identifier of an analytics description, represented by a value from the following list:
|
|
2918
|
-
* <br/> - `'agama'`: The description is an {@link AgamaConfiguration}
|
|
2919
|
-
* <br/> - `'conviva'`: The description is a {@link ConvivaConfiguration}
|
|
2920
|
-
* <br/> - `'youbora'`: The description is a {@link YouboraOptions}
|
|
2921
|
-
* <br/> - `'moat'`: The description is a {@link MoatConfiguration}
|
|
2922
|
-
* <br/> - `'streamone'`: The description is a {@link StreamOneConfiguration}
|
|
2923
|
-
* <br/> - `'smartsight'`: The description is a {@link SmartSightConfiguration}
|
|
2924
|
-
*
|
|
2925
|
-
* @public
|
|
2926
|
-
*/
|
|
2927
|
-
type AnalyticsIntegrationID = 'agama' | 'conviva' | 'youbora' | 'moat' | 'streamone' | 'smartsight';
|
|
2928
|
-
/**
|
|
2929
|
-
* Describes the configuration of an analytics integration.
|
|
2930
|
-
*
|
|
2931
|
-
* @public
|
|
2932
|
-
*/
|
|
2933
|
-
interface AnalyticsDescription {
|
|
2803
|
+
MEDIA_DECODE_ERROR = 5002,
|
|
2934
2804
|
/**
|
|
2935
|
-
*
|
|
2805
|
+
* An error related to playback through AVPlayer in the iOS or tvOS SDK.
|
|
2936
2806
|
*/
|
|
2937
|
-
|
|
2938
|
-
}
|
|
2939
|
-
|
|
2940
|
-
/**
|
|
2941
|
-
* Fired when {@link RelatedContent.sources} changes.
|
|
2942
|
-
*
|
|
2943
|
-
* @public
|
|
2944
|
-
*/
|
|
2945
|
-
type RelatedChangeEvent = Event<'relatedchange'>;
|
|
2946
|
-
/**
|
|
2947
|
-
* Fired when the related content panel is shown.
|
|
2948
|
-
*
|
|
2949
|
-
* @public
|
|
2950
|
-
*/
|
|
2951
|
-
type RelatedShowEvent = Event<'show'>;
|
|
2952
|
-
/**
|
|
2953
|
-
* Fired when the related content panel is hidden.
|
|
2954
|
-
*
|
|
2955
|
-
* @public
|
|
2956
|
-
*/
|
|
2957
|
-
type RelatedHideEvent = Event<'hide'>;
|
|
2958
|
-
/**
|
|
2959
|
-
* The events fired by the {@link RelatedContent | related content API}.
|
|
2960
|
-
*
|
|
2961
|
-
* @public
|
|
2962
|
-
*/
|
|
2963
|
-
interface RelatedContentEventMap {
|
|
2807
|
+
MEDIA_AVPLAYER_ERROR = 5003,
|
|
2964
2808
|
/**
|
|
2965
|
-
*
|
|
2809
|
+
* The fetching process for the media resource was aborted by the user agent at the user's request.
|
|
2966
2810
|
*/
|
|
2967
|
-
|
|
2968
|
-
}
|
|
2969
|
-
/**
|
|
2970
|
-
* The related content API.
|
|
2971
|
-
*
|
|
2972
|
-
* @remarks
|
|
2973
|
-
* <br/> - Available since v2.14.2.
|
|
2974
|
-
*
|
|
2975
|
-
* @public
|
|
2976
|
-
*/
|
|
2977
|
-
interface RelatedContent extends EventDispatcher<RelatedContentEventMap> {
|
|
2811
|
+
MEDIA_ABORTED = 5004,
|
|
2978
2812
|
/**
|
|
2979
|
-
*
|
|
2813
|
+
* An error related to network has been detected.
|
|
2980
2814
|
*/
|
|
2981
|
-
|
|
2982
|
-
}
|
|
2983
|
-
/**
|
|
2984
|
-
* The events fired by the {@link UIRelatedContent | related content API (with ui)}.
|
|
2985
|
-
*
|
|
2986
|
-
* @public
|
|
2987
|
-
*/
|
|
2988
|
-
interface UIRelatedContentEventMap extends RelatedContentEventMap {
|
|
2815
|
+
NETWORK_ERROR = 6000,
|
|
2989
2816
|
/**
|
|
2990
|
-
*
|
|
2817
|
+
* The network has timed out.
|
|
2991
2818
|
*/
|
|
2992
|
-
|
|
2819
|
+
NETWORK_TIMEOUT = 6001,
|
|
2993
2820
|
/**
|
|
2994
|
-
*
|
|
2821
|
+
* An error related to the content protection.
|
|
2995
2822
|
*/
|
|
2996
|
-
|
|
2997
|
-
}
|
|
2998
|
-
/**
|
|
2999
|
-
* The related content UI API which can be used to toggle UI components.
|
|
3000
|
-
*
|
|
3001
|
-
* @remarks
|
|
3002
|
-
* <br/> - Available since v2.14.2.
|
|
3003
|
-
*
|
|
3004
|
-
* @public
|
|
3005
|
-
*/
|
|
3006
|
-
interface UIRelatedContent extends RelatedContent, EventDispatcher<UIRelatedContentEventMap> {
|
|
2823
|
+
CONTENT_PROTECTION_ERROR = 7000,
|
|
3007
2824
|
/**
|
|
3008
|
-
*
|
|
2825
|
+
* The DRM provided is not supported on this platform.
|
|
3009
2826
|
*/
|
|
3010
|
-
|
|
2827
|
+
CONTENT_PROTECTION_NOT_SUPPORTED = 7001,
|
|
3011
2828
|
/**
|
|
3012
|
-
*
|
|
2829
|
+
* The media is DRM protected, but no content protection configuration was provided.
|
|
3013
2830
|
*/
|
|
3014
|
-
|
|
2831
|
+
CONTENT_PROTECTION_CONFIGURATION_MISSING = 7002,
|
|
3015
2832
|
/**
|
|
3016
|
-
*
|
|
2833
|
+
* The content protection configuration is invalid.
|
|
3017
2834
|
*/
|
|
3018
|
-
|
|
2835
|
+
CONTENT_PROTECTION_CONFIGURATION_INVALID = 7003,
|
|
3019
2836
|
/**
|
|
3020
|
-
*
|
|
2837
|
+
* The DRM initialization data could not be parsed.
|
|
3021
2838
|
*/
|
|
3022
|
-
|
|
2839
|
+
CONTENT_PROTECTION_INITIALIZATION_INVALID = 7004,
|
|
3023
2840
|
/**
|
|
3024
|
-
*
|
|
2841
|
+
* The content protection's certificate could not be loaded.
|
|
3025
2842
|
*/
|
|
3026
|
-
|
|
3027
|
-
}
|
|
3028
|
-
/**
|
|
3029
|
-
* Represents a related content source.
|
|
3030
|
-
*
|
|
3031
|
-
* @remarks
|
|
3032
|
-
* <br/> - Available since v2.14.2.
|
|
3033
|
-
*
|
|
3034
|
-
* @public
|
|
3035
|
-
*/
|
|
3036
|
-
interface RelatedContentSource {
|
|
2843
|
+
CONTENT_PROTECTION_CERTIFICATE_ERROR = 7005,
|
|
3037
2844
|
/**
|
|
3038
|
-
* The
|
|
2845
|
+
* The content protection's certificate is invalid.
|
|
3039
2846
|
*/
|
|
3040
|
-
|
|
2847
|
+
CONTENT_PROTECTION_CERTIFICATE_INVALID = 7006,
|
|
3041
2848
|
/**
|
|
3042
|
-
* The
|
|
2849
|
+
* The content protection's license could not be loaded.
|
|
3043
2850
|
*/
|
|
3044
|
-
|
|
2851
|
+
CONTENT_PROTECTION_LICENSE_ERROR = 7007,
|
|
3045
2852
|
/**
|
|
3046
|
-
* The
|
|
3047
|
-
*
|
|
3048
|
-
* @remarks
|
|
3049
|
-
* <br/> - Mutually exclusive with {@link RelatedContentSource.source}.
|
|
3050
|
-
* <br/> - Required if {@link RelatedContentSource.source} is not present.
|
|
2853
|
+
* The content protection's license is invalid.
|
|
3051
2854
|
*/
|
|
3052
|
-
|
|
2855
|
+
CONTENT_PROTECTION_LICENSE_INVALID = 7008,
|
|
3053
2856
|
/**
|
|
3054
|
-
* The
|
|
3055
|
-
*
|
|
3056
|
-
* @remarks
|
|
3057
|
-
* <br/> - Mutually exclusive with {@link RelatedContentSource.link}.
|
|
3058
|
-
* <br/> - Required if {@link RelatedContentSource.link} is not present.
|
|
2857
|
+
* The content protection's key has expired.
|
|
3059
2858
|
*/
|
|
3060
|
-
|
|
2859
|
+
CONTENT_PROTECTION_KEY_EXPIRED = 7009,
|
|
3061
2860
|
/**
|
|
3062
|
-
* The
|
|
2861
|
+
* The content protection's key is missing.
|
|
3063
2862
|
*/
|
|
3064
|
-
|
|
3065
|
-
}
|
|
3066
|
-
|
|
3067
|
-
/**
|
|
3068
|
-
* Fired when a text track cue is entered.
|
|
3069
|
-
*
|
|
3070
|
-
* @public
|
|
3071
|
-
*/
|
|
3072
|
-
interface TextTrackCueEnterEvent extends Event<'enter'> {
|
|
2863
|
+
CONTENT_PROTECTION_KEY_MISSING = 7010,
|
|
3073
2864
|
/**
|
|
3074
|
-
*
|
|
2865
|
+
* All qualities require HDCP, but the current output does not fulfill HDCP requirements.
|
|
3075
2866
|
*/
|
|
3076
|
-
|
|
3077
|
-
}
|
|
3078
|
-
/**
|
|
3079
|
-
* Fired when a text track cue is exited.
|
|
3080
|
-
*
|
|
3081
|
-
* @public
|
|
3082
|
-
*/
|
|
3083
|
-
interface TextTrackCueExitEvent extends Event<'exit'> {
|
|
2867
|
+
CONTENT_PROTECTION_OUTPUT_RESTRICTED = 7011,
|
|
3084
2868
|
/**
|
|
3085
|
-
*
|
|
2869
|
+
* Something went wrong in the internal logic of the content protection system.
|
|
3086
2870
|
*/
|
|
3087
|
-
|
|
3088
|
-
}
|
|
3089
|
-
/**
|
|
3090
|
-
* Fired when a text track cue is updated.
|
|
3091
|
-
*
|
|
3092
|
-
* @public
|
|
3093
|
-
*/
|
|
3094
|
-
interface TextTrackCueUpdateEvent extends Event<'update'> {
|
|
2871
|
+
CONTENT_PROTECTION_INTERNAL_ERROR = 7012,
|
|
3095
2872
|
/**
|
|
3096
|
-
*
|
|
2873
|
+
* Loading subtitles has failed.
|
|
3097
2874
|
*/
|
|
3098
|
-
|
|
3099
|
-
}
|
|
3100
|
-
/**
|
|
3101
|
-
* The events fired by the {@link TextTrackCue}.
|
|
3102
|
-
*
|
|
3103
|
-
* @public
|
|
3104
|
-
*/
|
|
3105
|
-
interface TextTrackCueEventMap {
|
|
2875
|
+
SUBTITLE_LOAD_ERROR = 8000,
|
|
3106
2876
|
/**
|
|
3107
|
-
*
|
|
2877
|
+
* Loading subtitles has failed due to CORS.
|
|
2878
|
+
*
|
|
2879
|
+
* @remarks
|
|
2880
|
+
* <br/> - See {@link https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | Cross-Origin Resource Sharing (CORS)}.
|
|
3108
2881
|
*/
|
|
3109
|
-
|
|
2882
|
+
SUBTITLE_CORS_ERROR = 8001,
|
|
3110
2883
|
/**
|
|
3111
|
-
*
|
|
2884
|
+
* Parsing subtitles has failed.
|
|
3112
2885
|
*/
|
|
3113
|
-
|
|
2886
|
+
SUBTITLE_PARSE_ERROR = 8002,
|
|
3114
2887
|
/**
|
|
3115
|
-
*
|
|
2888
|
+
* This error occurs when VR is not supported on the current platform.
|
|
3116
2889
|
*/
|
|
3117
|
-
|
|
3118
|
-
}
|
|
3119
|
-
/**
|
|
3120
|
-
* Represents a cue of a text track.
|
|
3121
|
-
*
|
|
3122
|
-
* @public
|
|
3123
|
-
*/
|
|
3124
|
-
interface TextTrackCue extends EventDispatcher<TextTrackCueEventMap> {
|
|
2890
|
+
VR_PLATFORM_UNSUPPORTED = 9000,
|
|
3125
2891
|
/**
|
|
3126
|
-
*
|
|
2892
|
+
* Changing the presentation to VR was not possible.
|
|
3127
2893
|
*/
|
|
3128
|
-
|
|
2894
|
+
VR_PRESENTATION_ERROR = 9001,
|
|
3129
2895
|
/**
|
|
3130
|
-
*
|
|
2896
|
+
* Something went wrong with an ad.
|
|
3131
2897
|
*/
|
|
3132
|
-
|
|
2898
|
+
AD_ERROR = 10000,
|
|
3133
2899
|
/**
|
|
3134
|
-
*
|
|
3135
|
-
*
|
|
3136
|
-
* @remarks
|
|
3137
|
-
* <br/> - This identifier is unique across text track cues of a THEOplayer instance and can be used to distinguish between cues.
|
|
3138
|
-
* <br/> - This identifier is a randomly generated number.
|
|
2900
|
+
* An ad blocker has been detected.
|
|
3139
2901
|
*/
|
|
3140
|
-
|
|
2902
|
+
AD_BLOCKER_DETECTED = 10001,
|
|
3141
2903
|
/**
|
|
3142
|
-
*
|
|
2904
|
+
* Changing the presentation to fullscreen was not possible.
|
|
3143
2905
|
*/
|
|
3144
|
-
|
|
2906
|
+
FULLSCREEN_ERROR = 11000,
|
|
3145
2907
|
/**
|
|
3146
|
-
*
|
|
2908
|
+
* Something went wrong while caching a source.
|
|
3147
2909
|
*/
|
|
3148
|
-
|
|
2910
|
+
CACHE_SOURCE_ERROR = 12000,
|
|
3149
2911
|
/**
|
|
3150
|
-
*
|
|
3151
|
-
*
|
|
3152
|
-
* @remarks
|
|
3153
|
-
* The content differs depending on the {@link TextTrackCue.track}'s {@link TextTrack."type" | type }:
|
|
3154
|
-
* <br/> - `'emsg'`: Content is a Uint8Array representing the binary message data from the `emsg` box.
|
|
3155
|
-
* <br/> - `'eventstream'`: Content is the value of the `messageData` attribute which was specified in the manifest.
|
|
3156
|
-
* <br/> - `'ttml'`: Content is an intermediate TTML document’s body element. This is a view of a TTML document where all nodes in the document are active during the cue’s startTime and endTime. As a result, all begin, dur and end properties have been removed. TTML Styles, Regions and Metadata are stored in cue.styles, cue.regions, cue.metadata respectively. Combining those properties with the given content should suffice to render a TTML cue.
|
|
3157
|
-
* <br/> - `'webvtt'`: Content is the cue text in raw unparsed form.
|
|
2912
|
+
* Something went wrong while caching content protection's license.
|
|
3158
2913
|
*/
|
|
3159
|
-
|
|
2914
|
+
CACHE_CONTENT_PROTECTION_ERROR = 12001
|
|
3160
2915
|
}
|
|
3161
|
-
|
|
3162
2916
|
/**
|
|
3163
|
-
*
|
|
2917
|
+
* The category of an error.
|
|
3164
2918
|
*
|
|
3165
2919
|
* @public
|
|
3166
2920
|
*/
|
|
3167
|
-
|
|
2921
|
+
declare enum ErrorCategory {
|
|
3168
2922
|
/**
|
|
3169
|
-
*
|
|
2923
|
+
* This category clusters all errors related to the configuration.
|
|
3170
2924
|
*/
|
|
3171
|
-
|
|
2925
|
+
CONFIGURATION = 1,
|
|
3172
2926
|
/**
|
|
3173
|
-
*
|
|
3174
|
-
*
|
|
3175
|
-
* @param index - A `number` representing the index of a text track cue in the list.
|
|
3176
|
-
* @returns The text track cue with index `index` in the list.
|
|
2927
|
+
* This category clusters all errors related to the license.
|
|
3177
2928
|
*/
|
|
3178
|
-
|
|
2929
|
+
LICENSE = 2,
|
|
3179
2930
|
/**
|
|
3180
|
-
*
|
|
2931
|
+
* This category clusters all errors related to the source.
|
|
3181
2932
|
*/
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
2933
|
+
SOURCE = 3,
|
|
2934
|
+
/**
|
|
2935
|
+
* This category clusters all errors related to the manifest.
|
|
2936
|
+
*/
|
|
2937
|
+
MANIFEST = 4,
|
|
2938
|
+
/**
|
|
2939
|
+
* This category clusters all errors related to the media.
|
|
2940
|
+
*/
|
|
2941
|
+
MEDIA = 5,
|
|
2942
|
+
/**
|
|
2943
|
+
* This category clusters all errors related to the network.
|
|
2944
|
+
*/
|
|
2945
|
+
NETWORK = 6,
|
|
2946
|
+
/**
|
|
2947
|
+
* This category clusters all errors related to the content protection.
|
|
2948
|
+
*/
|
|
2949
|
+
CONTENT_PROTECTION = 7,
|
|
2950
|
+
/**
|
|
2951
|
+
* This category clusters all errors related to the subtitles.
|
|
2952
|
+
*/
|
|
2953
|
+
SUBTITLE = 8,
|
|
2954
|
+
/**
|
|
2955
|
+
* This category clusters all errors related to VR.
|
|
2956
|
+
*/
|
|
2957
|
+
VR = 9,
|
|
2958
|
+
/**
|
|
2959
|
+
* This category clusters all errors related to ads.
|
|
2960
|
+
*/
|
|
2961
|
+
AD = 10,
|
|
2962
|
+
/**
|
|
2963
|
+
* This category clusters all errors related to fullscreen.
|
|
2964
|
+
*/
|
|
2965
|
+
FULLSCREEN = 11,
|
|
2966
|
+
/**
|
|
2967
|
+
* This category clusters all errors related to caching.
|
|
2968
|
+
*/
|
|
2969
|
+
CACHE = 12
|
|
2970
|
+
}
|
|
2971
|
+
/**
|
|
3188
2972
|
* @public
|
|
3189
2973
|
*/
|
|
3190
|
-
|
|
2974
|
+
declare namespace ErrorCategory {
|
|
3191
2975
|
/**
|
|
3192
|
-
*
|
|
2976
|
+
* Determine the `ErrorCategory` of the given {@link ErrorCode}.
|
|
2977
|
+
*
|
|
2978
|
+
* @param code - The {@link ErrorCode} to determine the `ErrorCategory` of.
|
|
3193
2979
|
*/
|
|
3194
|
-
|
|
2980
|
+
function fromCode(code: ErrorCode): ErrorCategory;
|
|
3195
2981
|
}
|
|
2982
|
+
|
|
3196
2983
|
/**
|
|
3197
|
-
*
|
|
2984
|
+
* An error that is thrown by THEOplayer.
|
|
3198
2985
|
*
|
|
3199
2986
|
* @public
|
|
3200
2987
|
*/
|
|
3201
|
-
interface
|
|
2988
|
+
interface THEOplayerError extends Error {
|
|
3202
2989
|
/**
|
|
3203
|
-
*
|
|
2990
|
+
* An {@link ErrorCode} that indicates the type of error that has occurred.
|
|
3204
2991
|
*/
|
|
3205
|
-
readonly
|
|
2992
|
+
readonly code: ErrorCode;
|
|
2993
|
+
/**
|
|
2994
|
+
* An `ErrorCategory` that indicates the category of the error that has occurred.
|
|
2995
|
+
*
|
|
2996
|
+
* @remarks
|
|
2997
|
+
* <br/> - Equivalent to `ErrorCategory.fromCode(error.code)`
|
|
2998
|
+
*/
|
|
2999
|
+
readonly category: ErrorCategory;
|
|
3000
|
+
/**
|
|
3001
|
+
* The underlying cause of this error, if known.
|
|
3002
|
+
*/
|
|
3003
|
+
readonly cause: Error | undefined;
|
|
3206
3004
|
}
|
|
3005
|
+
|
|
3207
3006
|
/**
|
|
3208
|
-
* Fired when
|
|
3007
|
+
* Fired when an error occurs.
|
|
3209
3008
|
*
|
|
3210
3009
|
* @public
|
|
3211
3010
|
*/
|
|
3212
|
-
interface
|
|
3011
|
+
interface ErrorEvent extends Event<'error'> {
|
|
3213
3012
|
/**
|
|
3214
|
-
* The
|
|
3013
|
+
* The error that occurred.
|
|
3014
|
+
*
|
|
3015
|
+
* @deprecated use {@link ErrorEvent.errorObject | errorObject.message} instead
|
|
3215
3016
|
*/
|
|
3216
|
-
|
|
3017
|
+
error: string;
|
|
3018
|
+
/**
|
|
3019
|
+
* An error object containing additional information about the error.
|
|
3020
|
+
*/
|
|
3021
|
+
errorObject: THEOplayerError;
|
|
3217
3022
|
}
|
|
3023
|
+
|
|
3218
3024
|
/**
|
|
3219
|
-
*
|
|
3025
|
+
* An error code whose category is `ErrorCategory.SUBTITLE`.
|
|
3220
3026
|
*
|
|
3221
3027
|
* @public
|
|
3222
3028
|
*/
|
|
3223
|
-
|
|
3029
|
+
type TextTrackErrorCode = ErrorCode.SUBTITLE_LOAD_ERROR | ErrorCode.SUBTITLE_CORS_ERROR | ErrorCode.SUBTITLE_PARSE_ERROR;
|
|
3030
|
+
/**
|
|
3031
|
+
* An error thrown by a text track.
|
|
3032
|
+
*
|
|
3033
|
+
* @public
|
|
3034
|
+
*/
|
|
3035
|
+
interface TextTrackError extends THEOplayerError {
|
|
3224
3036
|
/**
|
|
3225
|
-
*
|
|
3037
|
+
* {@inheritDoc THEOplayerError.code}
|
|
3226
3038
|
*/
|
|
3227
|
-
|
|
3039
|
+
readonly code: TextTrackErrorCode;
|
|
3228
3040
|
/**
|
|
3229
|
-
*
|
|
3041
|
+
* The URL of the (sideloaded) text track.
|
|
3230
3042
|
*/
|
|
3231
|
-
|
|
3043
|
+
readonly url: string;
|
|
3232
3044
|
/**
|
|
3233
|
-
*
|
|
3045
|
+
* The status code from the HTTP response.
|
|
3234
3046
|
*/
|
|
3235
|
-
|
|
3047
|
+
readonly status: number;
|
|
3236
3048
|
}
|
|
3237
3049
|
|
|
3238
3050
|
/**
|
|
3239
|
-
*
|
|
3051
|
+
* The content type of a text track, represented by a value from the following list:
|
|
3052
|
+
* <br/> - `'srt'`: The track contains SRT (SubRip Text) content.
|
|
3053
|
+
* <br/> - `'ttml'`: The track contains TTML (Timed Text Markup Language) content.
|
|
3054
|
+
* <br/> - `'webvtt'`: The track contains WebVTT (Web Video Text Tracks) content.
|
|
3055
|
+
* <br/> - `'emsg'`: The track contains emsg (Event Message) content.
|
|
3056
|
+
* <br/> - `'eventstream'`: The track contains Event Stream content.
|
|
3057
|
+
* <br/> - `'id3'`: The track contains ID3 content.
|
|
3058
|
+
* <br/> - `'cea608'`: The track contains CEA608 content.
|
|
3059
|
+
* <br/> - `'daterange'`: The track contains HLS EXT-X-DATERANGE content.
|
|
3060
|
+
* <br/> - `''`: The type of the track contents is unknown.
|
|
3240
3061
|
*
|
|
3241
3062
|
* @public
|
|
3242
3063
|
*/
|
|
3243
|
-
|
|
3064
|
+
type TextTrackType = 'srt' | 'ttml' | 'webvtt' | 'emsg' | 'eventstream' | 'id3' | 'cea608' | 'daterange' | '';
|
|
3065
|
+
/**
|
|
3066
|
+
* The ready state of a text track, represented by a value from the following list:
|
|
3067
|
+
* <br/> - `0`: Indicates that the text track's cues have not been obtained.
|
|
3068
|
+
* <br/> - `1`: The text track is loading. Further cues might still be added to the track by the parser.
|
|
3069
|
+
* <br/> - `2`: The text track has been loaded with no fatal errors.
|
|
3070
|
+
* <br/> - `3`: An error occurred obtaining the cues for the track. Some or all of the cues are likely missing and will not be obtained.
|
|
3071
|
+
*
|
|
3072
|
+
* @public
|
|
3073
|
+
*/
|
|
3074
|
+
type TextTrackReadyState = 0 | 1 | 2 | 3;
|
|
3075
|
+
/**
|
|
3076
|
+
* An error event fired by a {@link TextTrack}.
|
|
3077
|
+
*
|
|
3078
|
+
* @public
|
|
3079
|
+
*/
|
|
3080
|
+
interface TextTrackErrorEvent extends ErrorEvent {
|
|
3244
3081
|
/**
|
|
3245
|
-
*
|
|
3082
|
+
* {@inheritDoc ErrorEvent.errorObject}
|
|
3246
3083
|
*/
|
|
3247
|
-
readonly
|
|
3084
|
+
readonly errorObject: TextTrackError;
|
|
3248
3085
|
}
|
|
3249
3086
|
/**
|
|
3250
|
-
*
|
|
3087
|
+
* Fired when a cue is added to the text track.
|
|
3251
3088
|
*
|
|
3252
3089
|
* @public
|
|
3253
3090
|
*/
|
|
3254
|
-
interface
|
|
3255
|
-
/**
|
|
3256
|
-
* Fired when a media track's {@link MediaTrack.enabled | enabled} or a text track's {@link TextTrack.mode | mode} changes.
|
|
3257
|
-
*/
|
|
3258
|
-
change: TrackChangeEvent;
|
|
3091
|
+
interface TextTrackAddCueEvent extends Event<'addcue'> {
|
|
3259
3092
|
/**
|
|
3260
|
-
*
|
|
3261
|
-
*
|
|
3262
|
-
* @remarks
|
|
3263
|
-
* <br/> - A track might update because a change propagated from a remote player (e.g. Chromecast).
|
|
3093
|
+
* The cue that is added to the text track.
|
|
3264
3094
|
*/
|
|
3265
|
-
|
|
3095
|
+
readonly cue: TextTrackCue;
|
|
3266
3096
|
}
|
|
3267
3097
|
/**
|
|
3268
|
-
*
|
|
3269
|
-
*
|
|
3270
|
-
* @remarks
|
|
3271
|
-
* <br/> - A specific track type (e.g. {@link TextTrack}) will always be used.
|
|
3098
|
+
* Fired when a cue is removed from the text track.
|
|
3272
3099
|
*
|
|
3273
3100
|
* @public
|
|
3274
3101
|
*/
|
|
3275
|
-
interface
|
|
3102
|
+
interface TextTrackRemoveCueEvent extends Event<'removecue'> {
|
|
3276
3103
|
/**
|
|
3277
|
-
* The
|
|
3278
|
-
*
|
|
3279
|
-
* @remarks
|
|
3280
|
-
* <br/> - The values for this property depend on the specific type of the track.
|
|
3104
|
+
* The cue that is removed from the text track.
|
|
3281
3105
|
*/
|
|
3282
|
-
|
|
3106
|
+
readonly cue: TextTrackCue;
|
|
3107
|
+
}
|
|
3108
|
+
/**
|
|
3109
|
+
* Fired when a cue of the text track has entered.
|
|
3110
|
+
*
|
|
3111
|
+
* @public
|
|
3112
|
+
*/
|
|
3113
|
+
interface TextTrackEnterCueEvent extends Event<'entercue'> {
|
|
3283
3114
|
/**
|
|
3284
|
-
* The
|
|
3285
|
-
*
|
|
3286
|
-
* @remarks
|
|
3287
|
-
* <br/> - This identifier can be used to distinguish between related tracks, e.g. tracks in the same list.
|
|
3115
|
+
* The cue from the text track that has entered.
|
|
3288
3116
|
*/
|
|
3289
|
-
|
|
3117
|
+
readonly cue: TextTrackCue;
|
|
3118
|
+
}
|
|
3119
|
+
/**
|
|
3120
|
+
* Fired when a cue of the text track has exited.
|
|
3121
|
+
*
|
|
3122
|
+
* @public
|
|
3123
|
+
*/
|
|
3124
|
+
interface TextTrackExitCueEvent extends Event<'exitcue'> {
|
|
3290
3125
|
/**
|
|
3291
|
-
*
|
|
3292
|
-
*
|
|
3293
|
-
* @remarks
|
|
3294
|
-
* <br/> - This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks.
|
|
3295
|
-
* <br/> - This identifier is a randomly generated number.
|
|
3126
|
+
* The cue from the text track that has exited.
|
|
3296
3127
|
*/
|
|
3297
|
-
|
|
3128
|
+
readonly cue: TextTrackCue;
|
|
3129
|
+
}
|
|
3130
|
+
/**
|
|
3131
|
+
* Fired when the displaying cues of the text track has changed.
|
|
3132
|
+
*
|
|
3133
|
+
* @public
|
|
3134
|
+
*/
|
|
3135
|
+
interface TextTrackCueChangeEvent extends Event<'cuechange'> {
|
|
3298
3136
|
/**
|
|
3299
|
-
* The
|
|
3137
|
+
* The text track which displaying cues has changed.
|
|
3300
3138
|
*/
|
|
3301
|
-
|
|
3139
|
+
readonly track: TextTrack;
|
|
3140
|
+
}
|
|
3141
|
+
/**
|
|
3142
|
+
* Fired when the {@link TextTrack.readyState | ready state} of the text track has changed.
|
|
3143
|
+
*
|
|
3144
|
+
* @public
|
|
3145
|
+
*/
|
|
3146
|
+
interface TextTrackReadyStateChangeEvent extends Event<'readystatechange'> {
|
|
3302
3147
|
/**
|
|
3303
|
-
* The
|
|
3148
|
+
* The text track which ready state has changed.
|
|
3304
3149
|
*/
|
|
3305
|
-
|
|
3150
|
+
readonly track: TextTrack;
|
|
3306
3151
|
/**
|
|
3307
|
-
* The
|
|
3308
|
-
*
|
|
3309
|
-
* @remarks
|
|
3310
|
-
* <br/> - For DASH: the accessibility descriptors for the corresponding AdaptationSet.
|
|
3311
|
-
* <br/> - For HLS: the CHARACTERISTICS for the corresponding #EXT-X-MEDIA tag.
|
|
3152
|
+
* The new {@link TextTrack.readyState | ready state} of the text track.
|
|
3312
3153
|
*/
|
|
3313
|
-
readonly
|
|
3154
|
+
readonly readyState: TextTrackReadyState;
|
|
3314
3155
|
}
|
|
3315
3156
|
/**
|
|
3316
|
-
*
|
|
3157
|
+
* Fired when the {@link TextTrack."type" | type} of the text track has changed.
|
|
3317
3158
|
*
|
|
3318
3159
|
* @public
|
|
3319
3160
|
*/
|
|
3320
|
-
|
|
3321
|
-
|
|
3161
|
+
interface TextTrackTypeChangeEvent extends Event<'typechange'> {
|
|
3162
|
+
/**
|
|
3163
|
+
* The text track which type has changed.
|
|
3164
|
+
*/
|
|
3165
|
+
readonly track: TextTrack;
|
|
3166
|
+
}
|
|
3322
3167
|
/**
|
|
3323
|
-
*
|
|
3168
|
+
* The events fired by a {@link TextTrack}.
|
|
3324
3169
|
*
|
|
3325
3170
|
* @public
|
|
3326
3171
|
*/
|
|
3327
|
-
|
|
3172
|
+
interface TextTrackEventMap extends TrackEventMap {
|
|
3328
3173
|
/**
|
|
3329
|
-
*
|
|
3174
|
+
* Fired when a cue is added to the track.
|
|
3330
3175
|
*/
|
|
3331
|
-
|
|
3176
|
+
addcue: TextTrackAddCueEvent;
|
|
3332
3177
|
/**
|
|
3333
|
-
*
|
|
3178
|
+
* Fired when a cue of the track is removed.
|
|
3334
3179
|
*/
|
|
3335
|
-
|
|
3180
|
+
removecue: TextTrackRemoveCueEvent;
|
|
3336
3181
|
/**
|
|
3337
|
-
*
|
|
3182
|
+
* Fired when a cue of the track enters.
|
|
3338
3183
|
*/
|
|
3339
|
-
|
|
3184
|
+
entercue: TextTrackEnterCueEvent;
|
|
3340
3185
|
/**
|
|
3341
|
-
*
|
|
3186
|
+
* Fired when a cue of the track exits.
|
|
3342
3187
|
*/
|
|
3343
|
-
|
|
3188
|
+
exitcue: TextTrackExitCueEvent;
|
|
3344
3189
|
/**
|
|
3345
|
-
*
|
|
3190
|
+
* Fired when the displaying cues of the text track changes.
|
|
3346
3191
|
*/
|
|
3347
|
-
|
|
3192
|
+
cuechange: TextTrackCueChangeEvent;
|
|
3348
3193
|
/**
|
|
3349
|
-
*
|
|
3194
|
+
* Fired when the text track's {@link TextTrack.readyState | ready state} changes.
|
|
3350
3195
|
*/
|
|
3351
|
-
|
|
3196
|
+
readystatechange: TextTrackReadyStateChangeEvent;
|
|
3352
3197
|
/**
|
|
3353
|
-
*
|
|
3198
|
+
* Fired when the text track's {@link TextTrack."type" | type} changes.
|
|
3354
3199
|
*/
|
|
3355
|
-
|
|
3200
|
+
typechange: TextTrackTypeChangeEvent;
|
|
3356
3201
|
/**
|
|
3357
|
-
*
|
|
3202
|
+
* Fired when an error occurred while loading or parsing the track.
|
|
3358
3203
|
*/
|
|
3359
|
-
|
|
3204
|
+
error: TextTrackErrorEvent;
|
|
3205
|
+
}
|
|
3206
|
+
/**
|
|
3207
|
+
* Represents a text track of a media resource.
|
|
3208
|
+
*
|
|
3209
|
+
* @public
|
|
3210
|
+
*/
|
|
3211
|
+
interface TextTrack extends Track, EventDispatcher<TextTrackEventMap> {
|
|
3360
3212
|
/**
|
|
3361
|
-
* The
|
|
3213
|
+
* The kind of the text track, represented by a value from the following list:
|
|
3214
|
+
* <br/> - `'subtitles'`: The track contains subtitles.
|
|
3215
|
+
* <br/> - `'captions'`: The track contains closed captions, a translation of dialogue and sound effects.
|
|
3216
|
+
* <br/> - `'descriptions'`: The track contains descriptions, a textual description of the video.
|
|
3217
|
+
* <br/> - `'chapters'`: The track contains chapter titles.
|
|
3218
|
+
* <br/> - `'metadata'`: The track contains metadata. This track will not serve display purposes.
|
|
3362
3219
|
*/
|
|
3363
|
-
|
|
3220
|
+
readonly kind: string;
|
|
3364
3221
|
/**
|
|
3365
|
-
*
|
|
3222
|
+
* The label of the text track.
|
|
3223
|
+
*/
|
|
3224
|
+
label: string;
|
|
3225
|
+
/**
|
|
3226
|
+
* The language of the text track.
|
|
3227
|
+
*/
|
|
3228
|
+
readonly language: string;
|
|
3229
|
+
/**
|
|
3230
|
+
* The identifier of the text track.
|
|
3366
3231
|
*
|
|
3367
3232
|
* @remarks
|
|
3368
|
-
* <br/> -
|
|
3233
|
+
* <br/> - This identifier can be used to distinguish between related tracks, e.g. tracks in the same list.
|
|
3234
|
+
* <br/> - For a text track embedded within an MPEG-DASH stream, this returns the Representation’d id attribute.
|
|
3235
|
+
* <br/> - For MPEG-DASH streams a Representation's ID is preferred over the AdaptationSet's ID.
|
|
3369
3236
|
*/
|
|
3370
|
-
|
|
3237
|
+
readonly id: string;
|
|
3371
3238
|
/**
|
|
3372
|
-
*
|
|
3239
|
+
* A unique identifier of the text track.
|
|
3240
|
+
*
|
|
3241
|
+
* @remarks
|
|
3242
|
+
* <br/> - This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks.
|
|
3243
|
+
* <br/> - This identifier is a randomly generated number.
|
|
3373
3244
|
*/
|
|
3374
|
-
|
|
3245
|
+
readonly uid: number;
|
|
3375
3246
|
/**
|
|
3376
|
-
* The
|
|
3247
|
+
* The in-band metadata track dispatch type of the text track.
|
|
3377
3248
|
*/
|
|
3378
|
-
|
|
3249
|
+
readonly inBandMetadataTrackDispatchType: string;
|
|
3379
3250
|
/**
|
|
3380
|
-
* The
|
|
3251
|
+
* The mode of the text track, represented by a value from the following list:
|
|
3252
|
+
* <br/> - `'disabled'`: The track is disabled.
|
|
3253
|
+
* <br/> - `'hidden'`: The track is hidden.
|
|
3254
|
+
* <br/> - `'showing'`: The track is showing.
|
|
3255
|
+
*
|
|
3256
|
+
* @remarks
|
|
3257
|
+
* <br/> - A disabled track is not displayed and exposes no active cues, nor fires cue events.
|
|
3258
|
+
* <br/> - A hidden track is not displayed but exposes active cues and fires cue events.
|
|
3259
|
+
* <br/> - A showing track is displayed, exposes active cues and fires cue events.
|
|
3381
3260
|
*/
|
|
3382
|
-
|
|
3261
|
+
mode: string;
|
|
3383
3262
|
/**
|
|
3384
|
-
* The
|
|
3263
|
+
* The ready state of the text track.
|
|
3385
3264
|
*/
|
|
3386
|
-
|
|
3265
|
+
readonly readyState: TextTrackReadyState;
|
|
3387
3266
|
/**
|
|
3388
|
-
*
|
|
3267
|
+
* The content type of the text track.
|
|
3389
3268
|
*/
|
|
3390
|
-
|
|
3269
|
+
readonly type: TextTrackType;
|
|
3391
3270
|
/**
|
|
3392
|
-
* The
|
|
3271
|
+
* The list of cues of the track.
|
|
3272
|
+
*
|
|
3273
|
+
* @remarks
|
|
3274
|
+
* <br/> - If the {@link TextTrack.mode} is `'disabled'`, this property is `null`.
|
|
3393
3275
|
*/
|
|
3394
|
-
|
|
3276
|
+
readonly cues: TextTrackCueList | null;
|
|
3395
3277
|
/**
|
|
3396
|
-
*
|
|
3278
|
+
* The list of active cues of the track.
|
|
3279
|
+
*
|
|
3280
|
+
* @remarks
|
|
3281
|
+
* <br/> - A cue is active if the current playback position falls within the time bounds of the cue.
|
|
3282
|
+
* <br/> - This list dynamically updates based on the current playback position.
|
|
3283
|
+
* <br/> - If the {@link TextTrack.mode} is `'disabled'`, this property is `null`.
|
|
3397
3284
|
*/
|
|
3398
|
-
|
|
3285
|
+
readonly activeCues: TextTrackCueList | null;
|
|
3399
3286
|
/**
|
|
3400
|
-
* The
|
|
3287
|
+
* The source of the text track.
|
|
3401
3288
|
*/
|
|
3402
|
-
|
|
3289
|
+
readonly src: string;
|
|
3403
3290
|
/**
|
|
3404
|
-
*
|
|
3291
|
+
* Indicates whether the track contains Forced Narrative cues.
|
|
3292
|
+
* This may only be true for subtitle tracks where
|
|
3293
|
+
* <br/> - For DASH: the corresponding AdaptationSet contains a child Role with its value attribute equal to `'forced_subtitle'`
|
|
3294
|
+
* <br/> - For HLS: the corresponding #EXT-X-MEDIA tag contains the attributes TYPE=SUBTITLES and FORCED=YES (not supported yet)
|
|
3405
3295
|
*/
|
|
3406
|
-
|
|
3296
|
+
readonly forced: boolean;
|
|
3407
3297
|
/**
|
|
3408
|
-
*
|
|
3298
|
+
* {@inheritDoc EventDispatcher.addEventListener}
|
|
3409
3299
|
*/
|
|
3410
|
-
|
|
3300
|
+
addEventListener<TType extends StringKeyOf<TextTrackEventMap>>(type: TType | readonly TType[], listener: EventListener<TextTrackEventMap[TType]>): void;
|
|
3411
3301
|
/**
|
|
3412
|
-
*
|
|
3302
|
+
* {@inheritDoc EventDispatcher.removeEventListener}
|
|
3413
3303
|
*/
|
|
3414
|
-
|
|
3304
|
+
removeEventListener<TType extends StringKeyOf<TextTrackEventMap>>(type: TType | readonly TType[], listener: EventListener<TextTrackEventMap[TType]>): void;
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3307
|
+
/**
|
|
3308
|
+
* Represents a media resource.
|
|
3309
|
+
*
|
|
3310
|
+
* @remarks
|
|
3311
|
+
* <br/> - Can be a string value representing the URL of a media resource, a {@link TypedSource} or a {@link VerizonMediaSource}.
|
|
3312
|
+
*
|
|
3313
|
+
* @public
|
|
3314
|
+
*/
|
|
3315
|
+
type Source = string | TypedSource | VerizonMediaSource;
|
|
3316
|
+
/**
|
|
3317
|
+
* A media resource or list of media resources.
|
|
3318
|
+
*
|
|
3319
|
+
* @remarks
|
|
3320
|
+
* <br/> - The order of sources when using a list determines their priority when attempting playback.
|
|
3321
|
+
*
|
|
3322
|
+
* @public
|
|
3323
|
+
*/
|
|
3324
|
+
type Sources = Source | Source[];
|
|
3325
|
+
/**
|
|
3326
|
+
* The cross-origin setting of a source, represented by a value from the following list:
|
|
3327
|
+
* <br/> - `'anonymous'`: CORS requests will have the credentials flag set to 'same-origin'.
|
|
3328
|
+
* <br/> - `'use-credentials'`: CORS requests will have the credentials flag set to 'include'.
|
|
3329
|
+
* <br/> - `''`: Setting the empty string is the same as `'anonymous'`
|
|
3330
|
+
*
|
|
3331
|
+
* @remarks
|
|
3332
|
+
* <br/> - See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes | The crossorigin attribute: Requesting CORS access to content}
|
|
3333
|
+
*
|
|
3334
|
+
* @public
|
|
3335
|
+
*/
|
|
3336
|
+
type CrossOriginSetting = '' | 'anonymous' | 'use-credentials';
|
|
3337
|
+
/**
|
|
3338
|
+
* Describes the configuration of a player's source.
|
|
3339
|
+
*
|
|
3340
|
+
* @public
|
|
3341
|
+
*/
|
|
3342
|
+
interface SourceConfiguration {
|
|
3415
3343
|
/**
|
|
3416
|
-
*
|
|
3344
|
+
* List of {@link AdDescription}s to be queued for playback.
|
|
3417
3345
|
*/
|
|
3418
|
-
|
|
3346
|
+
ads?: AdDescription[];
|
|
3419
3347
|
/**
|
|
3420
|
-
*
|
|
3348
|
+
* Whether the player should be blocked when an ad-related error occurs.
|
|
3349
|
+
*
|
|
3350
|
+
* @remarks
|
|
3351
|
+
* <br/> - A blocked player is not usable anymore. This has the same effect as invoking {@link ChromelessPlayer.destroy}.
|
|
3352
|
+
*
|
|
3353
|
+
* @defaultValue `false`
|
|
3421
3354
|
*/
|
|
3422
|
-
|
|
3355
|
+
blockContentIfAdError?: boolean;
|
|
3423
3356
|
/**
|
|
3424
|
-
*
|
|
3357
|
+
* If set, only allow ads to play that are scheduled after this time.
|
|
3358
|
+
*
|
|
3359
|
+
* @remarks
|
|
3360
|
+
* <br/> - This setting is strictly after - e.g. setting `playAdsAfterTime` to 15 will cause the player to ignore an ad break scheduled to play at 15s.
|
|
3361
|
+
*
|
|
3425
3362
|
*/
|
|
3426
|
-
|
|
3363
|
+
playAdsAfterTime?: number;
|
|
3427
3364
|
/**
|
|
3428
|
-
*
|
|
3365
|
+
* Content protection configuration.
|
|
3429
3366
|
*/
|
|
3430
|
-
|
|
3367
|
+
contentProtection?: DRMConfiguration;
|
|
3431
3368
|
/**
|
|
3432
|
-
*
|
|
3369
|
+
* {@inheritDoc SourceConfiguration.contentProtection}
|
|
3370
|
+
* @deprecated Superseded by {@link SourceConfiguration.contentProtection}.
|
|
3433
3371
|
*/
|
|
3434
|
-
|
|
3372
|
+
drm?: DRMConfiguration;
|
|
3435
3373
|
/**
|
|
3436
|
-
* The
|
|
3374
|
+
* The poster of the media source.
|
|
3375
|
+
*
|
|
3376
|
+
* @remarks
|
|
3377
|
+
* <br/> - An empty string (`''`) clears the current poster.
|
|
3378
|
+
* <br/> - This poster has priority over {@link ChromelessPlayer.poster}.
|
|
3437
3379
|
*/
|
|
3438
|
-
|
|
3380
|
+
poster?: string;
|
|
3439
3381
|
/**
|
|
3440
|
-
*
|
|
3382
|
+
* List of text tracks to be side-loaded with the media source.
|
|
3383
|
+
*
|
|
3384
|
+
* @remarks
|
|
3385
|
+
* <br/> - A source change will reset side-loaded text tracks.
|
|
3441
3386
|
*/
|
|
3442
|
-
|
|
3387
|
+
textTracks?: TextTrackDescription[];
|
|
3443
3388
|
/**
|
|
3444
|
-
*
|
|
3389
|
+
* Virtual reality configuration.
|
|
3445
3390
|
*/
|
|
3446
|
-
|
|
3391
|
+
vr?: VRConfiguration;
|
|
3447
3392
|
/**
|
|
3448
|
-
*
|
|
3393
|
+
* List of {@link AnalyticsDescription}s to configure analytics integrations for the media source.
|
|
3449
3394
|
*/
|
|
3450
|
-
|
|
3395
|
+
analytics?: AnalyticsDescription[];
|
|
3451
3396
|
/**
|
|
3452
|
-
*
|
|
3397
|
+
* The muted autoplay policy.
|
|
3398
|
+
*
|
|
3399
|
+
* @remarks
|
|
3400
|
+
* <br/> - The muted autoplay policy is impacted by this property and {@link PlayerConfiguration.mutedAutoplay}.
|
|
3401
|
+
*
|
|
3402
|
+
* @defaultValue `'none'`
|
|
3453
3403
|
*/
|
|
3454
|
-
|
|
3404
|
+
mutedAutoplay?: MutedAutoplayConfiguration;
|
|
3455
3405
|
/**
|
|
3456
|
-
*
|
|
3406
|
+
* The URL of a time server used by the player to synchronise the time in DASH sources.
|
|
3407
|
+
*
|
|
3408
|
+
* @remarks
|
|
3409
|
+
* <br/> - The time server should return time in ISO-8601 format.
|
|
3410
|
+
* <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.
|
|
3411
|
+
* <br/> - All sources will use the time server. Alternatively, for one source use {@link BaseSource.timeServer}.
|
|
3457
3412
|
*/
|
|
3458
|
-
|
|
3413
|
+
timeServer?: string;
|
|
3459
3414
|
/**
|
|
3460
|
-
*
|
|
3415
|
+
* Chromecast metadata configuration.
|
|
3461
3416
|
*
|
|
3462
3417
|
* @remarks
|
|
3463
|
-
* <br/> -
|
|
3418
|
+
* <br/> - Available since v2.21.0.
|
|
3464
3419
|
*/
|
|
3465
|
-
|
|
3420
|
+
metadata?: ChromecastMetadataDescription;
|
|
3466
3421
|
/**
|
|
3467
|
-
*
|
|
3422
|
+
* Whether segments in a HLS manifest should be represented by cues in a metadata text track.
|
|
3423
|
+
*
|
|
3424
|
+
* @deprecated Do not use this feature without consulting THEO Technologies.
|
|
3468
3425
|
*/
|
|
3469
|
-
|
|
3426
|
+
manifestMetadataTrack?: boolean;
|
|
3427
|
+
}
|
|
3428
|
+
/**
|
|
3429
|
+
* Describes the configuration of a player's source.
|
|
3430
|
+
*
|
|
3431
|
+
* @public
|
|
3432
|
+
*/
|
|
3433
|
+
interface SourceDescription extends SourceConfiguration {
|
|
3470
3434
|
/**
|
|
3471
|
-
*
|
|
3435
|
+
* One or more media resources for playback.
|
|
3436
|
+
*
|
|
3437
|
+
* @remarks
|
|
3438
|
+
* <br/> - Multiple media sources should be used to increase platform compatibility. See examples below for important use cases.
|
|
3439
|
+
* <br/> - The player will try each source in the provided order.
|
|
3440
|
+
*
|
|
3441
|
+
* @example
|
|
3442
|
+
* In this example, the player will first try to play the DASH source.
|
|
3443
|
+
* This might fail if the browser does not support the {@link https://www.widevine.com/ | Widevine} or {@link https://www.microsoft.com/playready/ | PlayReady} CDM, for example on Safari.
|
|
3444
|
+
* In that case, the player will try to play the HLS source instead.
|
|
3445
|
+
*
|
|
3446
|
+
* ```
|
|
3447
|
+
* [{
|
|
3448
|
+
* src: 'dash-source-with-drm.mpd'
|
|
3449
|
+
* contentProtection: {
|
|
3450
|
+
* widevine: {
|
|
3451
|
+
* licenseAcquisitionURL: 'https://license.company.com/wv'
|
|
3452
|
+
* },
|
|
3453
|
+
* playready: {
|
|
3454
|
+
* licenseAcquisitionURL: 'https://license.company.com/pr'
|
|
3455
|
+
* }
|
|
3456
|
+
* }
|
|
3457
|
+
* },{
|
|
3458
|
+
* src: 'hls-source-with-drm.m3u8',
|
|
3459
|
+
* contentProtection: {
|
|
3460
|
+
* fairplay: {
|
|
3461
|
+
* certificateURL: 'https://license.company.com/fp'
|
|
3462
|
+
* }
|
|
3463
|
+
* }
|
|
3464
|
+
* }]
|
|
3465
|
+
* ```
|
|
3466
|
+
*
|
|
3467
|
+
* @example
|
|
3468
|
+
* In this example, the player will first try to play the DASH source.
|
|
3469
|
+
* This might fail if the browser does not support the {@link https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API | Media Source Extensions API}.
|
|
3470
|
+
* In that case, the player will try to play the MP4 source instead, though without features such as adaptive bitrate switching.
|
|
3471
|
+
*
|
|
3472
|
+
* ```
|
|
3473
|
+
* [{
|
|
3474
|
+
* src: 'source.mpd'
|
|
3475
|
+
* },{
|
|
3476
|
+
* src: 'source.mp4'
|
|
3477
|
+
* }]
|
|
3478
|
+
* ```
|
|
3472
3479
|
*/
|
|
3473
|
-
|
|
3480
|
+
sources?: Sources;
|
|
3481
|
+
}
|
|
3482
|
+
/**
|
|
3483
|
+
* Describes the configuration of a side-loaded text track.
|
|
3484
|
+
*
|
|
3485
|
+
* @public
|
|
3486
|
+
*/
|
|
3487
|
+
interface TextTrackDescription {
|
|
3474
3488
|
/**
|
|
3475
|
-
*
|
|
3489
|
+
* Whether the text track should be enabled by default.
|
|
3490
|
+
*
|
|
3491
|
+
* @remarks
|
|
3492
|
+
* <br/> - Only one text track per {@link TextTrack.kind} may be marked as default.
|
|
3493
|
+
*
|
|
3494
|
+
* @defaultValue `false`
|
|
3495
|
+
*/
|
|
3496
|
+
default?: boolean;
|
|
3497
|
+
/**
|
|
3498
|
+
* The kind of the text track, represented by a value from the following list:
|
|
3499
|
+
* <br/> - `'subtitles'`: The track provides subtitles, used to display subtitles in a video.
|
|
3500
|
+
* <br/> - `'captions'`: The track provides a translation of dialogue and sound effects (suitable for users with a hearing impairment).
|
|
3501
|
+
* <br/> - `'descriptions'`: The track provides a textual description of the video (suitable for users with a vision impairment).
|
|
3502
|
+
* <br/> - `'chapters'`: The track provides chapter titles (suitable for navigating the media resource).
|
|
3503
|
+
* <br/> - `'metadata'`: The track provides content used by scripts and is not visible for users.
|
|
3504
|
+
*
|
|
3505
|
+
* @remarks
|
|
3506
|
+
* <br/> - If an unrecognized value is provided, the player will interpret it as `'metadata'`.
|
|
3507
|
+
*
|
|
3508
|
+
* @defaultValue `'subtitles'`
|
|
3476
3509
|
*/
|
|
3477
|
-
|
|
3510
|
+
kind?: string;
|
|
3478
3511
|
/**
|
|
3479
|
-
*
|
|
3512
|
+
* The format of the track, represented by a value from the following list:
|
|
3513
|
+
* <br/> - `'srt'`
|
|
3514
|
+
* <br/> - `'ttml'`
|
|
3515
|
+
* <br/> - `'webvtt'`
|
|
3516
|
+
* <br/> - `'emsg'`
|
|
3517
|
+
* <br/> - `'eventstream'`
|
|
3518
|
+
* <br/> - `'id3'`
|
|
3519
|
+
* <br/> - `'cea608'`
|
|
3520
|
+
* <br/> - `'daterange'`
|
|
3521
|
+
*
|
|
3522
|
+
* @defaultValue `''`
|
|
3480
3523
|
*/
|
|
3481
|
-
|
|
3524
|
+
format?: string;
|
|
3482
3525
|
/**
|
|
3483
|
-
*
|
|
3526
|
+
* The source URL of the text track.
|
|
3484
3527
|
*/
|
|
3485
|
-
|
|
3528
|
+
src: string;
|
|
3486
3529
|
/**
|
|
3487
|
-
*
|
|
3530
|
+
* The language of the text track.
|
|
3488
3531
|
*/
|
|
3489
|
-
|
|
3532
|
+
srclang?: string;
|
|
3490
3533
|
/**
|
|
3491
|
-
*
|
|
3534
|
+
* A label for the text track.
|
|
3535
|
+
*
|
|
3536
|
+
* @remarks
|
|
3537
|
+
* <br/> - This will be used as an identifier on the player API and in the UI.
|
|
3492
3538
|
*/
|
|
3493
|
-
|
|
3539
|
+
label?: string;
|
|
3494
3540
|
/**
|
|
3495
|
-
*
|
|
3541
|
+
* The identifier of this text track.
|
|
3542
|
+
*
|
|
3543
|
+
* @internal
|
|
3496
3544
|
*/
|
|
3497
|
-
|
|
3545
|
+
id?: string;
|
|
3498
3546
|
}
|
|
3499
3547
|
/**
|
|
3500
|
-
*
|
|
3548
|
+
* Represents the common properties of a media resource.
|
|
3501
3549
|
*
|
|
3502
3550
|
* @public
|
|
3503
3551
|
*/
|
|
3504
|
-
|
|
3505
|
-
/**
|
|
3506
|
-
* This category clusters all errors related to the configuration.
|
|
3507
|
-
*/
|
|
3508
|
-
CONFIGURATION = 1,
|
|
3552
|
+
interface BaseSource {
|
|
3509
3553
|
/**
|
|
3510
|
-
*
|
|
3554
|
+
* The integration ID of the source.
|
|
3555
|
+
*
|
|
3556
|
+
* @remarks
|
|
3557
|
+
* <br/> - This can be used to signal that a source is specific to an integration.
|
|
3511
3558
|
*/
|
|
3512
|
-
|
|
3559
|
+
integration?: SourceIntegrationId;
|
|
3513
3560
|
/**
|
|
3514
|
-
*
|
|
3561
|
+
* The cross-origin setting of the source.
|
|
3562
|
+
*
|
|
3563
|
+
* @defaultValue `''`
|
|
3564
|
+
*
|
|
3565
|
+
* @remarks
|
|
3566
|
+
* <br/> - Available since v2.9.0.
|
|
3515
3567
|
*/
|
|
3516
|
-
|
|
3568
|
+
crossOrigin?: CrossOriginSetting;
|
|
3517
3569
|
/**
|
|
3518
|
-
*
|
|
3570
|
+
* Whether the player is allowed to use credentials for cross-origin requests.
|
|
3571
|
+
*
|
|
3572
|
+
* @remarks
|
|
3573
|
+
* <br/> - Credentials are cookies, authorization headers or TLS client certificates.
|
|
3574
|
+
*
|
|
3575
|
+
* @defaultValue `false`
|
|
3519
3576
|
*/
|
|
3520
|
-
|
|
3577
|
+
useCredentials?: boolean;
|
|
3521
3578
|
/**
|
|
3522
|
-
*
|
|
3579
|
+
* The offset in seconds used to determine the live point.
|
|
3580
|
+
* This live point is the end of the manifest minus the provided offset.
|
|
3581
|
+
*
|
|
3582
|
+
* @remarks
|
|
3583
|
+
* <br/> - Available since v2.35.0.
|
|
3584
|
+
*
|
|
3585
|
+
* @defaultValue Three times the segment's target duration.
|
|
3523
3586
|
*/
|
|
3524
|
-
|
|
3587
|
+
liveOffset?: number;
|
|
3525
3588
|
/**
|
|
3526
|
-
*
|
|
3589
|
+
* The URL of a time server used by the player to synchronise the time in DASH sources.
|
|
3590
|
+
*
|
|
3591
|
+
* @remarks
|
|
3592
|
+
* <br/> - Available since v2.47.0.
|
|
3593
|
+
* <br/> - The time server should return time in ISO-8601 format.
|
|
3594
|
+
* <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.
|
|
3595
|
+
* <br/> - Only this source will use the time server. Alternatively, for all source use {@link SourceConfiguration.timeServer}.
|
|
3527
3596
|
*/
|
|
3528
|
-
|
|
3597
|
+
timeServer?: string;
|
|
3529
3598
|
/**
|
|
3530
|
-
*
|
|
3599
|
+
* Whether the player should parse and expose date ranges from HLS manifests.
|
|
3600
|
+
*
|
|
3601
|
+
* @defaultValue `false`
|
|
3602
|
+
*
|
|
3603
|
+
* @remarks
|
|
3604
|
+
* <br/> - Available since v2.61.0.
|
|
3531
3605
|
*/
|
|
3532
|
-
|
|
3606
|
+
hlsDateRange?: boolean;
|
|
3533
3607
|
/**
|
|
3534
|
-
*
|
|
3608
|
+
* Whether to use an experimental rendering pipeline for playback.
|
|
3609
|
+
*
|
|
3610
|
+
* @remarks
|
|
3611
|
+
* <br/> - The availability of an experimental rendering pipeline depends on the platform.
|
|
3612
|
+
* <br/> - Only use after specifically being advised to.
|
|
3613
|
+
*
|
|
3614
|
+
* @internal
|
|
3535
3615
|
*/
|
|
3536
|
-
|
|
3616
|
+
experimentalRendering?: boolean;
|
|
3537
3617
|
/**
|
|
3538
|
-
*
|
|
3618
|
+
* Whether to use native ui rendering.
|
|
3619
|
+
*
|
|
3620
|
+
* @internal
|
|
3539
3621
|
*/
|
|
3540
|
-
|
|
3622
|
+
nativeUiRendering?: boolean;
|
|
3541
3623
|
/**
|
|
3542
|
-
*
|
|
3624
|
+
* Whether the source should be played in the low-latency-mode of the player.
|
|
3625
|
+
*
|
|
3626
|
+
* @defaultValue `false`
|
|
3627
|
+
*
|
|
3628
|
+
* @remarks
|
|
3629
|
+
* <br/> - This setting must be `true` when using Low-Latency CMAF with ABR.
|
|
3630
|
+
* <br/> - Available since v2.62.0.
|
|
3543
3631
|
*/
|
|
3544
|
-
|
|
3632
|
+
lowLatency?: boolean;
|
|
3545
3633
|
/**
|
|
3546
|
-
*
|
|
3634
|
+
* Whether this source should be played using native playback.
|
|
3635
|
+
*
|
|
3636
|
+
* @defaultValue `false`
|
|
3637
|
+
*
|
|
3638
|
+
* @remarks
|
|
3639
|
+
* <br/> - Available since v2.68.0.
|
|
3640
|
+
* <br/> - Ignored for DASH streams.
|
|
3641
|
+
* <br/> - Only supported on browsers that can play HLS streams natively, will error otherwise.
|
|
3547
3642
|
*/
|
|
3548
|
-
|
|
3643
|
+
useNativePlayback?: boolean;
|
|
3549
3644
|
/**
|
|
3550
|
-
*
|
|
3645
|
+
* The configuration for controlling playback of an MPEG-DASH stream.
|
|
3646
|
+
*
|
|
3647
|
+
* @remarks
|
|
3648
|
+
* <br/> - Available since v2.79.0.
|
|
3649
|
+
* <br/> - Ignored for non-DASH streams.
|
|
3551
3650
|
*/
|
|
3552
|
-
|
|
3553
|
-
}
|
|
3554
|
-
/**
|
|
3555
|
-
* @public
|
|
3556
|
-
*/
|
|
3557
|
-
declare namespace ErrorCategory {
|
|
3651
|
+
dash?: DashPlaybackConfiguration;
|
|
3558
3652
|
/**
|
|
3559
|
-
*
|
|
3653
|
+
* The configuration for controlling playback of an HLS stream.
|
|
3560
3654
|
*
|
|
3561
|
-
* @
|
|
3655
|
+
* @remarks
|
|
3656
|
+
* <br/> - Available since v2.82.0.
|
|
3657
|
+
* <br/> - Ignored for non-HLS streams.
|
|
3562
3658
|
*/
|
|
3563
|
-
|
|
3564
|
-
}
|
|
3565
|
-
|
|
3566
|
-
/**
|
|
3567
|
-
* An error that is thrown by THEOplayer.
|
|
3568
|
-
*
|
|
3569
|
-
* @public
|
|
3570
|
-
*/
|
|
3571
|
-
interface THEOplayerError extends Error {
|
|
3659
|
+
hls?: HlsPlaybackConfiguration;
|
|
3572
3660
|
/**
|
|
3573
|
-
*
|
|
3661
|
+
* The source's ABR configuration.
|
|
3662
|
+
*
|
|
3663
|
+
* @remarks
|
|
3664
|
+
* <br/> - Available since v3.1.0.
|
|
3665
|
+
* <br/> - Overrides {@link PlayerConfiguration.abr}.
|
|
3666
|
+
* <br/> - Used for DASH and LL-HLS streams.
|
|
3574
3667
|
*/
|
|
3575
|
-
|
|
3668
|
+
abr?: SourceAbrConfiguration;
|
|
3576
3669
|
/**
|
|
3577
|
-
*
|
|
3670
|
+
* Whether this source should be played using the LCEVC sdk.
|
|
3578
3671
|
*
|
|
3579
3672
|
* @remarks
|
|
3580
|
-
* <br/> -
|
|
3673
|
+
* <br/> - Requires the LCEVC feature to be enabled.
|
|
3674
|
+
* <br/> - Requires the V-Nova LCEVC SDK to be loaded on the page.
|
|
3675
|
+
* <br/> - Only available for DASH and HLS streams.
|
|
3581
3676
|
*/
|
|
3582
|
-
|
|
3677
|
+
lcevc?: boolean;
|
|
3583
3678
|
/**
|
|
3584
|
-
*
|
|
3679
|
+
* A list of embedded {@link TextTrackType}s to ignore when parsing media segments.
|
|
3680
|
+
*
|
|
3681
|
+
* @remarks
|
|
3682
|
+
* <br/> - Available since v5.9.0
|
|
3683
|
+
* <br/> - Only 'cea608' and 'emsg' can currently be ignored.
|
|
3684
|
+
* <br/> - Only for DASH and HLS playback.
|
|
3685
|
+
*
|
|
3585
3686
|
*/
|
|
3586
|
-
|
|
3687
|
+
ignoreEmbeddedTextTrackTypes?: TextTrackType[];
|
|
3587
3688
|
}
|
|
3588
|
-
|
|
3589
3689
|
/**
|
|
3590
|
-
*
|
|
3690
|
+
* Represents a media resource characterized by a URL to the resource and optionally information about the resource.
|
|
3591
3691
|
*
|
|
3592
3692
|
* @public
|
|
3593
3693
|
*/
|
|
3594
|
-
interface
|
|
3694
|
+
interface TypedSource extends BaseSource {
|
|
3595
3695
|
/**
|
|
3596
|
-
* The
|
|
3696
|
+
* The source URL of the media resource.
|
|
3597
3697
|
*
|
|
3598
|
-
* @
|
|
3698
|
+
* @remarks
|
|
3699
|
+
* <br/> - Required if the `ssai` property is absent.
|
|
3700
|
+
* <br/> - Available since v2.4.0.
|
|
3599
3701
|
*/
|
|
3600
|
-
|
|
3702
|
+
src?: string;
|
|
3601
3703
|
/**
|
|
3602
|
-
*
|
|
3704
|
+
* The content type (MIME type) of the media resource, represented by a value from the following list:
|
|
3705
|
+
* <br/> - `'application/dash+xml'`: The media resource is an MPEG-DASH stream.
|
|
3706
|
+
* <br/> - `'application/x-mpegURL'` or `'application/vnd.apple.mpegurl'`: The media resource is an HLS stream.
|
|
3707
|
+
* <br/> - `'video/mp4'`, `'video/webm'` and other formats: The media resource should use native HTML5 playback if supported by the browser.
|
|
3708
|
+
* <br/> - `'application/vnd.theo.hesp+json'`: The media resource is an HESP stream.
|
|
3709
|
+
*
|
|
3710
|
+
* @remarks
|
|
3711
|
+
* <br/> - Available since v2.4.0.
|
|
3603
3712
|
*/
|
|
3604
|
-
|
|
3605
|
-
}
|
|
3606
|
-
|
|
3607
|
-
/**
|
|
3608
|
-
* An error code whose category is `ErrorCategory.SUBTITLE`.
|
|
3609
|
-
*
|
|
3610
|
-
* @public
|
|
3611
|
-
*/
|
|
3612
|
-
type TextTrackErrorCode = ErrorCode.SUBTITLE_LOAD_ERROR | ErrorCode.SUBTITLE_CORS_ERROR | ErrorCode.SUBTITLE_PARSE_ERROR;
|
|
3613
|
-
/**
|
|
3614
|
-
* An error thrown by a text track.
|
|
3615
|
-
*
|
|
3616
|
-
* @public
|
|
3617
|
-
*/
|
|
3618
|
-
interface TextTrackError extends THEOplayerError {
|
|
3713
|
+
type?: string;
|
|
3619
3714
|
/**
|
|
3620
|
-
*
|
|
3715
|
+
* The content protection parameters for the media resource.
|
|
3716
|
+
*
|
|
3717
|
+
* @remarks
|
|
3718
|
+
* <br/> - Available since v2.15.0.
|
|
3621
3719
|
*/
|
|
3622
|
-
|
|
3720
|
+
contentProtection?: DRMConfiguration;
|
|
3623
3721
|
/**
|
|
3624
|
-
* The
|
|
3722
|
+
* The content protection parameters for the media resource.
|
|
3723
|
+
*
|
|
3724
|
+
* @deprecated Superseded by {@link TypedSource.contentProtection}.
|
|
3625
3725
|
*/
|
|
3626
|
-
|
|
3726
|
+
drm?: DRMConfiguration;
|
|
3627
3727
|
/**
|
|
3628
|
-
* The
|
|
3728
|
+
* The Server-side Ad Insertion parameters for the media resource.
|
|
3729
|
+
*
|
|
3730
|
+
* @remarks
|
|
3731
|
+
* <br/> - Available since v2.12.0.
|
|
3732
|
+
*/
|
|
3733
|
+
ssai?: ServerSideAdInsertionConfiguration;
|
|
3734
|
+
/**
|
|
3735
|
+
* Whether the source is for an ad or a content playback
|
|
3736
|
+
*
|
|
3737
|
+
* @internal
|
|
3629
3738
|
*/
|
|
3630
|
-
|
|
3739
|
+
isAdvertisement?: boolean;
|
|
3631
3740
|
}
|
|
3632
|
-
|
|
3633
3741
|
/**
|
|
3634
|
-
* The
|
|
3635
|
-
* <br/> - `'
|
|
3636
|
-
* <br/> - `'
|
|
3637
|
-
* <br/> - `'webvtt'`: The track contains WebVTT (Web Video Text Tracks) content.
|
|
3638
|
-
* <br/> - `'emsg'`: The track contains emsg (Event Message) content.
|
|
3639
|
-
* <br/> - `'eventstream'`: The track contains Event Stream content.
|
|
3640
|
-
* <br/> - `'id3'`: The track contains ID3 content.
|
|
3641
|
-
* <br/> - `'cea608'`: The track contains CEA608 content.
|
|
3642
|
-
* <br/> - `'daterange'`: The track contains HLS EXT-X-DATERANGE content.
|
|
3643
|
-
* <br/> - `''`: The type of the track contents is unknown.
|
|
3742
|
+
* The integration identifier of a source specific to a pre-integration, represented by a value from the following list:
|
|
3743
|
+
* <br/> - `'verizon-media'`: The source is a {@link VerizonMediaSource}
|
|
3744
|
+
* <br/> - `'mediatailor'`: The source contains the MediaTailor initialization url
|
|
3644
3745
|
*
|
|
3645
3746
|
* @public
|
|
3646
3747
|
*/
|
|
3647
|
-
type
|
|
3748
|
+
type SourceIntegrationId = 'verizon-media' | 'mediatailor';
|
|
3648
3749
|
/**
|
|
3649
|
-
* The
|
|
3650
|
-
* <br/> - `
|
|
3651
|
-
* <br/> - `
|
|
3652
|
-
* <br/> - `
|
|
3653
|
-
* <br/> - `
|
|
3750
|
+
* The integration identifier of an analytics description, represented by a value from the following list:
|
|
3751
|
+
* <br/> - `'agama'`: The description is an {@link AgamaConfiguration}
|
|
3752
|
+
* <br/> - `'conviva'`: The description is a {@link ConvivaConfiguration}
|
|
3753
|
+
* <br/> - `'youbora'`: The description is a {@link YouboraOptions}
|
|
3754
|
+
* <br/> - `'moat'`: The description is a {@link MoatConfiguration}
|
|
3755
|
+
* <br/> - `'streamone'`: The description is a {@link StreamOneConfiguration}
|
|
3756
|
+
* <br/> - `'smartsight'`: The description is a {@link SmartSightConfiguration}
|
|
3654
3757
|
*
|
|
3655
3758
|
* @public
|
|
3656
3759
|
*/
|
|
3657
|
-
type
|
|
3760
|
+
type AnalyticsIntegrationID = 'agama' | 'conviva' | 'youbora' | 'moat' | 'streamone' | 'smartsight';
|
|
3658
3761
|
/**
|
|
3659
|
-
*
|
|
3762
|
+
* Describes the configuration of an analytics integration.
|
|
3660
3763
|
*
|
|
3661
3764
|
* @public
|
|
3662
3765
|
*/
|
|
3663
|
-
interface
|
|
3766
|
+
interface AnalyticsDescription {
|
|
3664
3767
|
/**
|
|
3665
|
-
*
|
|
3768
|
+
* The identifier of the analytics integration.
|
|
3666
3769
|
*/
|
|
3667
|
-
|
|
3770
|
+
integration: AnalyticsIntegrationID;
|
|
3668
3771
|
}
|
|
3772
|
+
|
|
3669
3773
|
/**
|
|
3670
|
-
* Fired when
|
|
3774
|
+
* Fired when {@link RelatedContent.sources} changes.
|
|
3671
3775
|
*
|
|
3672
3776
|
* @public
|
|
3673
3777
|
*/
|
|
3674
|
-
|
|
3675
|
-
/**
|
|
3676
|
-
* The cue that is added to the text track.
|
|
3677
|
-
*/
|
|
3678
|
-
readonly cue: TextTrackCue;
|
|
3679
|
-
}
|
|
3778
|
+
type RelatedChangeEvent = Event<'relatedchange'>;
|
|
3680
3779
|
/**
|
|
3681
|
-
* Fired when
|
|
3780
|
+
* Fired when the related content panel is shown.
|
|
3682
3781
|
*
|
|
3683
3782
|
* @public
|
|
3684
3783
|
*/
|
|
3685
|
-
|
|
3686
|
-
/**
|
|
3687
|
-
* The cue that is removed from the text track.
|
|
3688
|
-
*/
|
|
3689
|
-
readonly cue: TextTrackCue;
|
|
3690
|
-
}
|
|
3784
|
+
type RelatedShowEvent = Event<'show'>;
|
|
3691
3785
|
/**
|
|
3692
|
-
* Fired when
|
|
3786
|
+
* Fired when the related content panel is hidden.
|
|
3693
3787
|
*
|
|
3694
3788
|
* @public
|
|
3695
3789
|
*/
|
|
3696
|
-
|
|
3697
|
-
/**
|
|
3698
|
-
* The cue from the text track that has entered.
|
|
3699
|
-
*/
|
|
3700
|
-
readonly cue: TextTrackCue;
|
|
3701
|
-
}
|
|
3790
|
+
type RelatedHideEvent = Event<'hide'>;
|
|
3702
3791
|
/**
|
|
3703
|
-
*
|
|
3792
|
+
* The events fired by the {@link RelatedContent | related content API}.
|
|
3704
3793
|
*
|
|
3705
3794
|
* @public
|
|
3706
3795
|
*/
|
|
3707
|
-
interface
|
|
3796
|
+
interface RelatedContentEventMap {
|
|
3708
3797
|
/**
|
|
3709
|
-
*
|
|
3798
|
+
* {@inheritDoc RelatedChangeEvent}
|
|
3710
3799
|
*/
|
|
3711
|
-
|
|
3800
|
+
relatedchange: RelatedChangeEvent;
|
|
3712
3801
|
}
|
|
3713
3802
|
/**
|
|
3714
|
-
*
|
|
3803
|
+
* The related content API.
|
|
3804
|
+
*
|
|
3805
|
+
* @remarks
|
|
3806
|
+
* <br/> - Available since v2.14.2.
|
|
3715
3807
|
*
|
|
3716
3808
|
* @public
|
|
3717
3809
|
*/
|
|
3718
|
-
interface
|
|
3810
|
+
interface RelatedContent extends EventDispatcher<RelatedContentEventMap> {
|
|
3719
3811
|
/**
|
|
3720
|
-
*
|
|
3812
|
+
* List of related content sources.
|
|
3721
3813
|
*/
|
|
3722
|
-
|
|
3814
|
+
sources: RelatedContentSource[];
|
|
3723
3815
|
}
|
|
3724
3816
|
/**
|
|
3725
|
-
*
|
|
3817
|
+
* The events fired by the {@link UIRelatedContent | related content API (with ui)}.
|
|
3726
3818
|
*
|
|
3727
3819
|
* @public
|
|
3728
3820
|
*/
|
|
3729
|
-
interface
|
|
3821
|
+
interface UIRelatedContentEventMap extends RelatedContentEventMap {
|
|
3730
3822
|
/**
|
|
3731
|
-
*
|
|
3823
|
+
* {@inheritDoc RelatedShowEvent}
|
|
3732
3824
|
*/
|
|
3733
|
-
|
|
3825
|
+
show: RelatedShowEvent;
|
|
3734
3826
|
/**
|
|
3735
|
-
*
|
|
3827
|
+
* {@inheritDoc RelatedHideEvent}
|
|
3736
3828
|
*/
|
|
3737
|
-
|
|
3829
|
+
hide: RelatedHideEvent;
|
|
3738
3830
|
}
|
|
3739
3831
|
/**
|
|
3740
|
-
*
|
|
3832
|
+
* The related content UI API which can be used to toggle UI components.
|
|
3741
3833
|
*
|
|
3742
|
-
* @
|
|
3743
|
-
|
|
3744
|
-
interface TextTrackTypeChangeEvent extends Event<'typechange'> {
|
|
3745
|
-
/**
|
|
3746
|
-
* The text track which type has changed.
|
|
3747
|
-
*/
|
|
3748
|
-
readonly track: TextTrack;
|
|
3749
|
-
}
|
|
3750
|
-
/**
|
|
3751
|
-
* The events fired by a {@link TextTrack}.
|
|
3834
|
+
* @remarks
|
|
3835
|
+
* <br/> - Available since v2.14.2.
|
|
3752
3836
|
*
|
|
3753
3837
|
* @public
|
|
3754
3838
|
*/
|
|
3755
|
-
interface
|
|
3756
|
-
/**
|
|
3757
|
-
* Fired when a cue is added to the track.
|
|
3758
|
-
*/
|
|
3759
|
-
addcue: TextTrackAddCueEvent;
|
|
3760
|
-
/**
|
|
3761
|
-
* Fired when a cue of the track is removed.
|
|
3762
|
-
*/
|
|
3763
|
-
removecue: TextTrackRemoveCueEvent;
|
|
3764
|
-
/**
|
|
3765
|
-
* Fired when a cue of the track enters.
|
|
3766
|
-
*/
|
|
3767
|
-
entercue: TextTrackEnterCueEvent;
|
|
3839
|
+
interface UIRelatedContent extends RelatedContent, EventDispatcher<UIRelatedContentEventMap> {
|
|
3768
3840
|
/**
|
|
3769
|
-
*
|
|
3841
|
+
* Whether the related content menu is showing.
|
|
3770
3842
|
*/
|
|
3771
|
-
|
|
3843
|
+
showing: boolean;
|
|
3772
3844
|
/**
|
|
3773
|
-
*
|
|
3845
|
+
* Show the related content menu.
|
|
3774
3846
|
*/
|
|
3775
|
-
|
|
3847
|
+
show(): void;
|
|
3776
3848
|
/**
|
|
3777
|
-
*
|
|
3849
|
+
* Hides the related content menu.
|
|
3778
3850
|
*/
|
|
3779
|
-
|
|
3851
|
+
hide(): void;
|
|
3780
3852
|
/**
|
|
3781
|
-
*
|
|
3853
|
+
* {@inheritDoc EventDispatcher.addEventListener}
|
|
3782
3854
|
*/
|
|
3783
|
-
|
|
3855
|
+
addEventListener<TType extends StringKeyOf<UIRelatedContentEventMap>>(type: TType | readonly TType[], listener: EventListener<UIRelatedContentEventMap[TType]>): void;
|
|
3784
3856
|
/**
|
|
3785
|
-
*
|
|
3857
|
+
* {@inheritDoc EventDispatcher.removeEventListener}
|
|
3786
3858
|
*/
|
|
3787
|
-
|
|
3859
|
+
removeEventListener<TType extends StringKeyOf<UIRelatedContentEventMap>>(type: TType | readonly TType[], listener: EventListener<UIRelatedContentEventMap[TType]>): void;
|
|
3788
3860
|
}
|
|
3789
3861
|
/**
|
|
3790
|
-
* Represents a
|
|
3862
|
+
* Represents a related content source.
|
|
3863
|
+
*
|
|
3864
|
+
* @remarks
|
|
3865
|
+
* <br/> - Available since v2.14.2.
|
|
3791
3866
|
*
|
|
3792
3867
|
* @public
|
|
3793
3868
|
*/
|
|
3794
|
-
interface
|
|
3795
|
-
/**
|
|
3796
|
-
* The kind of the text track, represented by a value from the following list:
|
|
3797
|
-
* <br/> - `'subtitles'`: The track contains subtitles.
|
|
3798
|
-
* <br/> - `'captions'`: The track contains closed captions, a translation of dialogue and sound effects.
|
|
3799
|
-
* <br/> - `'descriptions'`: The track contains descriptions, a textual description of the video.
|
|
3800
|
-
* <br/> - `'chapters'`: The track contains chapter titles.
|
|
3801
|
-
* <br/> - `'metadata'`: The track contains metadata. This track will not serve display purposes.
|
|
3802
|
-
*/
|
|
3803
|
-
readonly kind: string;
|
|
3804
|
-
/**
|
|
3805
|
-
* The label of the text track.
|
|
3806
|
-
*/
|
|
3807
|
-
label: string;
|
|
3808
|
-
/**
|
|
3809
|
-
* The language of the text track.
|
|
3810
|
-
*/
|
|
3811
|
-
readonly language: string;
|
|
3812
|
-
/**
|
|
3813
|
-
* The identifier of the text track.
|
|
3814
|
-
*
|
|
3815
|
-
* @remarks
|
|
3816
|
-
* <br/> - This identifier can be used to distinguish between related tracks, e.g. tracks in the same list.
|
|
3817
|
-
* <br/> - For a text track embedded within an MPEG-DASH stream, this returns the Representation’d id attribute.
|
|
3818
|
-
* <br/> - For MPEG-DASH streams a Representation's ID is preferred over the AdaptationSet's ID.
|
|
3819
|
-
*/
|
|
3820
|
-
readonly id: string;
|
|
3821
|
-
/**
|
|
3822
|
-
* A unique identifier of the text track.
|
|
3823
|
-
*
|
|
3824
|
-
* @remarks
|
|
3825
|
-
* <br/> - This identifier is unique across tracks of a THEOplayer instance and can be used to distinguish between tracks.
|
|
3826
|
-
* <br/> - This identifier is a randomly generated number.
|
|
3827
|
-
*/
|
|
3828
|
-
readonly uid: number;
|
|
3829
|
-
/**
|
|
3830
|
-
* The in-band metadata track dispatch type of the text track.
|
|
3831
|
-
*/
|
|
3832
|
-
readonly inBandMetadataTrackDispatchType: string;
|
|
3833
|
-
/**
|
|
3834
|
-
* The mode of the text track, represented by a value from the following list:
|
|
3835
|
-
* <br/> - `'disabled'`: The track is disabled.
|
|
3836
|
-
* <br/> - `'hidden'`: The track is hidden.
|
|
3837
|
-
* <br/> - `'showing'`: The track is showing.
|
|
3838
|
-
*
|
|
3839
|
-
* @remarks
|
|
3840
|
-
* <br/> - A disabled track is not displayed and exposes no active cues, nor fires cue events.
|
|
3841
|
-
* <br/> - A hidden track is not displayed but exposes active cues and fires cue events.
|
|
3842
|
-
* <br/> - A showing track is displayed, exposes active cues and fires cue events.
|
|
3843
|
-
*/
|
|
3844
|
-
mode: string;
|
|
3869
|
+
interface RelatedContentSource {
|
|
3845
3870
|
/**
|
|
3846
|
-
* The
|
|
3871
|
+
* The duration of the related content source.
|
|
3847
3872
|
*/
|
|
3848
|
-
|
|
3873
|
+
duration?: string;
|
|
3849
3874
|
/**
|
|
3850
|
-
* The
|
|
3875
|
+
* The image of the related content source.
|
|
3851
3876
|
*/
|
|
3852
|
-
|
|
3877
|
+
image: string;
|
|
3853
3878
|
/**
|
|
3854
|
-
* The
|
|
3879
|
+
* The target URL for the related content source.
|
|
3855
3880
|
*
|
|
3856
3881
|
* @remarks
|
|
3857
|
-
* <br/> -
|
|
3882
|
+
* <br/> - Mutually exclusive with {@link RelatedContentSource.source}.
|
|
3883
|
+
* <br/> - Required if {@link RelatedContentSource.source} is not present.
|
|
3858
3884
|
*/
|
|
3859
|
-
|
|
3885
|
+
link?: string;
|
|
3860
3886
|
/**
|
|
3861
|
-
* The
|
|
3887
|
+
* The source description of the related content source.
|
|
3862
3888
|
*
|
|
3863
3889
|
* @remarks
|
|
3864
|
-
* <br/> -
|
|
3865
|
-
* <br/> -
|
|
3866
|
-
* <br/> - If the {@link TextTrack.mode} is `'disabled'`, this property is `null`.
|
|
3867
|
-
*/
|
|
3868
|
-
readonly activeCues: TextTrackCueList | null;
|
|
3869
|
-
/**
|
|
3870
|
-
* The source of the text track.
|
|
3871
|
-
*/
|
|
3872
|
-
readonly src: string;
|
|
3873
|
-
/**
|
|
3874
|
-
* Indicates whether the track contains Forced Narrative cues.
|
|
3875
|
-
* This may only be true for subtitle tracks where
|
|
3876
|
-
* <br/> - For DASH: the corresponding AdaptationSet contains a child Role with its value attribute equal to `'forced_subtitle'`
|
|
3877
|
-
* <br/> - For HLS: the corresponding #EXT-X-MEDIA tag contains the attributes TYPE=SUBTITLES and FORCED=YES (not supported yet)
|
|
3878
|
-
*/
|
|
3879
|
-
readonly forced: boolean;
|
|
3880
|
-
/**
|
|
3881
|
-
* {@inheritDoc EventDispatcher.addEventListener}
|
|
3890
|
+
* <br/> - Mutually exclusive with {@link RelatedContentSource.link}.
|
|
3891
|
+
* <br/> - Required if {@link RelatedContentSource.link} is not present.
|
|
3882
3892
|
*/
|
|
3883
|
-
|
|
3893
|
+
source?: SourceDescription;
|
|
3884
3894
|
/**
|
|
3885
|
-
*
|
|
3895
|
+
* The title of the related content source.
|
|
3886
3896
|
*/
|
|
3887
|
-
|
|
3897
|
+
title?: string;
|
|
3888
3898
|
}
|
|
3889
3899
|
|
|
3890
3900
|
/**
|
|
@@ -11024,16 +11034,34 @@ interface AgamaPlayerConfiguration extends AgamaConfiguration {
|
|
|
11024
11034
|
* The manufacturer of the device
|
|
11025
11035
|
*
|
|
11026
11036
|
* @remarks
|
|
11027
|
-
* <br/> Available since v5.3.0
|
|
11037
|
+
* <br/> - Available since v5.3.0
|
|
11028
11038
|
*/
|
|
11029
11039
|
deviceManufacturer?: string;
|
|
11030
11040
|
/**
|
|
11031
|
-
* The model name of the Device, including the "submodel".
|
|
11041
|
+
* The model name of the Device, including the "submodel".
|
|
11032
11042
|
*
|
|
11033
11043
|
* @remarks
|
|
11034
|
-
* <br/>
|
|
11044
|
+
* <br/> - Use the spelling set by the manufacturer.
|
|
11045
|
+
* <br/> - Available since v5.3.0
|
|
11035
11046
|
*/
|
|
11036
11047
|
deviceModel?: string;
|
|
11048
|
+
/**
|
|
11049
|
+
* The name of the OS that the device is running.
|
|
11050
|
+
*
|
|
11051
|
+
* @remarks
|
|
11052
|
+
* <br/> - Use in combination with `deviceOsVersion`.
|
|
11053
|
+
* <br/> - Include platform's name if the software can be used on various devices (e.g. case of Android platform).
|
|
11054
|
+
* <br/> - Available since v5.9.0
|
|
11055
|
+
*/
|
|
11056
|
+
deviceOs?: string;
|
|
11057
|
+
/**
|
|
11058
|
+
* The version of the OS the device is running.
|
|
11059
|
+
*
|
|
11060
|
+
* @remarks
|
|
11061
|
+
* <br/> - Version should be reported in major.minor.patch notation (i.e. without build information).
|
|
11062
|
+
* <br/> - Available since v5.9.0
|
|
11063
|
+
*/
|
|
11064
|
+
deviceOsVersion?: string;
|
|
11037
11065
|
}
|
|
11038
11066
|
/**
|
|
11039
11067
|
* The stream type, represented by a value from the following list:
|