@vindral/web-sdk 2.0.26 → 2.1.2

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 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,14 +1281,18 @@ interface FlushOptions {
1275
1281
  isFinal?: boolean;
1276
1282
  initiator: StatsInitiator;
1277
1283
  }
1278
- interface TelemetryStatisticsSource {
1284
+ interface ParentContext {
1279
1285
  getStatistics(): Statistics;
1286
+ readonly connectionState: Readonly<State>;
1280
1287
  }
1281
1288
  interface TelemetryModuleListeners {
1282
1289
  ["visibilitystate"]: VisibilityState;
1283
1290
  ["pagehide"]: PageTransitionEvent;
1284
1291
  ["error"]: Readonly<VindralError>;
1285
1292
  }
1293
+ interface TelemetryModuleEvents {
1294
+ ["send signal"]: Readonly<string>;
1295
+ }
1286
1296
  interface TelemetryModuleStatistics {
1287
1297
  errorCount: number;
1288
1298
  }
@@ -1293,7 +1303,7 @@ declare class TelemetryModule {
1293
1303
  private emitter;
1294
1304
  private options;
1295
1305
  private runtimeInfo;
1296
- private statisticsSource;
1306
+ private parentContext;
1297
1307
  private unsentLines;
1298
1308
  private retries;
1299
1309
  private errorCount;
@@ -1301,7 +1311,7 @@ declare class TelemetryModule {
1301
1311
  private statsCount;
1302
1312
  private constructor();
1303
1313
  unload: () => void;
1304
- static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, unknown>, options: TelemetryModuleOptions, runtimeInfo: () => Record<string, unknown>, statisticsSource: TelemetryStatisticsSource) => TelemetryModule;
1314
+ static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, TelemetryModuleEvents>, options: TelemetryModuleOptions, runtimeInfo: () => Record<string, unknown>, parentContext: ParentContext) => TelemetryModule;
1305
1315
  load: () => void;
1306
1316
  addStats: ({ isFinal, initiator }?: FlushOptions, extra?: Record<string, unknown>) => void;
1307
1317
  addEvent: (event: TelemetryEvent) => void;
@@ -1437,6 +1447,7 @@ export interface PublicVindralEvents {
1437
1447
  ["channels"]: ReadonlyArray<Channel>;
1438
1448
  ["context switch"]: Readonly<ContextSwitchState>;
1439
1449
  ["server wallclock time"]: Readonly<number>;
1450
+ ["is live"]: boolean;
1440
1451
  ["buffer state event"]: Readonly<BufferStateEvent>;
1441
1452
  ["initialized media"]: void;
1442
1453
  }
@@ -1581,7 +1592,6 @@ export interface ConnectResponse {
1581
1592
  export interface ApiClientOptions {
1582
1593
  publicEndpoint: string;
1583
1594
  tokenFactory?: AuthorizationTokenFactory;
1584
- sessionId?: string;
1585
1595
  }
1586
1596
  export interface AuthorizationContext {
1587
1597
  channelGroupId?: string;
@@ -1591,7 +1601,6 @@ export declare type AuthorizationTokenFactory = (context: AuthorizationContext)
1591
1601
  export declare class ApiClient {
1592
1602
  private baseUrl;
1593
1603
  private tokenFactory?;
1594
- private sessionId?;
1595
1604
  constructor(options: ApiClientOptions);
1596
1605
  connect(options: ConnectOptions): Promise<ConnectResponse>;
1597
1606
  getChannel(channelId: string): Promise<Channel>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vindral/web-sdk",
3
- "version": "2.0.26",
3
+ "version": "2.1.2",
4
4
  "homepage": "https://vindral.com",
5
5
  "description": "Web SDK for viewing Vindral streams",
6
6
  "license": "SEE LICENSE IN https://www.vindral.com/terms-conditions",