@vindral/web-sdk 2.0.25 → 2.1.1
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 +16 -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;
|
|
@@ -1050,6 +1055,7 @@ declare class SyncModule {
|
|
|
1050
1055
|
readonly syncMaxBehindIncreaseEvery = 3;
|
|
1051
1056
|
readonly syncMaxBehindMaximumAllowed = 2000;
|
|
1052
1057
|
syncMaxBehindMultiplier: number;
|
|
1058
|
+
timeshiftOnAudio: boolean;
|
|
1053
1059
|
readonly syncMaxAhead = 150;
|
|
1054
1060
|
timeshiftSync: {
|
|
1055
1061
|
enabled: boolean;
|
|
@@ -1275,11 +1281,18 @@ interface FlushOptions {
|
|
|
1275
1281
|
isFinal?: boolean;
|
|
1276
1282
|
initiator: StatsInitiator;
|
|
1277
1283
|
}
|
|
1284
|
+
interface ParentContext {
|
|
1285
|
+
getStatistics(): Statistics;
|
|
1286
|
+
readonly connectionState: Readonly<State>;
|
|
1287
|
+
}
|
|
1278
1288
|
interface TelemetryModuleListeners {
|
|
1279
1289
|
["visibilitystate"]: VisibilityState;
|
|
1280
1290
|
["pagehide"]: PageTransitionEvent;
|
|
1281
1291
|
["error"]: Readonly<VindralError>;
|
|
1282
1292
|
}
|
|
1293
|
+
interface TelemetryModuleEvents {
|
|
1294
|
+
["send signal"]: Readonly<string>;
|
|
1295
|
+
}
|
|
1283
1296
|
interface TelemetryModuleStatistics {
|
|
1284
1297
|
errorCount: number;
|
|
1285
1298
|
}
|
|
@@ -1290,6 +1303,7 @@ declare class TelemetryModule {
|
|
|
1290
1303
|
private emitter;
|
|
1291
1304
|
private options;
|
|
1292
1305
|
private runtimeInfo;
|
|
1306
|
+
private parentContext;
|
|
1293
1307
|
private unsentLines;
|
|
1294
1308
|
private retries;
|
|
1295
1309
|
private errorCount;
|
|
@@ -1297,7 +1311,7 @@ declare class TelemetryModule {
|
|
|
1297
1311
|
private statsCount;
|
|
1298
1312
|
private constructor();
|
|
1299
1313
|
unload: () => void;
|
|
1300
|
-
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners,
|
|
1314
|
+
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, TelemetryModuleEvents>, options: TelemetryModuleOptions, runtimeInfo: () => Record<string, unknown>, parentContext: ParentContext) => TelemetryModule;
|
|
1301
1315
|
load: () => void;
|
|
1302
1316
|
addStats: ({ isFinal, initiator }?: FlushOptions, extra?: Record<string, unknown>) => void;
|
|
1303
1317
|
addEvent: (event: TelemetryEvent) => void;
|
|
@@ -1433,6 +1447,7 @@ export interface PublicVindralEvents {
|
|
|
1433
1447
|
["channels"]: ReadonlyArray<Channel>;
|
|
1434
1448
|
["context switch"]: Readonly<ContextSwitchState>;
|
|
1435
1449
|
["server wallclock time"]: Readonly<number>;
|
|
1450
|
+
["is live"]: boolean;
|
|
1436
1451
|
["buffer state event"]: Readonly<BufferStateEvent>;
|
|
1437
1452
|
["initialized media"]: void;
|
|
1438
1453
|
}
|
|
@@ -1577,7 +1592,6 @@ export interface ConnectResponse {
|
|
|
1577
1592
|
export interface ApiClientOptions {
|
|
1578
1593
|
publicEndpoint: string;
|
|
1579
1594
|
tokenFactory?: AuthorizationTokenFactory;
|
|
1580
|
-
sessionId?: string;
|
|
1581
1595
|
}
|
|
1582
1596
|
export interface AuthorizationContext {
|
|
1583
1597
|
channelGroupId?: string;
|
|
@@ -1587,7 +1601,6 @@ export declare type AuthorizationTokenFactory = (context: AuthorizationContext)
|
|
|
1587
1601
|
export declare class ApiClient {
|
|
1588
1602
|
private baseUrl;
|
|
1589
1603
|
private tokenFactory?;
|
|
1590
|
-
private sessionId?;
|
|
1591
1604
|
constructor(options: ApiClientOptions);
|
|
1592
1605
|
connect(options: ConnectOptions): Promise<ConnectResponse>;
|
|
1593
1606
|
getChannel(channelId: string): Promise<Channel>;
|
package/package.json
CHANGED