@castlabs/prestoplay 6.31.0 → 6.32.0-beta.2
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/CHANGELOG.md +38 -0
- package/README.md +2 -2
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +18 -18
- package/cjs/cl.cast.js +127 -125
- package/cjs/cl.cdn.js +13 -0
- package/cjs/cl.conviva.js +32 -32
- package/cjs/cl.core.js +615 -610
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +101 -95
- package/cjs/cl.externs.js +113 -44
- package/cjs/cl.freewheel.js +26 -26
- package/cjs/cl.hls.js +78 -78
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +30 -30
- package/cjs/cl.ima.js +26 -26
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +351 -350
- package/cjs/cl.muxdata.js +14 -14
- package/cjs/cl.onboard.js +4 -4
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.simid.js +16 -16
- package/cjs/cl.smooth.js +71 -71
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +71 -71
- package/cjs/cl.ttml.js +29 -29
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +11 -11
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.yospace.js +4 -4
- package/cjs/cl.youbora.js +40 -40
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +14 -14
- package/cl.cast.js +102 -101
- package/cl.cdn.js +7 -0
- package/cl.conviva.js +27 -27
- package/cl.core.js +498 -495
- package/cl.crypto.js +9 -9
- package/cl.dash.js +91 -87
- package/cl.externs.js +109 -44
- package/cl.freewheel.js +20 -20
- package/cl.hls.js +82 -82
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +20 -20
- package/cl.mediatailor.js +2 -2
- package/cl.mse.js +301 -300
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +10 -10
- package/cl.playlist.js +5 -5
- package/cl.simid.js +14 -14
- package/cl.smooth.js +61 -61
- package/cl.thumbnails.js +19 -19
- package/cl.tizen.js +56 -56
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +14 -14
- package/cl.vtt.js +12 -12
- package/cl.yospace.js +3 -3
- package/cl.youbora.js +31 -31
- package/package.json +10 -1
- package/typings.d.ts +328 -114
package/typings.d.ts
CHANGED
|
@@ -201,7 +201,7 @@ export namespace clpp {
|
|
|
201
201
|
* The default bandwidth estimate to use if there is not enough data, in
|
|
202
202
|
* bit/sec. This value is used for initial video track selection when there
|
|
203
203
|
* is no bandwidth estimation from previous playbacks. If the player instance
|
|
204
|
-
* is destroyed, any new
|
|
204
|
+
* is destroyed, any new open() call will use this value. Otherwise
|
|
205
205
|
* bandwidth estimation from current playback is transferred to the next
|
|
206
206
|
* playback.
|
|
207
207
|
*/
|
|
@@ -662,11 +662,16 @@ export namespace clpp {
|
|
|
662
662
|
* Body of the message.
|
|
663
663
|
*/
|
|
664
664
|
messageData: Uint8Array;
|
|
665
|
+
/**
|
|
666
|
+
* The absolute event presentation time (in units of timescale).
|
|
667
|
+
* Available for EMSG v1.
|
|
668
|
+
*/
|
|
669
|
+
presentationTime?: number;
|
|
665
670
|
/**
|
|
666
671
|
* The offset that the event starts, relative to the start of the segment
|
|
667
|
-
* this is contained in (in units of timescale).
|
|
672
|
+
* this is contained in (in units of timescale). Available for EMSG v0.
|
|
668
673
|
*/
|
|
669
|
-
presentationTimeDelta
|
|
674
|
+
presentationTimeDelta?: number;
|
|
670
675
|
/**
|
|
671
676
|
* Identifies the message scheme.
|
|
672
677
|
*/
|
|
@@ -683,6 +688,10 @@ export namespace clpp {
|
|
|
683
688
|
* Specifies the value for the event.
|
|
684
689
|
*/
|
|
685
690
|
value: string;
|
|
691
|
+
/**
|
|
692
|
+
* Version of the EMSG box (0 or 1).
|
|
693
|
+
*/
|
|
694
|
+
version: number;
|
|
686
695
|
}
|
|
687
696
|
|
|
688
697
|
/**
|
|
@@ -1151,6 +1160,31 @@ export namespace clpp {
|
|
|
1151
1160
|
debug?: boolean;
|
|
1152
1161
|
}
|
|
1153
1162
|
|
|
1163
|
+
/**
|
|
1164
|
+
* Configuration section for NPAW analytics. In addition to the listed
|
|
1165
|
+
* options, all options defined by NPAW are available and will be
|
|
1166
|
+
* passed over to the NPAW SDK. Minimum configuration must include at least
|
|
1167
|
+
* `accountCode`. Please remember to include the NPAW SDK in order to use NPAW
|
|
1168
|
+
* analytics. For more information please visit the
|
|
1169
|
+
* {@link https://documentation.npaw.com/integration-docs/docs/setting-options-and-metadata|NPAW Developer Site}.
|
|
1170
|
+
*/
|
|
1171
|
+
export type NpawConfiguration = {
|
|
1172
|
+
/**
|
|
1173
|
+
* Obligatory account code for NPAW analytics.
|
|
1174
|
+
*/
|
|
1175
|
+
accountCode: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* This label is used to identify disabled subtitles.
|
|
1178
|
+
* Default is "off".
|
|
1179
|
+
*/
|
|
1180
|
+
disabledSubtitlesLabel?: string;
|
|
1181
|
+
/**
|
|
1182
|
+
* A custom function that converts a {@link clpp.Error} to a payload for
|
|
1183
|
+
* NPAW. If it returns `null`, the error will not be sent.
|
|
1184
|
+
*/
|
|
1185
|
+
errorFilter?: clpp.YouboraErrorFilter;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1154
1188
|
/**
|
|
1155
1189
|
* The DRMtoday Onboard configuration.
|
|
1156
1190
|
*/
|
|
@@ -1335,10 +1369,10 @@ export namespace clpp {
|
|
|
1335
1369
|
*
|
|
1336
1370
|
* Some native players, such as the Safari native player, respond with a
|
|
1337
1371
|
* loadedmetadata event before the track model is initialized. This causes
|
|
1338
|
-
* the 'Player.
|
|
1372
|
+
* the 'Player.open()' method to resolve before the tracks are fully
|
|
1339
1373
|
* available. This can be acceptable, for instance if the track model is
|
|
1340
1374
|
* queried dynamically or of the Application listens for track change events.
|
|
1341
|
-
* However, if the
|
|
1375
|
+
* However, if the open promise should wait until data is loaded and the
|
|
1342
1376
|
* tracks are initialized, this flag can be set to true. Note though, if
|
|
1343
1377
|
* preload is set and for instance configured to only load metadata, the
|
|
1344
1378
|
* load promise will only resolve once actual media data are loaded.
|
|
@@ -1402,6 +1436,10 @@ export namespace clpp {
|
|
|
1402
1436
|
* Mux Data Analytics configuration.
|
|
1403
1437
|
*/
|
|
1404
1438
|
muxdata?: Partial<clpp.MuxDataConfiguration>;
|
|
1439
|
+
/**
|
|
1440
|
+
* NPAW analytics plugin configuration.
|
|
1441
|
+
*/
|
|
1442
|
+
npaw?: Partial<clpp.NpawConfiguration>;
|
|
1405
1443
|
/**
|
|
1406
1444
|
* Defaults to false.
|
|
1407
1445
|
*
|
|
@@ -1567,7 +1605,7 @@ export namespace clpp {
|
|
|
1567
1605
|
*/
|
|
1568
1606
|
yospace?: Partial<clpp.YospaceConfiguration>;
|
|
1569
1607
|
/**
|
|
1570
|
-
* Youbora plugin configuration.
|
|
1608
|
+
* Use `npaw` instead. Youbora v6 plugin configuration.
|
|
1571
1609
|
*/
|
|
1572
1610
|
youbora?: Partial<clpp.YouboraConfiguration>;
|
|
1573
1611
|
}
|
|
@@ -1723,6 +1761,19 @@ export namespace clpp {
|
|
|
1723
1761
|
step: number;
|
|
1724
1762
|
}
|
|
1725
1763
|
|
|
1764
|
+
/**
|
|
1765
|
+
* Cast receiver configuration.
|
|
1766
|
+
*/
|
|
1767
|
+
export type ReceiverConfiguration = {
|
|
1768
|
+
/**
|
|
1769
|
+
* If true, Shaka player is used for HLS.
|
|
1770
|
+
* If false, MPL player is used for HLS.
|
|
1771
|
+
* If undefined the default is selected by Chromecast Receiver SDK, for more information see
|
|
1772
|
+
* {@link https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.CastReceiverOptions#useShakaForHls|cast.framework.CastReceiverOptions#useShakaForHls}.
|
|
1773
|
+
*/
|
|
1774
|
+
useShakaForHls?: boolean;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1726
1777
|
/**
|
|
1727
1778
|
* Definition of track that can be loaded remotely.
|
|
1728
1779
|
*/
|
|
@@ -2033,7 +2084,7 @@ export namespace clpp {
|
|
|
2033
2084
|
/**
|
|
2034
2085
|
* Contains statistics and information about the current state of the player.
|
|
2035
2086
|
* This is meant for applications that want to log quality-of-experience (QoE)
|
|
2036
|
-
* or other stats. These values will reset when
|
|
2087
|
+
* or other stats. These values will reset when open() is called again.
|
|
2037
2088
|
*/
|
|
2038
2089
|
export type Stats = {
|
|
2039
2090
|
/**
|
|
@@ -2065,7 +2116,7 @@ export namespace clpp {
|
|
|
2065
2116
|
height: number;
|
|
2066
2117
|
/**
|
|
2067
2118
|
* This is the number of seconds it took for the video element to have enough
|
|
2068
|
-
* data to begin playback.
|
|
2119
|
+
* data to begin playback. This is measured from the time open() is called to
|
|
2069
2120
|
* the time the 'loadeddata' event is fired by the media element.
|
|
2070
2121
|
*/
|
|
2071
2122
|
loadLatency: number;
|
|
@@ -3071,10 +3122,6 @@ export namespace clpp {
|
|
|
3071
3122
|
* Youbora. If it returns `null`, the error will not be sent.
|
|
3072
3123
|
*/
|
|
3073
3124
|
errorFilter?: clpp.YouboraErrorFilter;
|
|
3074
|
-
/**
|
|
3075
|
-
* Enable integration for NPAW Plugin SDK v7
|
|
3076
|
-
*/
|
|
3077
|
-
v7?: boolean;
|
|
3078
3125
|
}
|
|
3079
3126
|
|
|
3080
3127
|
/**
|
|
@@ -3247,7 +3294,7 @@ export namespace clpp {
|
|
|
3247
3294
|
* is changed. It is triggered when a video track is selected to be downloaded
|
|
3248
3295
|
* and appended to the buffer either manually or via the ABR algorithm. If you
|
|
3249
3296
|
* are interested in the currently playing rendition, the one that is on screen,
|
|
3250
|
-
* listen to the {@link clpp.events
|
|
3297
|
+
* listen to the {@link clpp.events.BITRATE_CHANGED}
|
|
3251
3298
|
* event instead.
|
|
3252
3299
|
*/
|
|
3253
3300
|
VIDEO_TRACK_CHANGED = "videotrackchanged",
|
|
@@ -3310,7 +3357,7 @@ export namespace clpp {
|
|
|
3310
3357
|
*/
|
|
3311
3358
|
DRM_RENEWAL_STARTED = "drmrenewalstarted",
|
|
3312
3359
|
/**
|
|
3313
|
-
* Triggered when the DRM
|
|
3360
|
+
* Triggered when the DRM session expiration time is updated.
|
|
3314
3361
|
*/
|
|
3315
3362
|
DRM_EXPIRATION_UPDATE = "drmexpirationupdate",
|
|
3316
3363
|
/**
|
|
@@ -3580,7 +3627,7 @@ export namespace clpp {
|
|
|
3580
3627
|
*
|
|
3581
3628
|
* // The player now has the capability to play HLS and DASH content.
|
|
3582
3629
|
* const player = new clpp.Player(...);
|
|
3583
|
-
* player.
|
|
3630
|
+
* player.open(...);
|
|
3584
3631
|
*/
|
|
3585
3632
|
function install(component: Function): void;
|
|
3586
3633
|
/**
|
|
@@ -3603,7 +3650,7 @@ export namespace clpp {
|
|
|
3603
3650
|
*
|
|
3604
3651
|
* // player2 no longer has the capability to play HLS content.
|
|
3605
3652
|
* const player2 = new clpp.Player(...);
|
|
3606
|
-
* player2.
|
|
3653
|
+
* player2.open(...);
|
|
3607
3654
|
*/
|
|
3608
3655
|
function uninstall(component: Function): void;
|
|
3609
3656
|
/**
|
|
@@ -3753,7 +3800,7 @@ export namespace clpp {
|
|
|
3753
3800
|
destroy(): Promise<void>;
|
|
3754
3801
|
/**
|
|
3755
3802
|
* Returns the ads manager or null if not available.
|
|
3756
|
-
* The ads manager is available when {@link clpp.Player.
|
|
3803
|
+
* The ads manager is available when {@link clpp.Player.open} is resolved.
|
|
3757
3804
|
*/
|
|
3758
3805
|
getAdsManager(): clpp.ads.IAdsManager|null;
|
|
3759
3806
|
/**
|
|
@@ -3774,6 +3821,10 @@ export namespace clpp {
|
|
|
3774
3821
|
* Returns the player configuration.
|
|
3775
3822
|
*/
|
|
3776
3823
|
getConfiguration(): clpp.PlayerConfiguration;
|
|
3824
|
+
/**
|
|
3825
|
+
* Returns source loaded by player.
|
|
3826
|
+
*/
|
|
3827
|
+
getCurrentSource(): clpp.Source|null;
|
|
3777
3828
|
/**
|
|
3778
3829
|
* Returns DRM info for the currently loaded source.
|
|
3779
3830
|
*/
|
|
@@ -3790,9 +3841,6 @@ export namespace clpp {
|
|
|
3790
3841
|
* Get the network engine instance.
|
|
3791
3842
|
*/
|
|
3792
3843
|
getNetworkEngine(): clpp.net.NetworkEngine;
|
|
3793
|
-
/**
|
|
3794
|
-
* Get speed of the playback, where 1 means "normal" speed.
|
|
3795
|
-
*/
|
|
3796
3844
|
getPlaybackRate(): number;
|
|
3797
3845
|
/**
|
|
3798
3846
|
* Access registered player plugins.
|
|
@@ -3819,6 +3867,10 @@ export namespace clpp {
|
|
|
3819
3867
|
* information can be found on {@link https://en.wikipedia.org/wiki/Unix_time | Unix time - Wikipedia}.
|
|
3820
3868
|
*/
|
|
3821
3869
|
getPresentationStartTime(): number|null;
|
|
3870
|
+
/**
|
|
3871
|
+
* Get speed of the playback, where 1 means "normal" speed.
|
|
3872
|
+
*/
|
|
3873
|
+
getRate(): number;
|
|
3822
3874
|
/**
|
|
3823
3875
|
* Gets the time range (in seconds) where it is allowed to seek.
|
|
3824
3876
|
* If the player has not loaded content, this will return a range from 0 to 0.
|
|
@@ -3880,60 +3932,12 @@ export namespace clpp {
|
|
|
3880
3932
|
* Returns true if playback is paused, false otherwise.
|
|
3881
3933
|
*/
|
|
3882
3934
|
isPaused(): boolean;
|
|
3935
|
+
/**
|
|
3936
|
+
* Returns true if the current content being displayed is an ad.
|
|
3937
|
+
*/
|
|
3938
|
+
isPlayingAd(): boolean;
|
|
3883
3939
|
/**
|
|
3884
3940
|
* Tell the player to load given content.
|
|
3885
|
-
* You may load content by passing a `string`, a {@link clpp.Source}, an array
|
|
3886
|
-
* of sources or player configuration. In case of player configuration it
|
|
3887
|
-
* must not contain the `license` attribute.
|
|
3888
|
-
* If multiple sources are passed to the `load` method, the player will play
|
|
3889
|
-
* the first source which is playable on that platform. Please refer to
|
|
3890
|
-
* the examples below for more details.
|
|
3891
|
-
* If the player is already playing another source, it will release itself
|
|
3892
|
-
* first before loading the new source.
|
|
3893
|
-
*
|
|
3894
|
-
* @example // Passing a string
|
|
3895
|
-
*
|
|
3896
|
-
* player.load('http://example.com/manifest.mpd');
|
|
3897
|
-
*
|
|
3898
|
-
* @example // Passing a clpp.Source object
|
|
3899
|
-
*
|
|
3900
|
-
* player.load({
|
|
3901
|
-
* url: 'http://example.com/manifest.mpd',
|
|
3902
|
-
* type: clpp.Type.DASH
|
|
3903
|
-
* });
|
|
3904
|
-
*
|
|
3905
|
-
* @example // Passing an array
|
|
3906
|
-
*
|
|
3907
|
-
* player.load([
|
|
3908
|
-
* // By passing an array, player will load first content that it is able
|
|
3909
|
-
* // to load on given platform (i.e. we cannot load protected DASH on
|
|
3910
|
-
* // Safari). You can mix strings and clpp.Source objects here.
|
|
3911
|
-
* {
|
|
3912
|
-
* url: 'http://example.com/manifest.mpd',
|
|
3913
|
-
* type: clpp.Type.DASH,
|
|
3914
|
-
* drmProtected: true
|
|
3915
|
-
* },
|
|
3916
|
-
* {
|
|
3917
|
-
* url: 'http://example.com/manifest.m3u8',
|
|
3918
|
-
* type: clpp.Type.HLS,
|
|
3919
|
-
* drmProtected: true
|
|
3920
|
-
* },
|
|
3921
|
-
* 'http://example.com/other.mp4'
|
|
3922
|
-
* ]);
|
|
3923
|
-
*
|
|
3924
|
-
* @example // Passing configuration
|
|
3925
|
-
*
|
|
3926
|
-
* player.load({
|
|
3927
|
-
* // under source prop you may pass your manifest URL in all possible ways
|
|
3928
|
-
* // as before: string, clpp.Source object or array of strings /
|
|
3929
|
-
* // clpp.Source objects.
|
|
3930
|
-
* source: 'http://example.com/manifest.mpd',
|
|
3931
|
-
*
|
|
3932
|
-
* // Other configuration options. Passing them allows to extend/modify
|
|
3933
|
-
* // initial configuration passed during player's initialization.
|
|
3934
|
-
* startTime: 4,
|
|
3935
|
-
* preferredTextLanguage: 'en'
|
|
3936
|
-
* });
|
|
3937
3941
|
*/
|
|
3938
3942
|
load(configuration: string|clpp.Source|Array<(string|clpp.Source)>|clpp.PlayerConfiguration): Promise<void>;
|
|
3939
3943
|
/**
|
|
@@ -3958,7 +3962,7 @@ export namespace clpp {
|
|
|
3958
3962
|
* Optionally, scope can be passed in, in which case the callback function
|
|
3959
3963
|
* will be bound/executed in the given scope.
|
|
3960
3964
|
* This method returns a reference to the callback for
|
|
3961
|
-
* convenient removal of the listener via {@link clpp.Player.off}.
|
|
3965
|
+
* convenient removal of the listener via {@link clpp.Player#off|player.off()}.
|
|
3962
3966
|
*
|
|
3963
3967
|
* @param name The event name
|
|
3964
3968
|
* @param callback The callback function
|
|
@@ -3986,7 +3990,7 @@ export namespace clpp {
|
|
|
3986
3990
|
/**
|
|
3987
3991
|
* Adds a one time event listener for the given event.
|
|
3988
3992
|
* The listener will be removed once the event was triggered.
|
|
3989
|
-
* Otherwise
|
|
3993
|
+
* Otherwise it works the same as {@link clpp.Player#on|player.on()}.
|
|
3990
3994
|
*
|
|
3991
3995
|
* @param name The event name
|
|
3992
3996
|
* @param callback The callback function
|
|
@@ -3999,6 +4003,62 @@ export namespace clpp {
|
|
|
3999
4003
|
* });
|
|
4000
4004
|
*/
|
|
4001
4005
|
one(name: string, callback: clpp.EventCallback, opt_callbackScope?: Record<string, any>): clpp.EventCallback;
|
|
4006
|
+
/**
|
|
4007
|
+
* Load a stream.
|
|
4008
|
+
* You may load content by passing a `string`, a {@link clpp.Source}, an array
|
|
4009
|
+
* of sources or player configuration. In case of player configuration it
|
|
4010
|
+
* must not contain the `license` attribute.
|
|
4011
|
+
* If multiple sources are passed to the `open` method, the player will play
|
|
4012
|
+
* the first source which is playable on that platform. Please refer to
|
|
4013
|
+
* the examples below for more details.
|
|
4014
|
+
* If the player is already playing another source, it will release itself
|
|
4015
|
+
* first before loading the new source.
|
|
4016
|
+
*
|
|
4017
|
+
* @example // Passing a string
|
|
4018
|
+
*
|
|
4019
|
+
* player.open('http://example.com/manifest.mpd');
|
|
4020
|
+
*
|
|
4021
|
+
* @example // Passing a clpp.Source object
|
|
4022
|
+
*
|
|
4023
|
+
* player.open({
|
|
4024
|
+
* url: 'http://example.com/manifest.mpd',
|
|
4025
|
+
* type: clpp.Type.DASH
|
|
4026
|
+
* });
|
|
4027
|
+
*
|
|
4028
|
+
* @example // Passing an array
|
|
4029
|
+
*
|
|
4030
|
+
* player.open([
|
|
4031
|
+
* // By passing an array, player will load first content that it is able
|
|
4032
|
+
* // to load on given platform (i.e. we cannot load protected DASH on
|
|
4033
|
+
* // Safari). You can mix strings and clpp.Source objects here.
|
|
4034
|
+
* {
|
|
4035
|
+
* url: 'http://example.com/manifest.mpd',
|
|
4036
|
+
* type: clpp.Type.DASH,
|
|
4037
|
+
* drmProtected: true
|
|
4038
|
+
* },
|
|
4039
|
+
* {
|
|
4040
|
+
* url: 'http://example.com/manifest.m3u8',
|
|
4041
|
+
* type: clpp.Type.HLS,
|
|
4042
|
+
* drmProtected: true
|
|
4043
|
+
* },
|
|
4044
|
+
* 'http://example.com/other.mp4'
|
|
4045
|
+
* ]);
|
|
4046
|
+
*
|
|
4047
|
+
* @example // Passing configuration
|
|
4048
|
+
*
|
|
4049
|
+
* player.open({
|
|
4050
|
+
* // under source prop you may pass your manifest URL in all possible ways
|
|
4051
|
+
* // as before: string, clpp.Source object or array of strings /
|
|
4052
|
+
* // clpp.Source objects.
|
|
4053
|
+
* source: 'http://example.com/manifest.mpd',
|
|
4054
|
+
*
|
|
4055
|
+
* // Other configuration options. Passing them allows to extend/modify
|
|
4056
|
+
* // initial configuration passed during player's initialization.
|
|
4057
|
+
* startTime: 4,
|
|
4058
|
+
* preferredTextLanguage: 'en'
|
|
4059
|
+
* });
|
|
4060
|
+
*/
|
|
4061
|
+
open(configuration: string|clpp.Source|Array<(string|clpp.Source)>|clpp.PlayerConfiguration): Promise<void>;
|
|
4002
4062
|
/**
|
|
4003
4063
|
* Pauses playback.
|
|
4004
4064
|
*/
|
|
@@ -4023,18 +4083,25 @@ export namespace clpp {
|
|
|
4023
4083
|
*/
|
|
4024
4084
|
release(): Promise<void>;
|
|
4025
4085
|
/**
|
|
4086
|
+
* Removes a specified component from the player.
|
|
4087
|
+
* Please note that this operation will only run if the player has been
|
|
4088
|
+
* released or is in IDLE state.
|
|
4089
|
+
* Note that this method may not work correctly in combination with multiple
|
|
4090
|
+
* instances of {@link clpp.Player}. For that scenario please use
|
|
4091
|
+
* {@link clpp.uninstall} instead.
|
|
4092
|
+
*
|
|
4026
4093
|
* @param component Component constructor
|
|
4027
4094
|
*
|
|
4028
4095
|
* @example
|
|
4029
4096
|
*
|
|
4030
4097
|
* const player = new clpp.Player(...);
|
|
4031
4098
|
* player.use(clpp.smooth.SmoothComponent);
|
|
4032
|
-
* player.
|
|
4099
|
+
* player.open('https://example.com/smooth/Manifest');
|
|
4033
4100
|
* ...
|
|
4034
4101
|
* player.release().then(function () {
|
|
4035
4102
|
* player.remove(clpp.smooth.SmoothComponent);
|
|
4036
4103
|
* player.use(clpp.dash.DashComponent);
|
|
4037
|
-
* player.
|
|
4104
|
+
* player.open('https://example/dash/manifest.mpd');
|
|
4038
4105
|
* });
|
|
4039
4106
|
*/
|
|
4040
4107
|
remove(component: Function): boolean;
|
|
@@ -4107,6 +4174,19 @@ export namespace clpp {
|
|
|
4107
4174
|
* @param engine The network engine
|
|
4108
4175
|
*/
|
|
4109
4176
|
setNetworkEngine(engine: clpp.net.NetworkEngine): void;
|
|
4177
|
+
/**
|
|
4178
|
+
* @param rate The rate
|
|
4179
|
+
* @param opt_mode The speedUpMode
|
|
4180
|
+
* to use during trick play
|
|
4181
|
+
*/
|
|
4182
|
+
setPlaybackRate(rate: number, opt_mode?: clpp.SpeedUpMode): void;
|
|
4183
|
+
/**
|
|
4184
|
+
* Set player position in seconds.
|
|
4185
|
+
* To get seekable range, call {@link clpp.Player#getSeekRange}.
|
|
4186
|
+
*
|
|
4187
|
+
* @param time The time in seconds to seek to.
|
|
4188
|
+
*/
|
|
4189
|
+
setPosition(time: number): Promise<void>;
|
|
4110
4190
|
/**
|
|
4111
4191
|
* Set speed of the playback, where 1 means "normal" speed.
|
|
4112
4192
|
* For MSE playback, optional `speedUpMode` can be passed.
|
|
@@ -4118,25 +4198,25 @@ export namespace clpp {
|
|
|
4118
4198
|
*
|
|
4119
4199
|
* @example // Play at double speed.
|
|
4120
4200
|
*
|
|
4121
|
-
* player.
|
|
4201
|
+
* player.setRate(2);
|
|
4122
4202
|
*
|
|
4123
4203
|
* @example // Play at half speed.
|
|
4124
4204
|
*
|
|
4125
|
-
* player.
|
|
4205
|
+
* player.setRate(0.5);
|
|
4126
4206
|
*
|
|
4127
4207
|
* @example // Play at normal speed.
|
|
4128
4208
|
*
|
|
4129
|
-
* player.
|
|
4209
|
+
* player.setRate(1);
|
|
4130
4210
|
*
|
|
4131
4211
|
* @example // Play at double speed backwards.
|
|
4132
4212
|
*
|
|
4133
|
-
* player.
|
|
4213
|
+
* player.setRate(-2);
|
|
4134
4214
|
*
|
|
4135
4215
|
* @example // Play at double speed, using seek mode.
|
|
4136
4216
|
*
|
|
4137
|
-
* player.
|
|
4217
|
+
* player.setRate(2, 'seek');
|
|
4138
4218
|
*/
|
|
4139
|
-
|
|
4219
|
+
setRate(rate: number, opt_mode?: clpp.SpeedUpMode): void;
|
|
4140
4220
|
/**
|
|
4141
4221
|
* Use this to set the volume of the video as a value between 0 and 1. Please
|
|
4142
4222
|
* note that on some platforms setting the volume is not permitted. For
|
|
@@ -4151,6 +4231,16 @@ export namespace clpp {
|
|
|
4151
4231
|
*/
|
|
4152
4232
|
setVolume(volume: number): void;
|
|
4153
4233
|
/**
|
|
4234
|
+
* Stop the player.
|
|
4235
|
+
*/
|
|
4236
|
+
stop(): Promise<void>;
|
|
4237
|
+
/**
|
|
4238
|
+
* Registers specified component to player in order to extend its
|
|
4239
|
+
* capabilities.
|
|
4240
|
+
* Note that this method may not work correctly in combination with multiple
|
|
4241
|
+
* instances of {@link clpp.Player}. For that scenario please use
|
|
4242
|
+
* {@link clpp.install} instead.
|
|
4243
|
+
*
|
|
4154
4244
|
* @param component component constructor.
|
|
4155
4245
|
*
|
|
4156
4246
|
* @example
|
|
@@ -4278,7 +4368,7 @@ export namespace clpp {
|
|
|
4278
4368
|
* Optionally, scope can be passed in, in which case the callback function
|
|
4279
4369
|
* will be bound/executed in the given scope.
|
|
4280
4370
|
* This method returns a reference to the callback for
|
|
4281
|
-
* convenient removal of the listener via {@link clpp.Playlist.off}.
|
|
4371
|
+
* convenient removal of the listener via {@link clpp.Playlist#off|playlist.off()}.
|
|
4282
4372
|
*
|
|
4283
4373
|
* @param name The event name
|
|
4284
4374
|
* @param callback The callback function
|
|
@@ -4309,7 +4399,7 @@ export namespace clpp {
|
|
|
4309
4399
|
/**
|
|
4310
4400
|
* Adds a one time event listener for the given event.
|
|
4311
4401
|
* The listener will be removed once the event was triggered.
|
|
4312
|
-
* Otherwise
|
|
4402
|
+
* Otherwise it works the same as {@link clpp.Playlist#on|playlist.on()}.
|
|
4313
4403
|
*
|
|
4314
4404
|
* @param name The event name
|
|
4315
4405
|
* @param callback The callback function
|
|
@@ -4471,13 +4561,19 @@ export namespace clpp {
|
|
|
4471
4561
|
|
|
4472
4562
|
export class TrackManager {
|
|
4473
4563
|
/**
|
|
4474
|
-
*
|
|
4564
|
+
* Side-loads an external text track from a remote URL.
|
|
4565
|
+
* Loads a text track from a URL and makes it available for selection
|
|
4566
|
+
* alongside any tracks embedded in the manifest. The returned
|
|
4567
|
+
* promise resolves once the track has been successfully added.
|
|
4568
|
+
*
|
|
4569
|
+
* @param track The remote text track descriptor to
|
|
4570
|
+
* load.
|
|
4475
4571
|
*/
|
|
4476
4572
|
addTextTrack(track: clpp.RemoteTextTrack): Promise<void>;
|
|
4477
4573
|
/**
|
|
4478
|
-
*
|
|
4479
|
-
*
|
|
4480
|
-
* will
|
|
4574
|
+
* Returns whether this platform supports manual video track selection.
|
|
4575
|
+
* When false, any calls to {@link clpp.TrackManager#setVideoTrack|setVideoTrack()}
|
|
4576
|
+
* or {@link clpp.TrackManager#setVideoRendition|setVideoRendition()} will have no effect.
|
|
4481
4577
|
*/
|
|
4482
4578
|
canSelectVideoTracks(): boolean;
|
|
4483
4579
|
/**
|
|
@@ -4486,7 +4582,13 @@ export namespace clpp {
|
|
|
4486
4582
|
*/
|
|
4487
4583
|
findAudioRendition(filter: Record<string, any>): clpp.Rendition|undefined;
|
|
4488
4584
|
/**
|
|
4489
|
-
*
|
|
4585
|
+
* Searches the audio tracks for the first one matching the filter.
|
|
4586
|
+
* Returns the audio track whose properties match all key-value pairs in
|
|
4587
|
+
* the filter object. Useful for selecting a track by language, codec,
|
|
4588
|
+
* or any other {@link clpp.Track} property.
|
|
4589
|
+
*
|
|
4590
|
+
* @param filter An object whose keys and values must all match
|
|
4591
|
+
* the corresponding properties of the returned track.
|
|
4490
4592
|
*/
|
|
4491
4593
|
findAudioTrack(filter: Record<string, any>): clpp.Track|undefined;
|
|
4492
4594
|
/**
|
|
@@ -4495,30 +4597,102 @@ export namespace clpp {
|
|
|
4495
4597
|
*/
|
|
4496
4598
|
findTextRendition(filter: Record<string, any>): clpp.Rendition|undefined;
|
|
4497
4599
|
/**
|
|
4498
|
-
*
|
|
4600
|
+
* Searches the text tracks for the first one matching the filter.
|
|
4601
|
+
* Returns a text track whose properties match all key-value pairs in
|
|
4602
|
+
* the filter object. Useful for selecting a track by language, kind,
|
|
4603
|
+
* or any other {@link clpp.Track} property.
|
|
4604
|
+
*
|
|
4605
|
+
* @param filter An object whose keys and values must all match
|
|
4606
|
+
* the corresponding properties of the returned track.
|
|
4499
4607
|
*/
|
|
4500
4608
|
findTextTrack(filter: Record<string, any>): clpp.Track|undefined;
|
|
4501
4609
|
/**
|
|
4502
|
-
*
|
|
4503
|
-
*
|
|
4610
|
+
* Searches across all video renditions for the first one matching the filter.
|
|
4611
|
+
* Returns the video rendition whose properties match all key-value
|
|
4612
|
+
* pairs in the filter object. Useful for finding a rendition by bitrate,
|
|
4613
|
+
* resolution, or codec.
|
|
4614
|
+
*
|
|
4615
|
+
* @param filter An object whose keys and values must all match
|
|
4616
|
+
* the corresponding properties of the returned rendition.
|
|
4504
4617
|
*/
|
|
4505
4618
|
findVideoRendition(filter: Record<string, any>): clpp.Rendition|undefined;
|
|
4506
4619
|
/**
|
|
4507
|
-
*
|
|
4620
|
+
* Searches video tracks for the first one matching the filter.
|
|
4621
|
+
* Returns the video track whose properties match all key-value pairs in
|
|
4622
|
+
* the filter object. Useful for selecting a track by codec, or any
|
|
4623
|
+
* other {@link clpp.Track} property.
|
|
4624
|
+
*
|
|
4625
|
+
* @param filter An object whose keys and values must all match
|
|
4626
|
+
* the corresponding properties of the returned track.
|
|
4508
4627
|
*/
|
|
4509
4628
|
findVideoTrack(filter: Record<string, any>): clpp.Track|undefined;
|
|
4629
|
+
/**
|
|
4630
|
+
* Returns the audio rendition that is currently being played.
|
|
4631
|
+
* Each audio track typically contains exactly one audio rendition.
|
|
4632
|
+
*/
|
|
4510
4633
|
getAudioRendition(): clpp.Rendition|null;
|
|
4634
|
+
/**
|
|
4635
|
+
* Returns the currently selected audio track.
|
|
4636
|
+
*/
|
|
4511
4637
|
getAudioTrack(): clpp.Track|null;
|
|
4638
|
+
/**
|
|
4639
|
+
* Returns all audio tracks available for the currently loaded content.
|
|
4640
|
+
* Tracks typically represent different languages or audio descriptions.
|
|
4641
|
+
*/
|
|
4512
4642
|
getAudioTracks(): Array<clpp.Track>;
|
|
4643
|
+
/**
|
|
4644
|
+
* Returns the audio rendition that has been selected but not yet fully switched to.
|
|
4645
|
+
* When player switches to the selected rendition this returns `null`.
|
|
4646
|
+
*/
|
|
4513
4647
|
getLoadingAudioRendition(): clpp.Rendition|null;
|
|
4648
|
+
/**
|
|
4649
|
+
* Returns the text rendition that has been selected but not yet fully switched to.
|
|
4650
|
+
* When player switches to the selected rendition this returns `null`.
|
|
4651
|
+
*/
|
|
4514
4652
|
getLoadingTextRendition(): clpp.Rendition|null;
|
|
4653
|
+
/**
|
|
4654
|
+
* Returns the video rendition that has been selected but not yet fully switched to.
|
|
4655
|
+
* When player switches to the selected rendition this returns `null`.
|
|
4656
|
+
*/
|
|
4515
4657
|
getLoadingVideoRendition(): clpp.Rendition|null;
|
|
4658
|
+
/**
|
|
4659
|
+
* Returns the text rendition that is currently being displayed.
|
|
4660
|
+
* When no text rendition is selected it returns `null`.
|
|
4661
|
+
*/
|
|
4516
4662
|
getTextRendition(): clpp.Rendition|null;
|
|
4663
|
+
/**
|
|
4664
|
+
* Returns the currently selected text track.
|
|
4665
|
+
* If no text track is selected this returns `null`.
|
|
4666
|
+
*/
|
|
4517
4667
|
getTextTrack(): clpp.Track|null;
|
|
4668
|
+
/**
|
|
4669
|
+
* Returns all text tracks available for the currently loaded content.
|
|
4670
|
+
* Text tracks can be subtitles or closed captions, typically they represent
|
|
4671
|
+
* different languages.
|
|
4672
|
+
*/
|
|
4518
4673
|
getTextTracks(): Array<clpp.Track>;
|
|
4674
|
+
/**
|
|
4675
|
+
* Returns the video rendition that is currently being played.
|
|
4676
|
+
*/
|
|
4519
4677
|
getVideoRendition(): clpp.Rendition|null;
|
|
4678
|
+
/**
|
|
4679
|
+
* Returns the currently selected video track.
|
|
4680
|
+
*/
|
|
4520
4681
|
getVideoTrack(): clpp.Track|null;
|
|
4682
|
+
/**
|
|
4683
|
+
* Returns all video tracks available for the currently loaded content.
|
|
4684
|
+
* Each track may contain multiple {@link clpp.Rendition} objects representing
|
|
4685
|
+
* different quality levels.
|
|
4686
|
+
*/
|
|
4521
4687
|
getVideoTracks(): Array<clpp.Track>;
|
|
4688
|
+
/**
|
|
4689
|
+
* Returns whether Adaptive Bitrate (ABR) selection is currently active.
|
|
4690
|
+
* When enabled, the player automatically picks the optimal rendition based
|
|
4691
|
+
* on available bandwidth and buffer health. When disabled, the rendition
|
|
4692
|
+
* locked via {@link clpp.TrackManager#setVideoRendition|setVideoRendition()}
|
|
4693
|
+
* or {@link clpp.TrackManager#setAudioRendition|setAudioRendition()} is used.
|
|
4694
|
+
* By default ABR is enabled.
|
|
4695
|
+
*/
|
|
4522
4696
|
isAbrEnabled(): boolean;
|
|
4523
4697
|
/**
|
|
4524
4698
|
* @param rendition The rendition
|
|
@@ -4526,7 +4700,11 @@ export namespace clpp {
|
|
|
4526
4700
|
*/
|
|
4527
4701
|
setAudioRendition(rendition: clpp.Rendition|null, clearBuffer?: boolean): void;
|
|
4528
4702
|
/**
|
|
4529
|
-
*
|
|
4703
|
+
* Selects the given audio track as the active track.
|
|
4704
|
+
* Call this for example to switch to a different audio language. Pass `null`
|
|
4705
|
+
* to let the player choose automatically.
|
|
4706
|
+
*
|
|
4707
|
+
* @param track The audio track to activate, or null.
|
|
4530
4708
|
*/
|
|
4531
4709
|
setAudioTrack(track: clpp.Track|null): void;
|
|
4532
4710
|
/**
|
|
@@ -4535,16 +4713,30 @@ export namespace clpp {
|
|
|
4535
4713
|
*/
|
|
4536
4714
|
setTextRendition(rendition: clpp.Rendition|null, clearBuffer?: boolean): void;
|
|
4537
4715
|
/**
|
|
4538
|
-
*
|
|
4716
|
+
* Selects the given text track as the active track, enabling subtitles or captions.
|
|
4717
|
+
* Pass `null` to disable text track rendering.
|
|
4718
|
+
*
|
|
4719
|
+
* @param track The text track to activate, or null to disable.
|
|
4539
4720
|
*/
|
|
4540
4721
|
setTextTrack(track: clpp.Track|null): void;
|
|
4541
4722
|
/**
|
|
4542
|
-
*
|
|
4543
|
-
*
|
|
4723
|
+
* Locks playback to a specific video rendition (quality level), bypassing ABR.
|
|
4724
|
+
* Pass `null` to re-enable automatic ABR selection.
|
|
4725
|
+
* When clearBuffer is true, the current buffer is flushed to apply the switch
|
|
4726
|
+
* immediately. Otherwise, already buffered video stays at the quality it was
|
|
4727
|
+
* buffered at and only newly buffered media has the newly selected quality level.
|
|
4728
|
+
*
|
|
4729
|
+
* @param rendition The video rendition to lock to, or null
|
|
4730
|
+
* to re-enable ABR.
|
|
4731
|
+
* @param clearBuffer Whether to flush the buffer on switch.
|
|
4544
4732
|
*/
|
|
4545
4733
|
setVideoRendition(rendition: clpp.Rendition|null, clearBuffer?: boolean): void;
|
|
4546
4734
|
/**
|
|
4547
|
-
*
|
|
4735
|
+
* Selects the given video track as the active track.
|
|
4736
|
+
* Pass `null` to let the player choose automatically. Has no effect if
|
|
4737
|
+
* {@link clpp.TrackManager#canSelectVideoTracks | canSelectVideoTracks()} returns false.
|
|
4738
|
+
*
|
|
4739
|
+
* @param track The video track to activate, or null.
|
|
4548
4740
|
*/
|
|
4549
4741
|
setVideoTrack(track: clpp.Track|null): void;
|
|
4550
4742
|
}
|
|
@@ -4838,7 +5030,7 @@ export namespace clpp {
|
|
|
4838
5030
|
* or MIME type. To fix, try one of the following:
|
|
4839
5031
|
*
|
|
4840
5032
|
* Set an explicit type in the {@link clpp.Source} when calling
|
|
4841
|
-
* {@link clpp.Player#
|
|
5033
|
+
* {@link clpp.Player#open}.
|
|
4842
5034
|
* Rename the manifest so that the URI ends in a well-known extension.
|
|
4843
5035
|
* Configure the server to send a recognizable Content-Type header.
|
|
4844
5036
|
* Configure the server to accept a HEAD request for the manifest.
|
|
@@ -5255,8 +5447,8 @@ export namespace clpp {
|
|
|
5255
5447
|
*/
|
|
5256
5448
|
INVALID_SESSION_STORAGE_IMPLEMENTATION = 6202,
|
|
5257
5449
|
/**
|
|
5258
|
-
* The call to Player.
|
|
5259
|
-
* or another call to Player.
|
|
5450
|
+
* The call to Player.open() was interrupted by a call to Player.release()
|
|
5451
|
+
* or another call to Player.open().
|
|
5260
5452
|
*/
|
|
5261
5453
|
LOAD_INTERRUPTED = 7000,
|
|
5262
5454
|
/**
|
|
@@ -5880,7 +6072,7 @@ export namespace clpp {
|
|
|
5880
6072
|
* Start casting.
|
|
5881
6073
|
* If the player has some loaded content, it will be casted. Otherwise,
|
|
5882
6074
|
* the casting session will start empty and wait for a call to
|
|
5883
|
-
* {@link clpp.Player#
|
|
6075
|
+
* {@link clpp.Player#open}.
|
|
5884
6076
|
*
|
|
5885
6077
|
* @param opt_playerConfig optional
|
|
5886
6078
|
* configuration to cast. If omitted, player will try to cast current
|
|
@@ -5960,7 +6152,7 @@ export namespace clpp {
|
|
|
5960
6152
|
* Set Cast content metadata to one of the `chrome.cast.media.*Metadata`
|
|
5961
6153
|
* objects (See {@link https://developers.google.com/cast/docs/reference/web_sender/chrome.cast.media#.MetadataType}),
|
|
5962
6154
|
* or clear it by passing `null`.
|
|
5963
|
-
* Note: You must set content metadata before calling cast/
|
|
6155
|
+
* Note: You must set content metadata before calling cast/open, otherwise
|
|
5964
6156
|
* it will have no effect. Correctly setting metadata is crucial for some
|
|
5965
6157
|
* functionalities, especially for live streams, to work correctly.
|
|
5966
6158
|
*
|
|
@@ -6155,8 +6347,10 @@ export namespace clpp {
|
|
|
6155
6347
|
setQueue(queue: any): void;
|
|
6156
6348
|
/**
|
|
6157
6349
|
* Starts listening to commands coming in from the sender.
|
|
6350
|
+
*
|
|
6351
|
+
* @param configuration configuration
|
|
6158
6352
|
*/
|
|
6159
|
-
start(): void;
|
|
6353
|
+
start(configuration?: clpp.ReceiverConfiguration): void;
|
|
6160
6354
|
/**
|
|
6161
6355
|
* Shuts down the Cast Receiver.
|
|
6162
6356
|
* Stops listening to cast session requests and releases resources.
|
|
@@ -6303,6 +6497,12 @@ export namespace clpp {
|
|
|
6303
6497
|
}
|
|
6304
6498
|
}
|
|
6305
6499
|
|
|
6500
|
+
namespace cdn {
|
|
6501
|
+
export class CdnChallengeComponent {
|
|
6502
|
+
|
|
6503
|
+
}
|
|
6504
|
+
}
|
|
6505
|
+
|
|
6306
6506
|
namespace contentSteering {
|
|
6307
6507
|
/**
|
|
6308
6508
|
* Represents a Content Steering Location.
|
|
@@ -6570,7 +6770,21 @@ export namespace clpp {
|
|
|
6570
6770
|
}
|
|
6571
6771
|
|
|
6572
6772
|
export class DrmToday {
|
|
6573
|
-
|
|
6773
|
+
/**
|
|
6774
|
+
* Registers a custom DRMtoday environment with an arbitrary base URL.
|
|
6775
|
+
* Uses the same license request/response modifiers as standard DRMtoday
|
|
6776
|
+
* environments, so auth tokens, session tokens, and CSL all work
|
|
6777
|
+
* identically. This is useful for local testing against a DRMtoday
|
|
6778
|
+
* instance running on a custom host/port.
|
|
6779
|
+
*
|
|
6780
|
+
* @param name The environment name, e.g. 'DRMtoday_LOCAL'
|
|
6781
|
+
* @param baseUrl The base URL, e.g. 'http://localhost:8090/v4/orgId/'
|
|
6782
|
+
* @param opt_urls Optional per-key-system URL
|
|
6783
|
+
* overrides (keys: widevineUrl, playreadyUrl, fairplayUrl). Relative
|
|
6784
|
+
* paths are resolved against baseUrl; absolute URLs are used as-is.
|
|
6785
|
+
* Defaults to the standard DRMtoday suffixes.
|
|
6786
|
+
*/
|
|
6787
|
+
static registerCustom(name: string, baseUrl: string, opt_urls?: Record<string, string>): void;
|
|
6574
6788
|
}
|
|
6575
6789
|
|
|
6576
6790
|
export class HeaderDrm {
|
|
@@ -7911,7 +8125,7 @@ export namespace clpp {
|
|
|
7911
8125
|
* });
|
|
7912
8126
|
* const player = new clpp.Player('video', {
|
|
7913
8127
|
* license: '...',
|
|
7914
|
-
*
|
|
8128
|
+
* npaw: {
|
|
7915
8129
|
* accountCode: 'account_code',
|
|
7916
8130
|
* },
|
|
7917
8131
|
* });
|
|
@@ -7919,7 +8133,7 @@ export namespace clpp {
|
|
|
7919
8133
|
* player.getPlugin(clpp.npaw.NpawPlugin.Id).setNpawPlugin(plugin);
|
|
7920
8134
|
*
|
|
7921
8135
|
* // Now you can start playback.
|
|
7922
|
-
* player.
|
|
8136
|
+
* player.open('http://example.com/Manifest.mpd');
|
|
7923
8137
|
*/
|
|
7924
8138
|
setNpawPlugin(plugin: NpawPlugin|null): void;
|
|
7925
8139
|
}
|
|
@@ -7967,7 +8181,7 @@ export namespace clpp {
|
|
|
7967
8181
|
* player.getPlugin(clpp.npaw.YouboraPlugin.Id).setYouboraPlugin(plugin);
|
|
7968
8182
|
*
|
|
7969
8183
|
* // Now you can start playback.
|
|
7970
|
-
* player.
|
|
8184
|
+
* player.open('http://example.com/Manifest.mpd');
|
|
7971
8185
|
*/
|
|
7972
8186
|
setYouboraPlugin(plugin: any|null): void;
|
|
7973
8187
|
}
|
|
@@ -7989,7 +8203,7 @@ export namespace clpp {
|
|
|
7989
8203
|
* let player = new clpp.Player(...);
|
|
7990
8204
|
*
|
|
7991
8205
|
* // Acquire license
|
|
7992
|
-
* player.
|
|
8206
|
+
* player.open({
|
|
7993
8207
|
* source: 'https://demo.castlabs.com/media/onboard-test/Manifest.mpd',
|
|
7994
8208
|
* drm: {
|
|
7995
8209
|
* env: 'DRMtodayOnboard'
|
|
@@ -8210,7 +8424,7 @@ export namespace clpp {
|
|
|
8210
8424
|
* {@link clpp.Player} so all methods defined there can also be called on
|
|
8211
8425
|
* the playlist instance (e.g. {@link clpp.Player#on|on()},
|
|
8212
8426
|
* {@link clpp.Player#off|off()}, {@link clpp.Player#getPosition|getPosition()},
|
|
8213
|
-
* {@link clpp.Player#
|
|
8427
|
+
* {@link clpp.Player#setPosition|setPosition()}, etc).
|
|
8214
8428
|
* Limitations: Plugins are disabled and the method. Encryption
|
|
8215
8429
|
* is supported only if all the items are encrypted with the same method
|
|
8216
8430
|
* and key.
|
|
@@ -8222,7 +8436,7 @@ export namespace clpp {
|
|
|
8222
8436
|
* {@link clpp.Player} so all methods defined there can also be called on
|
|
8223
8437
|
* the playlist instance (e.g. {@link clpp.Player#on|on()},
|
|
8224
8438
|
* {@link clpp.Player#off|off()}, {@link clpp.Player#getPosition|getPosition()},
|
|
8225
|
-
* {@link clpp.Player#
|
|
8439
|
+
* {@link clpp.Player#setPosition|setPosition()}, etc).
|
|
8226
8440
|
* Limitations: Plugins are disabled and the method. Encryption
|
|
8227
8441
|
* is supported only if all the items are encrypted with the same method
|
|
8228
8442
|
* and key.
|
|
@@ -8237,7 +8451,7 @@ export namespace clpp {
|
|
|
8237
8451
|
/**
|
|
8238
8452
|
* Append an item to the end of the playlist.
|
|
8239
8453
|
* This method cannot be called before
|
|
8240
|
-
* {@link clpp.playlist.ScPlaylist#
|
|
8454
|
+
* {@link clpp.playlist.ScPlaylist#openPlaylist|openPlaylist()}.
|
|
8241
8455
|
*
|
|
8242
8456
|
* @param config an item which must contain
|
|
8243
8457
|
* at least an `id` and a `source`.
|
|
@@ -8316,7 +8530,7 @@ export namespace clpp {
|
|
|
8316
8530
|
*
|
|
8317
8531
|
* @example // Open a playlist of two items, start from the position of 2 minutes and automatically start playback.
|
|
8318
8532
|
*
|
|
8319
|
-
* await playlist.
|
|
8533
|
+
* await playlist.openPlaylist(0, [
|
|
8320
8534
|
* {
|
|
8321
8535
|
* id: 'ASSET1',
|
|
8322
8536
|
* source: { url: '...' },
|
|
@@ -8331,7 +8545,7 @@ export namespace clpp {
|
|
|
8331
8545
|
* }
|
|
8332
8546
|
* ]);
|
|
8333
8547
|
*/
|
|
8334
|
-
|
|
8548
|
+
openPlaylist(index: number, configs: Array<clpp.PlayerConfiguration>): Promise<void>;
|
|
8335
8549
|
/**
|
|
8336
8550
|
* Release the playlist instance resources.
|
|
8337
8551
|
* The playlist can load another source after it was released.
|