@castlabs/prestoplay 6.28.0 → 6.29.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/CHANGELOG.md +15 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +7 -7
- package/cjs/cl.cast.js +123 -113
- package/cjs/cl.conviva.js +28 -28
- package/cjs/cl.core.js +616 -609
- package/cjs/cl.crypto.js +7 -7
- package/cjs/cl.dash.js +89 -89
- package/cjs/cl.externs.js +127 -34
- package/cjs/cl.freewheel.js +25 -25
- package/cjs/cl.hls.js +79 -78
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +24 -24
- package/cjs/cl.ima.js +24 -23
- package/cjs/cl.mediatailor.js +3 -3
- package/cjs/cl.mse.js +350 -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 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +70 -70
- package/cjs/cl.ttml.js +29 -29
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +12 -12
- 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 +37 -37
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +6 -6
- package/cl.cast.js +98 -91
- package/cl.conviva.js +27 -27
- package/cl.core.js +492 -488
- package/cl.crypto.js +8 -8
- package/cl.dash.js +82 -82
- package/cl.externs.js +123 -34
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +82 -80
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +16 -15
- package/cl.mediatailor.js +2 -2
- package/cl.mse.js +303 -304
- 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 +60 -60
- 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 +1 -1
- package/typings.d.ts +187 -87
package/typings.d.ts
CHANGED
|
@@ -1347,7 +1347,7 @@ export namespace clpp {
|
|
|
1347
1347
|
/**
|
|
1348
1348
|
* A unique identifier of this configuration object.
|
|
1349
1349
|
* This attribute is optional, except for configuration objects passed to
|
|
1350
|
-
* {@link clpp.
|
|
1350
|
+
* {@link clpp.playlist.ScPlaylist} for which the ID is mandatory, since we
|
|
1351
1351
|
* need a clear way to distinguish different items of the playlist.
|
|
1352
1352
|
*/
|
|
1353
1353
|
id?: string;
|
|
@@ -1646,6 +1646,11 @@ export namespace clpp {
|
|
|
1646
1646
|
* Optional. The URL of the poster.
|
|
1647
1647
|
*/
|
|
1648
1648
|
image?: string;
|
|
1649
|
+
/**
|
|
1650
|
+
* Optional. If false, the item cannot be skipped via playlist controls. This
|
|
1651
|
+
* property is respected only in {@link clpp.cast.playlist.CastPlaylist}.
|
|
1652
|
+
*/
|
|
1653
|
+
skippable?: boolean;
|
|
1649
1654
|
/**
|
|
1650
1655
|
* Optional. The title.
|
|
1651
1656
|
*/
|
|
@@ -4323,7 +4328,7 @@ export namespace clpp {
|
|
|
4323
4328
|
*/
|
|
4324
4329
|
start(): void;
|
|
4325
4330
|
/**
|
|
4326
|
-
* Stop iterating the playlist.
|
|
4331
|
+
* Stop iterating the playlist. Does not stop the playback.
|
|
4327
4332
|
*/
|
|
4328
4333
|
stop(): void;
|
|
4329
4334
|
}
|
|
@@ -4528,6 +4533,9 @@ export namespace clpp {
|
|
|
4528
4533
|
}
|
|
4529
4534
|
|
|
4530
4535
|
namespace Error {
|
|
4536
|
+
/**
|
|
4537
|
+
* Error category.
|
|
4538
|
+
*/
|
|
4531
4539
|
export enum Category {
|
|
4532
4540
|
/**
|
|
4533
4541
|
* Errors from the network stack.
|
|
@@ -4571,6 +4579,9 @@ export namespace clpp {
|
|
|
4571
4579
|
ADS = 10,
|
|
4572
4580
|
}
|
|
4573
4581
|
|
|
4582
|
+
/**
|
|
4583
|
+
* Error code.
|
|
4584
|
+
*/
|
|
4574
4585
|
export enum Code {
|
|
4575
4586
|
/**
|
|
4576
4587
|
* A network request was made using an unsupported URI scheme.
|
|
@@ -5031,8 +5042,7 @@ export namespace clpp {
|
|
|
5031
5042
|
*/
|
|
5032
5043
|
CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM = 4040,
|
|
5033
5044
|
/**
|
|
5034
|
-
*
|
|
5035
|
-
* (MPEG-TS) with MSE.
|
|
5045
|
+
* Due to limitations of the MSE API Fairplay-protected MPEG-TS is not supported.
|
|
5036
5046
|
*/
|
|
5037
5047
|
HLS_MSE_ENCRYPTED_TS_NOT_SUPPORTED = 4041,
|
|
5038
5048
|
/**
|
|
@@ -5453,6 +5463,9 @@ export namespace clpp {
|
|
|
5453
5463
|
SESSIONS_INVALID_CONFIGURATION = 15000,
|
|
5454
5464
|
}
|
|
5455
5465
|
|
|
5466
|
+
/**
|
|
5467
|
+
* Error severity.
|
|
5468
|
+
*/
|
|
5456
5469
|
export enum Severity {
|
|
5457
5470
|
/**
|
|
5458
5471
|
* An error occurred that the player will try to recover from. If retrying
|
|
@@ -5850,8 +5863,9 @@ export namespace clpp {
|
|
|
5850
5863
|
* @param opt_playerConfig optional
|
|
5851
5864
|
* configuration to cast. If omitted, player will try to cast current
|
|
5852
5865
|
* content.
|
|
5866
|
+
* @param opt_queueOptions optional queue items and starting index to load.
|
|
5853
5867
|
*/
|
|
5854
|
-
cast(opt_playerConfig?: clpp.PlayerConfiguration): Promise<void>;
|
|
5868
|
+
cast(opt_playerConfig?: clpp.PlayerConfiguration, opt_queueOptions?: Record<string, any>): Promise<void>;
|
|
5855
5869
|
/**
|
|
5856
5870
|
* Change receiver id. It will close current session, if any.
|
|
5857
5871
|
*
|
|
@@ -6122,6 +6136,89 @@ export namespace clpp {
|
|
|
6122
6136
|
updateContentMetadata(metadata: clpp.cast.utils.ReceiverMetadataObject|null): void;
|
|
6123
6137
|
}
|
|
6124
6138
|
|
|
6139
|
+
namespace playlist {
|
|
6140
|
+
/**
|
|
6141
|
+
* Creates a playlist controller bound to the provided player.
|
|
6142
|
+
*/
|
|
6143
|
+
export class CastPlaylist {
|
|
6144
|
+
/**
|
|
6145
|
+
* Creates a playlist controller bound to the provided player.
|
|
6146
|
+
*
|
|
6147
|
+
* @param player sender player instance
|
|
6148
|
+
* @param castAppId Chromecast receiver application ID
|
|
6149
|
+
* @param playlistItems items to enqueue
|
|
6150
|
+
*/
|
|
6151
|
+
constructor(player: clpp.Player, castAppId: string, playlistItems: Array<clpp.PlaylistItem>);
|
|
6152
|
+
/**
|
|
6153
|
+
* Appends a new item locally and mirrors it to the cast queue when casting.
|
|
6154
|
+
*/
|
|
6155
|
+
append(item: clpp.PlaylistItem): Promise<void>;
|
|
6156
|
+
/**
|
|
6157
|
+
* Returns whether casting is currently active.
|
|
6158
|
+
*/
|
|
6159
|
+
canCast(): boolean;
|
|
6160
|
+
/**
|
|
6161
|
+
* Stops playlist, destroys the current underlying castProxy
|
|
6162
|
+
* and releases player.
|
|
6163
|
+
*/
|
|
6164
|
+
destroy(): void;
|
|
6165
|
+
/**
|
|
6166
|
+
* Returns the index of the currently active playlist item.
|
|
6167
|
+
*/
|
|
6168
|
+
getCurrentIndex(): number;
|
|
6169
|
+
/**
|
|
6170
|
+
* Returns the current local playlist queue.
|
|
6171
|
+
*/
|
|
6172
|
+
getPlaylistItems(): Array<clpp.PlaylistItem>;
|
|
6173
|
+
/**
|
|
6174
|
+
* Returns whether casting is currently active.
|
|
6175
|
+
*/
|
|
6176
|
+
isCasting(): boolean;
|
|
6177
|
+
/**
|
|
6178
|
+
* Moves to the next playlist item using cast queue when casting.
|
|
6179
|
+
*/
|
|
6180
|
+
next(): Promise<void>;
|
|
6181
|
+
/**
|
|
6182
|
+
* Registers a handler for cast availability or connection status changes.
|
|
6183
|
+
*
|
|
6184
|
+
* @param handler callback invoked with event payload
|
|
6185
|
+
*/
|
|
6186
|
+
onCastStatusChanged(handler: Function): clpp.EventCallback;
|
|
6187
|
+
/**
|
|
6188
|
+
* Registers a handler invoked when the active playlist index changes.
|
|
6189
|
+
*
|
|
6190
|
+
* @param handler callback invoked with event payload
|
|
6191
|
+
*/
|
|
6192
|
+
onPlaylistItemChange(handler: Function): clpp.EventCallback;
|
|
6193
|
+
/**
|
|
6194
|
+
* Registers a handler invoked when the playlist content is modified.
|
|
6195
|
+
*
|
|
6196
|
+
* @param handler callback invoked with event payload
|
|
6197
|
+
*/
|
|
6198
|
+
onPlaylistModified(handler: Function): clpp.EventCallback;
|
|
6199
|
+
/**
|
|
6200
|
+
* Pauses playback on the underlying player.
|
|
6201
|
+
*/
|
|
6202
|
+
pause(): void;
|
|
6203
|
+
/**
|
|
6204
|
+
* Plays the underlying player.
|
|
6205
|
+
*/
|
|
6206
|
+
play(): void;
|
|
6207
|
+
/**
|
|
6208
|
+
* Moves to the previous playlist item using cast queue when casting.
|
|
6209
|
+
*/
|
|
6210
|
+
previous(): Promise<void>;
|
|
6211
|
+
/**
|
|
6212
|
+
* Starts playlist playback from the current index.
|
|
6213
|
+
*/
|
|
6214
|
+
start(): void;
|
|
6215
|
+
/**
|
|
6216
|
+
* Starts casting with the current queue or disconnects if already casting.
|
|
6217
|
+
*/
|
|
6218
|
+
toggleCast(): Promise<void>;
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
|
|
6125
6222
|
namespace utils {
|
|
6126
6223
|
/**
|
|
6127
6224
|
* Callback function used to modify load request data before play.
|
|
@@ -6974,7 +7071,7 @@ export namespace clpp {
|
|
|
6974
7071
|
export type LogInterceptor = Function;
|
|
6975
7072
|
|
|
6976
7073
|
/**
|
|
6977
|
-
*
|
|
7074
|
+
* Log level.
|
|
6978
7075
|
*/
|
|
6979
7076
|
export enum Level {
|
|
6980
7077
|
/**
|
|
@@ -7965,82 +8062,7 @@ export namespace clpp {
|
|
|
7965
8062
|
}
|
|
7966
8063
|
}
|
|
7967
8064
|
|
|
7968
|
-
namespace
|
|
7969
|
-
/**
|
|
7970
|
-
* A playlist item.
|
|
7971
|
-
* It consists of an asset/config, a player instances selected
|
|
7972
|
-
* to play this asset and the underlying video element to which the player is
|
|
7973
|
-
* attached.
|
|
7974
|
-
*/
|
|
7975
|
-
export type Item = {
|
|
7976
|
-
/**
|
|
7977
|
-
* Source configuration.
|
|
7978
|
-
*/
|
|
7979
|
-
config: clpp.PlayerConfiguration;
|
|
7980
|
-
/**
|
|
7981
|
-
* The index of the item in the playlist.
|
|
7982
|
-
*/
|
|
7983
|
-
index: number;
|
|
7984
|
-
/**
|
|
7985
|
-
* A player instance.
|
|
7986
|
-
*/
|
|
7987
|
-
player: clpp.Player|null;
|
|
7988
|
-
/**
|
|
7989
|
-
* A promise that resolves when the item is preloaded.
|
|
7990
|
-
*/
|
|
7991
|
-
preloadPromise: Promise<void>;
|
|
7992
|
-
/**
|
|
7993
|
-
* The role of the item.
|
|
7994
|
-
*/
|
|
7995
|
-
role: string;
|
|
7996
|
-
/**
|
|
7997
|
-
* The state of the item (e.g. 'preloading', 'preloaded', 'preload-failed').
|
|
7998
|
-
*/
|
|
7999
|
-
state: string;
|
|
8000
|
-
/**
|
|
8001
|
-
* The video element attached to the player.
|
|
8002
|
-
*/
|
|
8003
|
-
videoEl: HTMLVideoElement|null;
|
|
8004
|
-
}
|
|
8005
|
-
|
|
8006
|
-
/**
|
|
8007
|
-
* Playlist options.
|
|
8008
|
-
*/
|
|
8009
|
-
export type Options = {
|
|
8010
|
-
/**
|
|
8011
|
-
* ID of the HTML element to be used as a container
|
|
8012
|
-
* for video elements created by this playlist.
|
|
8013
|
-
*/
|
|
8014
|
-
anchorId: string;
|
|
8015
|
-
/**
|
|
8016
|
-
* If true, when one item finishes playback the next item is played
|
|
8017
|
-
* automatically and so on until the end of the playlist.
|
|
8018
|
-
*/
|
|
8019
|
-
autoplayNext?: boolean;
|
|
8020
|
-
/**
|
|
8021
|
-
* Default configuration for player instances.
|
|
8022
|
-
*/
|
|
8023
|
-
config: clpp.PlayerConfiguration;
|
|
8024
|
-
/**
|
|
8025
|
-
* If true, preloaded items will have also their media segments preloaded
|
|
8026
|
-
* thus reducing the time to start playback to minimum. This option is
|
|
8027
|
-
* intended to be used with VOD streams.
|
|
8028
|
-
*/
|
|
8029
|
-
preloadMedia?: boolean;
|
|
8030
|
-
/**
|
|
8031
|
-
* A custom callback to toggle the visibility of a video element. By default
|
|
8032
|
-
* this is done via z-index.
|
|
8033
|
-
*/
|
|
8034
|
-
toggleVisible?: Function;
|
|
8035
|
-
/**
|
|
8036
|
-
* Transition method, can be "pause" or "keep-playing". In cause of "pause"
|
|
8037
|
-
* the current video will be paused when calling
|
|
8038
|
-
* {@link clpp.plist.McPlaylist.playNext} or
|
|
8039
|
-
* {@link clpp.plist.McPlaylist.playPrev}.
|
|
8040
|
-
*/
|
|
8041
|
-
transition?: string;
|
|
8042
|
-
}
|
|
8043
|
-
|
|
8065
|
+
namespace playlist {
|
|
8044
8066
|
/**
|
|
8045
8067
|
* Multi-controller playlist intended for fast live TV channel zapping.
|
|
8046
8068
|
* It is based on an architecture which leverages multiple video elements
|
|
@@ -8116,12 +8138,13 @@ export namespace clpp {
|
|
|
8116
8138
|
hasPrev(): boolean;
|
|
8117
8139
|
/**
|
|
8118
8140
|
* Play the first item.
|
|
8119
|
-
* Make sure to set items via {@link clpp.
|
|
8120
|
-
* select the index to start from via
|
|
8141
|
+
* Make sure to set items via {@link clpp.playlist.McPlaylist.setItems} and
|
|
8142
|
+
* select the index to start from via
|
|
8143
|
+
* {@link clpp.playlist.McPlaylist.setIndex}
|
|
8121
8144
|
* before calling this method.
|
|
8122
8145
|
* To switch to the next or previous item use methods
|
|
8123
|
-
* {@link clpp.
|
|
8124
|
-
* {@link clpp.
|
|
8146
|
+
* {@link clpp.playlist.McPlaylist.playNext} and
|
|
8147
|
+
* {@link clpp.playlist.McPlaylist.playPrev}.
|
|
8125
8148
|
*/
|
|
8126
8149
|
playFirst(): Promise<void>;
|
|
8127
8150
|
/**
|
|
@@ -8180,7 +8203,7 @@ export namespace clpp {
|
|
|
8180
8203
|
/**
|
|
8181
8204
|
* Append an item to the end of the playlist.
|
|
8182
8205
|
* This method cannot be called before
|
|
8183
|
-
* {@link clpp.
|
|
8206
|
+
* {@link clpp.playlist.ScPlaylist#open|open()}.
|
|
8184
8207
|
*
|
|
8185
8208
|
* @param config an item which must contain
|
|
8186
8209
|
* at least an `id` and a `source`.
|
|
@@ -8306,6 +8329,83 @@ export namespace clpp {
|
|
|
8306
8329
|
}
|
|
8307
8330
|
}
|
|
8308
8331
|
|
|
8332
|
+
namespace plist {
|
|
8333
|
+
/**
|
|
8334
|
+
* A playlist item.
|
|
8335
|
+
* It consists of an asset/config, a player instances selected
|
|
8336
|
+
* to play this asset and the underlying video element to which the player is
|
|
8337
|
+
* attached.
|
|
8338
|
+
*/
|
|
8339
|
+
export type Item = {
|
|
8340
|
+
/**
|
|
8341
|
+
* Source configuration.
|
|
8342
|
+
*/
|
|
8343
|
+
config: clpp.PlayerConfiguration;
|
|
8344
|
+
/**
|
|
8345
|
+
* The index of the item in the playlist.
|
|
8346
|
+
*/
|
|
8347
|
+
index: number;
|
|
8348
|
+
/**
|
|
8349
|
+
* A player instance.
|
|
8350
|
+
*/
|
|
8351
|
+
player: clpp.Player|null;
|
|
8352
|
+
/**
|
|
8353
|
+
* A promise that resolves when the item is preloaded.
|
|
8354
|
+
*/
|
|
8355
|
+
preloadPromise: Promise<void>;
|
|
8356
|
+
/**
|
|
8357
|
+
* The role of the item.
|
|
8358
|
+
*/
|
|
8359
|
+
role: string;
|
|
8360
|
+
/**
|
|
8361
|
+
* The state of the item (e.g. 'preloading', 'preloaded', 'preload-failed').
|
|
8362
|
+
*/
|
|
8363
|
+
state: string;
|
|
8364
|
+
/**
|
|
8365
|
+
* The video element attached to the player.
|
|
8366
|
+
*/
|
|
8367
|
+
videoEl: HTMLVideoElement|null;
|
|
8368
|
+
}
|
|
8369
|
+
|
|
8370
|
+
/**
|
|
8371
|
+
* Playlist options.
|
|
8372
|
+
*/
|
|
8373
|
+
export type Options = {
|
|
8374
|
+
/**
|
|
8375
|
+
* ID of the HTML element to be used as a container
|
|
8376
|
+
* for video elements created by this playlist.
|
|
8377
|
+
*/
|
|
8378
|
+
anchorId: string;
|
|
8379
|
+
/**
|
|
8380
|
+
* If true, when one item finishes playback the next item is played
|
|
8381
|
+
* automatically and so on until the end of the playlist.
|
|
8382
|
+
*/
|
|
8383
|
+
autoplayNext?: boolean;
|
|
8384
|
+
/**
|
|
8385
|
+
* Default configuration for player instances.
|
|
8386
|
+
*/
|
|
8387
|
+
config: clpp.PlayerConfiguration;
|
|
8388
|
+
/**
|
|
8389
|
+
* If true, preloaded items will have also their media segments preloaded
|
|
8390
|
+
* thus reducing the time to start playback to minimum. This option is
|
|
8391
|
+
* intended to be used with VOD streams.
|
|
8392
|
+
*/
|
|
8393
|
+
preloadMedia?: boolean;
|
|
8394
|
+
/**
|
|
8395
|
+
* A custom callback to toggle the visibility of a video element. By default
|
|
8396
|
+
* this is done via z-index.
|
|
8397
|
+
*/
|
|
8398
|
+
toggleVisible?: Function;
|
|
8399
|
+
/**
|
|
8400
|
+
* Transition method, can be "pause" or "keep-playing". In cause of "pause"
|
|
8401
|
+
* the current video will be paused when calling
|
|
8402
|
+
* {@link clpp.playlist.McPlaylist.playNext} or
|
|
8403
|
+
* {@link clpp.playlist.McPlaylist.playPrev}.
|
|
8404
|
+
*/
|
|
8405
|
+
transition?: string;
|
|
8406
|
+
}
|
|
8407
|
+
}
|
|
8408
|
+
|
|
8309
8409
|
namespace smooth {
|
|
8310
8410
|
export class SmoothComponent {
|
|
8311
8411
|
|