@vindral/web-sdk 2.0.24 → 2.1.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/index.d.ts +12 -3
- package/package.json +1 -1
- package/web-sdk.esm.js +1 -1
- package/web-sdk.umd.js +1 -1
package/index.d.ts
CHANGED
|
@@ -187,6 +187,8 @@ export interface PlaybackSource {
|
|
|
187
187
|
readonly paused: boolean;
|
|
188
188
|
readonly isSeeking: boolean;
|
|
189
189
|
play(initiator: PlayInitiator): Promise<void>;
|
|
190
|
+
load?: () => void;
|
|
191
|
+
unload?: () => void;
|
|
190
192
|
}
|
|
191
193
|
interface MediaElementOptions {
|
|
192
194
|
autoplay: boolean;
|
|
@@ -209,6 +211,7 @@ declare class MediaElement extends Emitter<MediaElementEvents> {
|
|
|
209
211
|
private seekTimes;
|
|
210
212
|
private seekStartTime?;
|
|
211
213
|
private _userProvidedMuted;
|
|
214
|
+
private timers;
|
|
212
215
|
private _userHasProvidedInput;
|
|
213
216
|
isActivated: boolean;
|
|
214
217
|
constructor({ type, autoplay, muted, logger, poster }: MediaElementOptions);
|
|
@@ -225,6 +228,8 @@ declare class MediaElement extends Emitter<MediaElementEvents> {
|
|
|
225
228
|
set muted(muted: boolean);
|
|
226
229
|
get userHasProvidedInput(): boolean;
|
|
227
230
|
get paused(): boolean;
|
|
231
|
+
load: () => void;
|
|
232
|
+
unload: () => void;
|
|
228
233
|
getPlaybackRate: () => number;
|
|
229
234
|
getPlaybackState: () => PlaybackState;
|
|
230
235
|
setPlaybackRate: (rate: number) => void;
|
|
@@ -878,6 +883,7 @@ declare class MseModule {
|
|
|
878
883
|
private quotaErrorCount;
|
|
879
884
|
constructor(logger: Logger, emitter: Emitter<MseModuleListeners, MseModuleEvents>, mediaElement: HTMLMediaElement, tracks: Track[]);
|
|
880
885
|
static create: (logger: Logger, emitter: Emitter<MseModuleListeners, MseModuleEvents>, mediaElement: HTMLMediaElement, tracks: Track[]) => Promise<MseModule>;
|
|
886
|
+
load: () => void;
|
|
881
887
|
unload: () => void;
|
|
882
888
|
getStatistics: () => MseModuleStatistics;
|
|
883
889
|
private open;
|
|
@@ -1274,6 +1280,9 @@ interface FlushOptions {
|
|
|
1274
1280
|
isFinal?: boolean;
|
|
1275
1281
|
initiator: StatsInitiator;
|
|
1276
1282
|
}
|
|
1283
|
+
interface TelemetryStatisticsSource {
|
|
1284
|
+
getStatistics(): Statistics;
|
|
1285
|
+
}
|
|
1277
1286
|
interface TelemetryModuleListeners {
|
|
1278
1287
|
["visibilitystate"]: VisibilityState;
|
|
1279
1288
|
["pagehide"]: PageTransitionEvent;
|
|
@@ -1289,6 +1298,7 @@ declare class TelemetryModule {
|
|
|
1289
1298
|
private emitter;
|
|
1290
1299
|
private options;
|
|
1291
1300
|
private runtimeInfo;
|
|
1301
|
+
private statisticsSource;
|
|
1292
1302
|
private unsentLines;
|
|
1293
1303
|
private retries;
|
|
1294
1304
|
private errorCount;
|
|
@@ -1296,7 +1306,7 @@ declare class TelemetryModule {
|
|
|
1296
1306
|
private statsCount;
|
|
1297
1307
|
private constructor();
|
|
1298
1308
|
unload: () => void;
|
|
1299
|
-
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, unknown>, options: TelemetryModuleOptions, runtimeInfo: () => Record<string, unknown
|
|
1309
|
+
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, unknown>, options: TelemetryModuleOptions, runtimeInfo: () => Record<string, unknown>, statisticsSource: TelemetryStatisticsSource) => TelemetryModule;
|
|
1300
1310
|
load: () => void;
|
|
1301
1311
|
addStats: ({ isFinal, initiator }?: FlushOptions, extra?: Record<string, unknown>) => void;
|
|
1302
1312
|
addEvent: (event: TelemetryEvent) => void;
|
|
@@ -1432,6 +1442,7 @@ export interface PublicVindralEvents {
|
|
|
1432
1442
|
["channels"]: ReadonlyArray<Channel>;
|
|
1433
1443
|
["context switch"]: Readonly<ContextSwitchState>;
|
|
1434
1444
|
["server wallclock time"]: Readonly<number>;
|
|
1445
|
+
["is live"]: boolean;
|
|
1435
1446
|
["buffer state event"]: Readonly<BufferStateEvent>;
|
|
1436
1447
|
["initialized media"]: void;
|
|
1437
1448
|
}
|
|
@@ -1576,7 +1587,6 @@ export interface ConnectResponse {
|
|
|
1576
1587
|
export interface ApiClientOptions {
|
|
1577
1588
|
publicEndpoint: string;
|
|
1578
1589
|
tokenFactory?: AuthorizationTokenFactory;
|
|
1579
|
-
sessionId?: string;
|
|
1580
1590
|
}
|
|
1581
1591
|
export interface AuthorizationContext {
|
|
1582
1592
|
channelGroupId?: string;
|
|
@@ -1586,7 +1596,6 @@ export declare type AuthorizationTokenFactory = (context: AuthorizationContext)
|
|
|
1586
1596
|
export declare class ApiClient {
|
|
1587
1597
|
private baseUrl;
|
|
1588
1598
|
private tokenFactory?;
|
|
1589
|
-
private sessionId?;
|
|
1590
1599
|
constructor(options: ApiClientOptions);
|
|
1591
1600
|
connect(options: ConnectOptions): Promise<ConnectResponse>;
|
|
1592
1601
|
getChannel(channelId: string): Promise<Channel>;
|
package/package.json
CHANGED