Skip to content

Commit 36cf1bd

Browse files
authored
🤖 Merge PR DefinitelyTyped#70096 [@types/chromecast-caf-receiver] Add shakaVariant property to CastReceiverOptions by @steve-taylor
1 parent 3bb620f commit 36cf1bd

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎types/chromecast-caf-receiver/cast.framework.d.ts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,24 @@ export class NetworkRequestInfo {
991991
*/
992992
withCredentials: boolean;
993993
}
994+
995+
/**
996+
* Represents variants of Shaka Player that could be loaded.
997+
*
998+
* @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework#.ShakaVariant
999+
*/
1000+
export enum ShakaVariant {
1001+
/**
1002+
* The standard, default build.
1003+
*/
1004+
STANDARD = "STANDARD",
1005+
1006+
/**
1007+
* A debug build.
1008+
*/
1009+
DEBUG = "DEBUG",
1010+
}
1011+
9941012
/**
9951013
* Cast receiver context options. All options are optionals.
9961014
* @see https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.CastReceiverOptions
@@ -1060,6 +1078,13 @@ export class CastReceiverOptions {
10601078
*/
10611079
queue?: QueueBase | undefined;
10621080

1081+
/**
1082+
* Which build of Shaka Player should be loaded.
1083+
*
1084+
* Set to `cast.framework.ShakaVariant.DEBUG` to load a debug build.
1085+
*/
1086+
shakaVariant?: ShakaVariant | undefined;
1087+
10631088
/**
10641089
* Shaka version in the MAJOR.MINOR.PATCH format, for example "3.2.11" (the current default).
10651090
* Supported versions are >=3.2.11 <5.0.0. Deprecated but still compatible versions are >=2.5.6 <3.2.11.

‎types/chromecast-caf-receiver/chromecast-caf-receiver-tests.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ const options = new cast.framework.CastReceiverOptions();
146146
options.versionCode = 0;
147147
options.useShakaForHls = true;
148148
options.shakaVersion = "4.3.5";
149+
options.shakaVariant = cast.framework.ShakaVariant.DEBUG;
149150

150151
cast.framework.CastReceiverContext.getInstance().addEventListener(
151152
[cast.framework.system.EventType.SENDER_CONNECTED, cast.framework.system.EventType.SENDER_DISCONNECTED],

0 commit comments

Comments
 (0)