@vindral/web-sdk 2.0.16 → 2.0.17
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 +23 -5
- package/package.json +1 -1
- package/web-sdk.esm.js +1 -1
- package/web-sdk.umd.js +1 -1
package/index.d.ts
CHANGED
|
@@ -283,6 +283,7 @@ declare class PlaybackModule {
|
|
|
283
283
|
}
|
|
284
284
|
declare type Direction = "upgrade" | "downgrade" | "double downgrade" | "reconnect";
|
|
285
285
|
interface QualityOfServiceConfig {
|
|
286
|
+
cooldownTime: number;
|
|
286
287
|
maxBufferingEvents: {
|
|
287
288
|
last10Seconds: number;
|
|
288
289
|
last30Seconds: number;
|
|
@@ -302,6 +303,9 @@ interface QualityOfServiceConfig {
|
|
|
302
303
|
interface AdaptivityEvents {
|
|
303
304
|
["adapt level"]: Readonly<Direction>;
|
|
304
305
|
}
|
|
306
|
+
interface AdaptivityStatistics {
|
|
307
|
+
isAbrEnabled: boolean;
|
|
308
|
+
}
|
|
305
309
|
interface QualityOfServiceSource {
|
|
306
310
|
getMetrics(): Metrics;
|
|
307
311
|
getLevelStats(level: RenditionLevel): PerLevelStats | undefined;
|
|
@@ -319,7 +323,6 @@ declare class AdaptivityModule {
|
|
|
319
323
|
private logger;
|
|
320
324
|
private isSuspended;
|
|
321
325
|
private lastAdaptTime;
|
|
322
|
-
private cooldownTime;
|
|
323
326
|
isEnabled: boolean;
|
|
324
327
|
constructor(emitter: Emitter<AdaptivityEvents>, logger: Logger, qualityOfServiceSource: QualityOfServiceSource, config: Partial<QualityOfServiceConfig>);
|
|
325
328
|
static create: (emitter: Emitter<AdaptivityEvents>, logger: Logger, qualityOfServiceSource: QualityOfServiceSource, config?: Partial<QualityOfServiceConfig>) => AdaptivityModule;
|
|
@@ -328,6 +331,7 @@ declare class AdaptivityModule {
|
|
|
328
331
|
suspend: () => void;
|
|
329
332
|
unsuspend: () => void;
|
|
330
333
|
reset: () => void;
|
|
334
|
+
getStatistics: () => AdaptivityStatistics;
|
|
331
335
|
isQoSOk: (renditionLevel: RenditionLevel) => boolean;
|
|
332
336
|
private onBufferState;
|
|
333
337
|
private onAdaptedLevel;
|
|
@@ -444,6 +448,7 @@ interface ConnectionStatistics {
|
|
|
444
448
|
estimatedBandwidth: number;
|
|
445
449
|
edgeUrl?: string;
|
|
446
450
|
connectCount: number;
|
|
451
|
+
connectionAttemptCount: number;
|
|
447
452
|
}
|
|
448
453
|
declare class ConnectionModule {
|
|
449
454
|
private static PING_INTERVAL;
|
|
@@ -806,6 +811,9 @@ interface MseModuleListeners {
|
|
|
806
811
|
["init segment"]: Readonly<InitSegment>;
|
|
807
812
|
["coded sample"]: Readonly<CodedSample>;
|
|
808
813
|
}
|
|
814
|
+
interface MseModuleStatistics {
|
|
815
|
+
quotaErrorCount: number;
|
|
816
|
+
}
|
|
809
817
|
declare class MseModule {
|
|
810
818
|
private logger;
|
|
811
819
|
private timers;
|
|
@@ -817,9 +825,11 @@ declare class MseModule {
|
|
|
817
825
|
private autoRecoverFromMediaErrors;
|
|
818
826
|
private pendingSamples;
|
|
819
827
|
private isWorkingOnPendingSamples;
|
|
828
|
+
private quotaErrorCount;
|
|
820
829
|
constructor(logger: Logger, emitter: Emitter<MseModuleListeners, MseModuleEvents>, mediaElement: HTMLMediaElement, tracks: Track[]);
|
|
821
830
|
static create: (logger: Logger, emitter: Emitter<MseModuleListeners, MseModuleEvents>, mediaElement: HTMLMediaElement, tracks: Track[]) => Promise<MseModule>;
|
|
822
831
|
unload: () => void;
|
|
832
|
+
getStatistics: () => MseModuleStatistics;
|
|
823
833
|
private open;
|
|
824
834
|
getBuffer: (type: Type) => TimeRange[];
|
|
825
835
|
init: (initSegment: Readonly<InitSegment>) => void;
|
|
@@ -871,6 +881,7 @@ interface QualityOfServiceModuleStatistics {
|
|
|
871
881
|
};
|
|
872
882
|
}
|
|
873
883
|
declare class QualityOfServiceModule {
|
|
884
|
+
private readonly minBufferFullnessLengthForRegression;
|
|
874
885
|
private logger;
|
|
875
886
|
private emitter;
|
|
876
887
|
private timers;
|
|
@@ -981,11 +992,11 @@ declare class SyncModule {
|
|
|
981
992
|
private bufferSource;
|
|
982
993
|
private lastSeekTime;
|
|
983
994
|
readonly seekCooldownTime = 1000;
|
|
984
|
-
readonly seekTimeoutTime =
|
|
995
|
+
readonly seekTimeoutTime = 5000;
|
|
985
996
|
readonly syncMaxBehind: number;
|
|
986
997
|
readonly syncMaxBehindMultiplierStep = 1;
|
|
987
|
-
readonly syncMaxBehindIncreaseEvery =
|
|
988
|
-
readonly syncMaxBehindMaximumAllowed =
|
|
998
|
+
readonly syncMaxBehindIncreaseEvery = 3;
|
|
999
|
+
readonly syncMaxBehindMaximumAllowed = 2000;
|
|
989
1000
|
syncMaxBehindMultiplier: number;
|
|
990
1001
|
readonly syncMaxAhead = 150;
|
|
991
1002
|
timeshiftSync: {
|
|
@@ -1026,6 +1037,7 @@ declare class SyncModule {
|
|
|
1026
1037
|
getWallclockTime: (channelId: string) => number | undefined;
|
|
1027
1038
|
getWallclockTimeLatencyAdjusted: (channelId: string) => number | undefined;
|
|
1028
1039
|
get serverCurrentTime(): number;
|
|
1040
|
+
get channelCurrentTime(): number;
|
|
1029
1041
|
processSample: <T extends SyncSample>(sample: T) => T;
|
|
1030
1042
|
getStatistics: () => SyncModuleStatistics;
|
|
1031
1043
|
get drift(): number | undefined;
|
|
@@ -1131,6 +1143,7 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
|
|
|
1131
1143
|
get serverEdgeTime(): number | undefined;
|
|
1132
1144
|
get serverWallclockTime(): number | undefined;
|
|
1133
1145
|
get currentTime(): number;
|
|
1146
|
+
get channelCurrentTime(): number;
|
|
1134
1147
|
get targetBufferTime(): number;
|
|
1135
1148
|
set targetBufferTime(bufferTimeMs: number);
|
|
1136
1149
|
get playbackLatency(): number | undefined;
|
|
@@ -1217,6 +1230,7 @@ declare class TelemetryModule {
|
|
|
1217
1230
|
private unsentLines;
|
|
1218
1231
|
private retries;
|
|
1219
1232
|
private errorCount;
|
|
1233
|
+
private statsCount;
|
|
1220
1234
|
private constructor();
|
|
1221
1235
|
unload: () => void;
|
|
1222
1236
|
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, unknown>, options: TelemetryModuleOptions, statisticsSource: TelemetryStatisticsSource) => TelemetryModule;
|
|
@@ -1387,12 +1401,16 @@ interface AudioRenditionProps {
|
|
|
1387
1401
|
channels: number;
|
|
1388
1402
|
sampleRate: number;
|
|
1389
1403
|
}
|
|
1404
|
+
interface CodecProps {
|
|
1405
|
+
codec: Codec;
|
|
1406
|
+
codecString?: string;
|
|
1407
|
+
}
|
|
1390
1408
|
export declare type VideoRendition = VideoRenditionProps & RenditionProps;
|
|
1391
1409
|
export declare type AudioRendition = AudioRenditionProps & RenditionProps;
|
|
1392
1410
|
export declare type Rendition = VideoRendition | AudioRendition;
|
|
1393
1411
|
export declare const isVideoRendition: (rendition: Readonly<Rendition>) => rendition is VideoRendition;
|
|
1394
1412
|
export declare const isAudioRendition: (rendition: Readonly<Rendition>) => rendition is AudioRendition;
|
|
1395
|
-
export declare const getMimeType: (rendition: Readonly<
|
|
1413
|
+
export declare const getMimeType: (rendition: Readonly<CodecProps>) => string;
|
|
1396
1414
|
interface AudioConstraint {
|
|
1397
1415
|
bitRate: number;
|
|
1398
1416
|
codec?: AudioCodec;
|
package/package.json
CHANGED