@vindral/web-sdk 3.4.4 → 4.0.0-101-g094c7a1b

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.
@@ -0,0 +1,424 @@
1
+ type VideoCodec = "h264" | "av1";
2
+ type MatchingKeys<TRecord, TMatch, K extends keyof TRecord = keyof TRecord> = K extends (TRecord[K] extends TMatch ? K : never) ? K : never;
3
+ type VoidKeys<Record> = MatchingKeys<Record, void>;
4
+ type EventListenerReturnType = (() => void) | void;
5
+ declare class Emitter<TEvents, TEmits = TEvents, ArgLessEvents extends VoidKeys<TEvents> = VoidKeys<TEvents>, ArgEvents extends Exclude<keyof TEvents, ArgLessEvents> = Exclude<keyof TEvents, ArgLessEvents>, ArgLessEmits extends VoidKeys<TEmits> = VoidKeys<TEmits>, ArgEmits extends Exclude<keyof TEmits, ArgLessEmits> = Exclude<keyof TEmits, ArgLessEmits>> {
6
+ private listeners;
7
+ emit<T extends ArgLessEmits>(eventName: T): void;
8
+ emit<T extends ArgEmits>(eventName: T, args: TEmits[T]): void;
9
+ /**
10
+ * Remove an event listener from `eventName`
11
+ */
12
+ off<T extends ArgLessEvents>(eventName: T, fn: () => EventListenerReturnType): void;
13
+ off<T extends ArgEvents>(eventName: T, fn: (args: TEvents[T]) => EventListenerReturnType): void;
14
+ /**
15
+ * Add an event listener to `eventName`
16
+ *
17
+ * Event listeners may optionally return a "defer function" that will be called once all other listeners have been called.
18
+ * This is useful when one listener may want everone to have reacted to an event before calling something.
19
+ */
20
+ on<T extends ArgLessEvents>(eventName: T, fn: () => void): void;
21
+ on<T extends ArgEvents>(eventName: T, fn: (args: TEvents[T]) => void): void;
22
+ /**
23
+ * Add an event listener to `eventName` that will be called once only
24
+ *
25
+ * Event listeners may optionally return a "defer function" that will be called once all other listeners have been called.
26
+ * This is useful when one listener may want everone to have reacted to an event before calling something.
27
+ */
28
+ once<T extends ArgLessEvents>(eventName: T, fn: () => void): void;
29
+ once<T extends ArgEvents>(eventName: T, fn: (args: TEvents[T]) => void): void;
30
+ /**
31
+ * Reset the event emitter
32
+ */
33
+ reset(): void;
34
+ private add;
35
+ }
36
+ declare const LogLevels: readonly [
37
+ "off",
38
+ "error",
39
+ "warn",
40
+ "info",
41
+ "debug",
42
+ "trace"
43
+ ];
44
+ type LogLevel = (typeof LogLevels)[number];
45
+ declare const LogLevel: {
46
+ ERROR: "error";
47
+ WARN: "warn";
48
+ INFO: "info";
49
+ DEBUG: "debug";
50
+ TRACE: "trace";
51
+ OFF: "off";
52
+ };
53
+ interface Metadata {
54
+ /**
55
+ * The raw string content as it was ingested (if using JSON, it needs to be parsed on your end)
56
+ */
57
+ content: string;
58
+ /**
59
+ * Timestamp in ms
60
+ */
61
+ timestamp: number;
62
+ }
63
+ interface ReconnectState {
64
+ /**
65
+ * The number or retry attempts so far.
66
+ * This gets reset on every successful connect, so it will start from zero every
67
+ * time the client instance gets disconnected and will increment until the
68
+ * client instance makes a connection attempt is successful.
69
+ */
70
+ reconnectRetries: number;
71
+ }
72
+ interface Size {
73
+ /** */
74
+ width: number;
75
+ /** */
76
+ height: number;
77
+ }
78
+ interface VideoConstraint {
79
+ /** */
80
+ width: number;
81
+ /** */
82
+ height: number;
83
+ /** */
84
+ bitRate: number;
85
+ /** */
86
+ codec?: VideoCodec;
87
+ /** */
88
+ codecString?: string;
89
+ }
90
+ interface AdvancedOptions {
91
+ /**
92
+ * Constrains wasm decoding to this resolution.
93
+ * By default it is set to 1280 in width and height.
94
+ * This guarantees better performance on older devices and reduces battery drain in general.
95
+ */
96
+ wasmDecodingConstraint: Partial<VideoConstraint>;
97
+ }
98
+ interface DrmOptions {
99
+ /**
100
+ * Headers to be added to requests to license servers
101
+ */
102
+ headers?: Record<string, string>;
103
+ /**
104
+ * Query parameters to be added to requests to license servers
105
+ */
106
+ queryParams?: Record<string, string>;
107
+ }
108
+ type Media = "audio" | "video" | "audio+video";
109
+ interface Options {
110
+ /**
111
+ * URL to use when connecting to the stream
112
+ */
113
+ url: string;
114
+ /**
115
+ * Channel ID to connect to initially - can be changed later mid-stream when connected to a channel group.
116
+ */
117
+ channelId: string;
118
+ /**
119
+ * Channel group to connect to
120
+ * Note: Only needed for fast channel switching
121
+ */
122
+ channelGroupId?: string;
123
+ /**
124
+ * A container to attach the video view in - can be provided later with .attach() on the vindral core instance
125
+ */
126
+ container?: HTMLElement;
127
+ /**
128
+ * An authentication token to provide to the server when connecting - only needed for channels with authentication enabled
129
+ * Note: If not supplied when needed, an "Authentication Failed" error will be raised.
130
+ */
131
+ authenticationToken?: string;
132
+ /**
133
+ * Language to use initially - can be changed during during runtime on the vindral instance
134
+ * Note: Only needed when multiple languages are provided - if no language is specified, one will be automatically selected.
135
+ */
136
+ language?: string;
137
+ /**
138
+ * TextTrack to use initially - can be changed during during runtime on the vindral instance
139
+ */
140
+ textTrack?: string;
141
+ /**
142
+ * Sets the log level - defaults to info
143
+ */
144
+ logLevel?: LogLevel;
145
+ /**
146
+ * Sets the minimum and initial buffer time
147
+ */
148
+ minBufferTime?: number;
149
+ /**
150
+ * Sets the maximum buffer time allowed. The vindral instance will automatically slowly increase
151
+ * the buffer time if the use experiences to much buffering with the initial buffer time.
152
+ */
153
+ maxBufferTime?: number;
154
+ /**
155
+ * Enables or disables user bandwidth savings by capping the video resolution to the size of the video element.
156
+ *
157
+ * Is enabled by default.
158
+ *
159
+ * Note: This is automatically set to false when abrEnabled is set to false.
160
+ */
161
+ sizeBasedResolutionCapEnabled?: boolean;
162
+ /**
163
+ * Enables or disables picture in picture support.
164
+ */
165
+ pictureInPictureEnabled?: boolean;
166
+ /**
167
+ * Enable bursting for initial connection and channel switches. This makes time to first frame faster at the
168
+ * cost of stability (more demanding due to the sudden burst of live content)
169
+ *
170
+ * Is disabled by default.
171
+ *
172
+ */
173
+ burstEnabled?: boolean;
174
+ /**
175
+ * Enable usage of the MediaSource API on supported browsers.
176
+ *
177
+ * Is enabled by default.
178
+ *
179
+ * Note: We recommend to keep this at the default value unless you have very specific needs.
180
+ */
181
+ mseEnabled?: boolean;
182
+ /**
183
+ * Enable Opus with the MediaSource API on supported browsers.
184
+ *
185
+ * Is enabled by default.
186
+ *
187
+ */
188
+ mseOpusEnabled?: boolean;
189
+ /**
190
+ * Enable or disable support for playing audio in the background for iOS devices.
191
+ *
192
+ * Is false (disabled) by default.
193
+ *
194
+ * Note: This may be enabled by default in a future (major) release
195
+ */
196
+ iosBackgroundPlayEnabled?: boolean;
197
+ /**
198
+ * Enable or disable Adaptive Bit Rate. This allows for automatically adapting the incoming bit rate based on
199
+ * the viewers bandwidth and thus avoiding buffering events. This also disables the
200
+ * sizeBasedResolutionCapEnabled option.
201
+ *
202
+ * Is enabled by default.
203
+ *
204
+ * Note: It is strongly recommended to keep this enabled as user experience can greatly suffer without ABR.
205
+ */
206
+ abrEnabled?: boolean;
207
+ /**
208
+ * Enable or disable telemetry. This allows for telemetry and errors being collected.
209
+ *
210
+ * Is enabled by default.
211
+ *
212
+ * We appreciate you turning it off during development/staging to not bloat real telemetry data.
213
+ *
214
+ * Note: It is strongly recommended to keep this enabled in production as it is required for insights and KPIs.
215
+ */
216
+ telemetryEnabled?: boolean;
217
+ /**
218
+ * Set a cap on the maximum video size.
219
+ * This can be used to provide user options to limit the video bandwidth usage.
220
+ *
221
+ * Note: This takes presedence over any size based resolution caps.
222
+ */
223
+ maxSize?: Size;
224
+ /**
225
+ * Maximum audio bit rate allowed.
226
+ * This can be used to provide user options to limit the audio bandwidth usage.
227
+ */
228
+ maxAudioBitRate?: number;
229
+ /**
230
+ * Maximum video bit rate allowed.
231
+ * This can be used to provide user options to limit the video bandwidth usage.
232
+ */
233
+ maxVideoBitRate?: number;
234
+ /**
235
+ * Controls video element background behaviour while loading.
236
+ * - If `false`, a black background will be shown.
237
+ * - If undefined or `true`, a live thumbnail will be shown.
238
+ * - If set to a string containing a URL (https://urltoimage), use that.
239
+ * Default `true` - meaning a live thumbnail is shown
240
+ */
241
+ poster?: boolean | string;
242
+ /**
243
+ * Whether to start the player muted or to try to start playing audio automatically.
244
+ */
245
+ muted?: boolean;
246
+ /**
247
+ * Provide a custom reconnect handler to control when the instance should stop trying to
248
+ * reconnect. The reconnect handler should either return true to allow the reconnect or
249
+ * false to stop reconnecting. It can also return a promise with true or false if it needs
250
+ * to make any async calls before determining wether to reconnect.
251
+ *
252
+ * The default reconnect handler allows 30 reconnects before stopping.
253
+ *
254
+ * Note: the ReconnectState gets reset every time the client instance makes a successful connection.
255
+ * This means the default reconnect handler will only stop reconnecting after 30 _consecutive_ failed connections.
256
+ *
257
+ * ```typescript
258
+ * // An example reconnect handler that will reconnect forever
259
+ * const reconnectHandler = (state: ReconnectState) => true
260
+ *
261
+ * // An example reconnect handler that will fetch an url and determine whether to reconnect
262
+ * const reconnectHandler = async (state: ReconnectState) => {
263
+ * const result = await fetch("https://should-i-reconnect-now.com")
264
+ * return result.ok
265
+ * },
266
+ * ```
267
+ */
268
+ reconnectHandler?: (state: ReconnectState) => Promise<boolean> | boolean;
269
+ tags?: string[];
270
+ ownerSessionId?: string;
271
+ edgeUrl?: string;
272
+ logShippingEnabled?: boolean;
273
+ statsShippingEnabled?: boolean;
274
+ webtransportEnabled?: boolean;
275
+ /**
276
+ * Enable wake lock for iOS devices.
277
+ * The wake lock requires that the audio has been activated at least once for the instance, othwerwise it will not work.
278
+ * Other devices already provide wake lock by default.
279
+ *
280
+ * This option is redundant and has no effect if iosMediaElementEnabled is enabled since that automatically enables wake lock.
281
+ *
282
+ * Disabled by default.
283
+ */
284
+ iosWakeLockEnabled?: boolean;
285
+ /**
286
+ * Disabling this will revert to legacy behaviour where Vindral will try to always keep the video element playing.
287
+ */
288
+ pauseSupportEnabled?: boolean;
289
+ /**
290
+ * Enables iOS devices to use a media element for playback. This enables fullscreen and picture in picture support on iOS.
291
+ */
292
+ iosMediaElementEnabled?: boolean;
293
+ /**
294
+ * Advanced options to override default behaviour.
295
+ */
296
+ advanced?: AdvancedOptions;
297
+ media?: Media;
298
+ videoCodecs?: VideoCodec[];
299
+ /**
300
+ * DRM options to provide to the Vindral instance
301
+ */
302
+ drm?: DrmOptions;
303
+ }
304
+ /**
305
+ * Available events to listen to
306
+ */
307
+ export interface CastSenderEvents {
308
+ /**
309
+ * When a connection has been established with a CastReceiver
310
+ */
311
+ ["connected"]: void;
312
+ /**
313
+ * When a previous session has been resumed
314
+ */
315
+ ["resumed"]: void;
316
+ /**
317
+ * When a CastReceiver has lost or stopped a connection
318
+ */
319
+ ["disconnected"]: void;
320
+ /**
321
+ * When a connection attempt was initiated unsuccessfully
322
+ */
323
+ ["failed"]: void;
324
+ /**
325
+ * When the remote connection emits a metadata event
326
+ */
327
+ ["metadata"]: Metadata;
328
+ /**
329
+ * When the remote connection receives a server wallclock time event
330
+ */
331
+ ["server wallclock time"]: number;
332
+ }
333
+ /**
334
+ * Used for initializing the CastSender
335
+ */
336
+ export interface CastConfig {
337
+ /**
338
+ * The Vindral Options to use for the Cast Receiver
339
+ */
340
+ options: Options;
341
+ /**
342
+ * URL to a background image.
343
+ * Example: "https://via.placeholder.com/256x144"
344
+ */
345
+ background?: string;
346
+ /**
347
+ * Override this if you have your own custom receiver
348
+ */
349
+ receiverApplicationId?: string;
350
+ }
351
+ /**
352
+ * CastSender handles initiation of and communication with the Google Cast Receiver
353
+ */
354
+ export declare class CastSender extends Emitter<CastSenderEvents> {
355
+ private state;
356
+ private config;
357
+ private unloaded;
358
+ constructor(config: CastConfig);
359
+ /**
360
+ * True if the instance is casting right now
361
+ */
362
+ get casting(): boolean;
363
+ /**
364
+ * The current volume
365
+ */
366
+ get volume(): number;
367
+ /**
368
+ * Set the current volume. Setting this to zero is equivalent to muting the video
369
+ */
370
+ set volume(volume: number);
371
+ /**
372
+ * The current language
373
+ */
374
+ get language(): string | undefined;
375
+ /**
376
+ * Set the current language
377
+ */
378
+ set language(language: string | undefined);
379
+ /**
380
+ * The current channelId
381
+ */
382
+ get channelId(): string;
383
+ /**
384
+ * Set the current channelId
385
+ */
386
+ set channelId(channelId: string);
387
+ /**
388
+ * Update authentication token on an already established and authenticated connection
389
+ */
390
+ updateAuthenticationToken: (token: string) => void;
391
+ /**
392
+ * Fully unloads the instance. This disconnects the current listener but lets the
393
+ * cast session continue on the receiving device
394
+ */
395
+ unload: () => void;
396
+ /**
397
+ * Initiates the CastSender.
398
+ * Will reject if Cast is not available on the device or the network.
399
+ */
400
+ init: () => Promise<void>;
401
+ /**
402
+ * Requests a session. It will open the native cast receiver chooser dialog
403
+ */
404
+ start: () => Promise<void>;
405
+ /**
406
+ * Stops a session. It will stop playback on device as well.
407
+ */
408
+ stop: () => void;
409
+ /**
410
+ * Returns a string representing the name of the Cast receiver device or undefined if no receiver exists
411
+ */
412
+ getReceiverName: () => string | undefined;
413
+ private onGCastApiAvailable;
414
+ private send;
415
+ private onMessage;
416
+ private onSessionStarted;
417
+ private onSessionStateChanged;
418
+ private getInstance;
419
+ private getSession;
420
+ private castLibrariesAdded;
421
+ private verifyCastLibraries;
422
+ }
423
+
424
+ export {};
package/cast-sender.js ADDED
@@ -0,0 +1,230 @@
1
+ var u = Object.defineProperty;
2
+ var l = (n, i, e) => i in n ? u(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
+ var s = (n, i, e) => l(n, typeof i != "symbol" ? i + "" : i, e);
4
+ var h = (n, i, e) => new Promise((t, a) => {
5
+ var o = (r) => {
6
+ try {
7
+ c(e.next(r));
8
+ } catch (S) {
9
+ a(S);
10
+ }
11
+ }, d = (r) => {
12
+ try {
13
+ c(e.throw(r));
14
+ } catch (S) {
15
+ a(S);
16
+ }
17
+ }, c = (r) => r.done ? t(r.value) : Promise.resolve(r.value).then(o, d);
18
+ c((e = e.apply(n, i)).next());
19
+ });
20
+ import { E as g } from "./Bx7s5QdT.js";
21
+ class p extends g {
22
+ constructor(e) {
23
+ super();
24
+ s(this, "state", "not casting");
25
+ s(this, "config");
26
+ s(this, "unloaded", !1);
27
+ /**
28
+ * Update authentication token on an already established and authenticated connection
29
+ */
30
+ s(this, "updateAuthenticationToken", (e) => {
31
+ this.config && (this.config.options.authenticationToken = e, this.send({
32
+ type: "updateAuthToken",
33
+ token: e
34
+ }));
35
+ });
36
+ /**
37
+ * Fully unloads the instance. This disconnects the current listener but lets the
38
+ * cast session continue on the receiving device
39
+ */
40
+ s(this, "unload", () => {
41
+ var e;
42
+ this.unloaded = !0, (e = this.getSession()) == null || e.removeMessageListener("urn:x-cast:com.vindral.castdata", this.onMessage);
43
+ });
44
+ /**
45
+ * Initiates the CastSender.
46
+ * Will reject if Cast is not available on the device or the network.
47
+ */
48
+ s(this, "init", () => h(this, null, function* () {
49
+ return new Promise((e, t) => {
50
+ let a = !1;
51
+ const o = setTimeout(() => {
52
+ a = !0, t();
53
+ }, 1e4);
54
+ window.__onGCastApiAvailable = (d) => {
55
+ if (a) {
56
+ a = !1;
57
+ return;
58
+ }
59
+ if (clearTimeout(o), !d)
60
+ return t();
61
+ setTimeout(() => {
62
+ try {
63
+ this.onGCastApiAvailable(), e();
64
+ } catch (c) {
65
+ t();
66
+ }
67
+ }, 1e3);
68
+ }, this.castLibrariesAdded() && window.cast ? window.__onGCastApiAvailable(!0) : this.verifyCastLibraries();
69
+ });
70
+ }));
71
+ /**
72
+ * Requests a session. It will open the native cast receiver chooser dialog
73
+ */
74
+ s(this, "start", () => h(this, null, function* () {
75
+ var e;
76
+ yield (e = this.getInstance()) == null ? void 0 : e.requestSession();
77
+ }));
78
+ /**
79
+ * Stops a session. It will stop playback on device as well.
80
+ */
81
+ s(this, "stop", () => {
82
+ var e;
83
+ (e = this.getSession()) == null || e.endSession(!0);
84
+ });
85
+ /**
86
+ * Returns a string representing the name of the Cast receiver device or undefined if no receiver exists
87
+ */
88
+ s(this, "getReceiverName", () => {
89
+ var e, t;
90
+ return ((t = (e = this.getSession()) == null ? void 0 : e.getCastDevice()) == null ? void 0 : t.friendlyName) || void 0;
91
+ });
92
+ s(this, "onGCastApiAvailable", () => {
93
+ var o;
94
+ const e = this.getInstance();
95
+ if (!e)
96
+ throw "cast context should exist";
97
+ const t = e.getSessionState(), a = ((o = this.config) == null ? void 0 : o.receiverApplicationId) || "A5452297";
98
+ e.setOptions({
99
+ receiverApplicationId: a,
100
+ autoJoinPolicy: chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED,
101
+ resumeSavedSession: !0
102
+ }), e.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED, this.onSessionStateChanged), t === cast.framework.SessionState.SESSION_STARTED && setTimeout(() => {
103
+ this.state = "casting", this.emit("resumed");
104
+ });
105
+ });
106
+ s(this, "send", (e) => {
107
+ var t;
108
+ (t = this.getSession()) == null || t.sendMessage("urn:x-cast:com.vindral.castdata", e);
109
+ });
110
+ s(this, "onMessage", (e, t) => {
111
+ if (e === "urn:x-cast:com.vindral.castdata")
112
+ try {
113
+ const a = JSON.parse(t);
114
+ switch (a.type) {
115
+ case "metadata":
116
+ this.emit("metadata", a.metadata);
117
+ break;
118
+ case "serverWallclockTime":
119
+ this.emit("server wallclock time", a.serverWallclockTime);
120
+ break;
121
+ default:
122
+ break;
123
+ }
124
+ } catch (a) {
125
+ }
126
+ });
127
+ s(this, "onSessionStarted", () => {
128
+ var e;
129
+ (e = this.getSession()) == null || e.addMessageListener("urn:x-cast:com.vindral.castdata", this.onMessage), this.send({
130
+ type: "start",
131
+ config: this.config
132
+ });
133
+ });
134
+ s(this, "onSessionStateChanged", (e) => {
135
+ if (!this.unloaded)
136
+ switch (e.sessionState) {
137
+ case cast.framework.SessionState.SESSION_START_FAILED:
138
+ this.state = "not casting", this.emit("failed");
139
+ break;
140
+ case cast.framework.SessionState.SESSION_ENDED:
141
+ this.state = "not casting", this.emit("disconnected");
142
+ break;
143
+ case cast.framework.SessionState.SESSION_ENDING:
144
+ break;
145
+ case cast.framework.SessionState.SESSION_RESUMED:
146
+ this.onSessionStarted(), this.state = "casting", this.emit("resumed");
147
+ break;
148
+ case cast.framework.SessionState.SESSION_STARTED:
149
+ this.onSessionStarted(), this.state = "casting", this.emit("connected");
150
+ break;
151
+ case cast.framework.SessionState.SESSION_STARTING:
152
+ break;
153
+ }
154
+ });
155
+ s(this, "getInstance", () => {
156
+ var e;
157
+ return (e = window.cast) == null ? void 0 : e.framework.CastContext.getInstance();
158
+ });
159
+ s(this, "getSession", () => {
160
+ var e;
161
+ return (e = this.getInstance()) == null ? void 0 : e.getCurrentSession();
162
+ });
163
+ // check if cast libraries are already added
164
+ s(this, "castLibrariesAdded", () => !!(document.querySelector("#vindralCastFrameworkLib") && document.querySelector("#vindralCastSenderLib")));
165
+ s(this, "verifyCastLibraries", () => {
166
+ if (this.castLibrariesAdded())
167
+ return;
168
+ const e = document.createElement("script");
169
+ e.type = "text/javascript", e.id = "vindralCastFrameworkLib", e.src = "//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js", document.head.appendChild(e);
170
+ const t = document.createElement("script");
171
+ t.type = "text/javascript", t.id = "vindralCastSenderLib", t.src = "//www.gstatic.com/cv/js/sender/v1/cast_sender.js", document.head.appendChild(t);
172
+ });
173
+ this.config = e;
174
+ }
175
+ /**
176
+ * True if the instance is casting right now
177
+ */
178
+ get casting() {
179
+ return this.state === "casting";
180
+ }
181
+ /**
182
+ * The current volume
183
+ */
184
+ get volume() {
185
+ var e, t;
186
+ return (t = (e = this.getSession()) == null ? void 0 : e.getVolume()) != null ? t : 0;
187
+ }
188
+ /**
189
+ * Set the current volume. Setting this to zero is equivalent to muting the video
190
+ */
191
+ set volume(e) {
192
+ var t;
193
+ (t = this.getSession()) == null || t.setVolume(e);
194
+ }
195
+ /**
196
+ * The current language
197
+ */
198
+ get language() {
199
+ var e, t;
200
+ return (t = (e = this.config) == null ? void 0 : e.options) == null ? void 0 : t.language;
201
+ }
202
+ /**
203
+ * Set the current language
204
+ */
205
+ set language(e) {
206
+ this.config && (this.config.options.language = e, this.send({
207
+ type: "setLanguage",
208
+ language: e
209
+ }));
210
+ }
211
+ /**
212
+ * The current channelId
213
+ */
214
+ get channelId() {
215
+ var e;
216
+ return ((e = this.config) == null ? void 0 : e.options.channelId) || "";
217
+ }
218
+ /**
219
+ * Set the current channelId
220
+ */
221
+ set channelId(e) {
222
+ this.config && (this.config.options.channelId = e, this.send({
223
+ type: "setChannelId",
224
+ channelId: e
225
+ }));
226
+ }
227
+ }
228
+ export {
229
+ p as CastSender
230
+ };