@vindral/web-sdk 4.1.4 → 4.1.5-10-g4a74bcc5
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/{Bs3ZbgIy.js → CPEMXA01.js} +22 -23
- package/CZNJPKf5.js +21736 -0
- package/{CFOrqywf.js → DWTSnZfq.js} +1 -1
- package/{DnKcKE7j.js → Dc-uGlF-.js} +1 -1
- package/{DTm3XZjU.js → DpmCSjGZ.js} +3610 -3449
- package/README.md +6 -0
- package/api-client.d.ts +8 -0
- package/api-client.js +1 -1
- package/cast-sender.d.ts +16 -0
- package/core.d.ts +54 -5
- package/core.js +1 -1
- package/legacy.d.ts +54 -5
- package/legacy.es.js +3950 -3791
- package/legacy.umd.js +9 -9
- package/package.json +1 -1
- package/player.d.ts +91 -21
- package/player.js +2108 -1237
- package/react.d.ts +93 -23
package/README.md
CHANGED
package/api-client.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export interface Channel {
|
|
|
18
18
|
* URLs to fetch thumbnail from
|
|
19
19
|
*/
|
|
20
20
|
thumbnailUrls: string[];
|
|
21
|
+
/**
|
|
22
|
+
* Urls for timeshift if available
|
|
23
|
+
*/
|
|
24
|
+
timeshiftUrls?: string[];
|
|
21
25
|
}
|
|
22
26
|
interface ClientOverrides {
|
|
23
27
|
maxVideoBitRate?: number;
|
|
@@ -150,6 +154,10 @@ interface MoQConnectInfo {
|
|
|
150
154
|
telemetry?: Telemetry;
|
|
151
155
|
channels: ChannelWithCatalog[];
|
|
152
156
|
edges: Edge[];
|
|
157
|
+
timeshift: {
|
|
158
|
+
urls: string[];
|
|
159
|
+
duration: string;
|
|
160
|
+
};
|
|
153
161
|
}
|
|
154
162
|
interface VindralConnectInfo {
|
|
155
163
|
logsUrl?: string;
|
package/api-client.js
CHANGED
package/cast-sender.d.ts
CHANGED
|
@@ -245,6 +245,14 @@ interface Options {
|
|
|
245
245
|
* This can be used to provide user options to limit the video bandwidth usage.
|
|
246
246
|
*/
|
|
247
247
|
maxVideoBitRate?: number;
|
|
248
|
+
/**
|
|
249
|
+
* Initial maximum bit rate cap applied when first connecting to a channel.
|
|
250
|
+
* This helps prevent buffering on initial connection by starting at a conservative bitrate.
|
|
251
|
+
* The client will adapt to higher bitrates as bandwidth allows if ABR is enabled.
|
|
252
|
+
*
|
|
253
|
+
* Default is 2.5 Mbps (2500000 bits per second).
|
|
254
|
+
*/
|
|
255
|
+
maxInitialBitRate?: number;
|
|
248
256
|
/**
|
|
249
257
|
* Controls video element background behaviour while loading.
|
|
250
258
|
* - If `false`, a black background will be shown.
|
|
@@ -257,6 +265,14 @@ interface Options {
|
|
|
257
265
|
* Whether to start the player muted or to try to start playing audio automatically.
|
|
258
266
|
*/
|
|
259
267
|
muted?: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Initial volume level for the player. A floating point value between 0-1.
|
|
270
|
+
* Default is 1 (100% volume).
|
|
271
|
+
*
|
|
272
|
+
* Note: Volume cannot be set on iOS devices due to system restrictions.
|
|
273
|
+
* The volume property is not settable in JavaScript on iOS, and reading it always returns 1.
|
|
274
|
+
*/
|
|
275
|
+
volume?: number;
|
|
260
276
|
/**
|
|
261
277
|
* Provide a custom reconnect handler to control when the instance should stop trying to
|
|
262
278
|
* reconnect. The reconnect handler should either return true to allow the reconnect or
|
package/core.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ interface Channel {
|
|
|
15
15
|
* URLs to fetch thumbnail from
|
|
16
16
|
*/
|
|
17
17
|
thumbnailUrls: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Urls for timeshift if available
|
|
20
|
+
*/
|
|
21
|
+
timeshiftUrls?: string[];
|
|
18
22
|
}
|
|
19
23
|
interface ClientOverrides {
|
|
20
24
|
maxVideoBitRate?: number;
|
|
@@ -219,6 +223,10 @@ interface MoQConnectInfo {
|
|
|
219
223
|
telemetry?: Telemetry;
|
|
220
224
|
channels: ChannelWithCatalog[];
|
|
221
225
|
edges: Edge[];
|
|
226
|
+
timeshift: {
|
|
227
|
+
urls: string[];
|
|
228
|
+
duration: string;
|
|
229
|
+
};
|
|
222
230
|
}
|
|
223
231
|
interface VindralConnectInfo {
|
|
224
232
|
logsUrl?: string;
|
|
@@ -452,6 +460,14 @@ export interface Options {
|
|
|
452
460
|
* This can be used to provide user options to limit the video bandwidth usage.
|
|
453
461
|
*/
|
|
454
462
|
maxVideoBitRate?: number;
|
|
463
|
+
/**
|
|
464
|
+
* Initial maximum bit rate cap applied when first connecting to a channel.
|
|
465
|
+
* This helps prevent buffering on initial connection by starting at a conservative bitrate.
|
|
466
|
+
* The client will adapt to higher bitrates as bandwidth allows if ABR is enabled.
|
|
467
|
+
*
|
|
468
|
+
* Default is 2.5 Mbps (2500000 bits per second).
|
|
469
|
+
*/
|
|
470
|
+
maxInitialBitRate?: number;
|
|
455
471
|
/**
|
|
456
472
|
* Controls video element background behaviour while loading.
|
|
457
473
|
* - If `false`, a black background will be shown.
|
|
@@ -464,6 +480,14 @@ export interface Options {
|
|
|
464
480
|
* Whether to start the player muted or to try to start playing audio automatically.
|
|
465
481
|
*/
|
|
466
482
|
muted?: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* Initial volume level for the player. A floating point value between 0-1.
|
|
485
|
+
* Default is 1 (100% volume).
|
|
486
|
+
*
|
|
487
|
+
* Note: Volume cannot be set on iOS devices due to system restrictions.
|
|
488
|
+
* The volume property is not settable in JavaScript on iOS, and reading it always returns 1.
|
|
489
|
+
*/
|
|
490
|
+
volume?: number;
|
|
467
491
|
/**
|
|
468
492
|
* Provide a custom reconnect handler to control when the instance should stop trying to
|
|
469
493
|
* reconnect. The reconnect handler should either return true to allow the reconnect or
|
|
@@ -785,6 +809,20 @@ interface IncomingDataModuleStatistics {
|
|
|
785
809
|
*/
|
|
786
810
|
bytesReceived: number;
|
|
787
811
|
}
|
|
812
|
+
interface JitterStatistics {
|
|
813
|
+
/** Minimum jitter in the recent window */
|
|
814
|
+
min: number;
|
|
815
|
+
/** Maximum jitter in the recent window for spike detection */
|
|
816
|
+
max: number;
|
|
817
|
+
/** Latest average jitter in ms (recent window) */
|
|
818
|
+
last: number;
|
|
819
|
+
/** Average jitter in ms (RFC 3550 style, smoothed with /16) */
|
|
820
|
+
average: number;
|
|
821
|
+
}
|
|
822
|
+
interface JitterModuleStatistics {
|
|
823
|
+
audioJitter: JitterStatistics | undefined;
|
|
824
|
+
videoJitter: JitterStatistics | undefined;
|
|
825
|
+
}
|
|
788
826
|
interface MseModuleStatistics {
|
|
789
827
|
quotaErrorCount: number;
|
|
790
828
|
mediaSourceOpenTime: number;
|
|
@@ -808,11 +846,11 @@ interface QualityOfServiceModuleStatistics {
|
|
|
808
846
|
*/
|
|
809
847
|
fatalQosCount: number;
|
|
810
848
|
/**
|
|
811
|
-
* Ratio of time being spent on different
|
|
812
|
-
* Example: `"timeSpentRatio": { "
|
|
849
|
+
* Ratio of time being spent on different quality indexes. Index 0 is always the highest quality.
|
|
850
|
+
* Example: `"timeSpentRatio": { "0": 0.8, "1": 0.2 }` shows 80% spent on the best level, 20% on the next one.
|
|
813
851
|
*/
|
|
814
852
|
timeSpentRatio: {
|
|
815
|
-
[
|
|
853
|
+
[qualityIndex: string]: number;
|
|
816
854
|
};
|
|
817
855
|
}
|
|
818
856
|
interface SyncModuleStatistics {
|
|
@@ -859,7 +897,7 @@ declare class UserAgentInformation {
|
|
|
859
897
|
userAgent: string;
|
|
860
898
|
};
|
|
861
899
|
}
|
|
862
|
-
type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & ConnectionStatistics & ConstraintCapStatistics & DecoderStatistics & DocumentStateModulesStatistics & IncomingDataModuleStatistics & MseModuleStatistics & PlaybackModuleStatistics & QualityOfServiceModuleStatistics & RenditionsModuleStatistics & SyncModuleStatistics & TelemetryModuleStatistics & VideoPlayerStatistics;
|
|
900
|
+
type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & ConnectionStatistics & ConstraintCapStatistics & DecoderStatistics & DocumentStateModulesStatistics & IncomingDataModuleStatistics & JitterModuleStatistics & MseModuleStatistics & PlaybackModuleStatistics & QualityOfServiceModuleStatistics & RenditionsModuleStatistics & SyncModuleStatistics & TelemetryModuleStatistics & VideoPlayerStatistics;
|
|
863
901
|
/**
|
|
864
902
|
* Contains internal statistics.
|
|
865
903
|
*
|
|
@@ -909,6 +947,10 @@ export type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["get
|
|
|
909
947
|
*/
|
|
910
948
|
timeToFirstFrame?: number;
|
|
911
949
|
iosMediaElementEnabled?: boolean;
|
|
950
|
+
/**
|
|
951
|
+
* Average bitrate for the entire session in bits/second.
|
|
952
|
+
*/
|
|
953
|
+
averageBitRate?: number;
|
|
912
954
|
};
|
|
913
955
|
/**
|
|
914
956
|
* Represents a Vindral client instance
|
|
@@ -949,7 +991,6 @@ export type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["get
|
|
|
949
991
|
export declare class Vindral extends Emitter<PublicVindralEvents> {
|
|
950
992
|
#private;
|
|
951
993
|
private static MAX_POOL_SIZE;
|
|
952
|
-
private static INITIAL_MAX_BIT_RATE;
|
|
953
994
|
private static DISCONNECT_TIMEOUT;
|
|
954
995
|
private static REMOVE_CUE_THRESHOLD;
|
|
955
996
|
/**
|
|
@@ -1425,6 +1466,10 @@ export interface VolumeState {
|
|
|
1425
1466
|
*/
|
|
1426
1467
|
volume: number;
|
|
1427
1468
|
}
|
|
1469
|
+
interface TimeShiftInfo {
|
|
1470
|
+
urls: string[];
|
|
1471
|
+
duration: string;
|
|
1472
|
+
}
|
|
1428
1473
|
/**
|
|
1429
1474
|
* The events that can be emitted from the Vindral instance
|
|
1430
1475
|
*/
|
|
@@ -1524,6 +1569,10 @@ export interface PublicVindralEvents {
|
|
|
1524
1569
|
* from external sources such as OS media shortcuts or other native UI outside of the browser.
|
|
1525
1570
|
*/
|
|
1526
1571
|
["volume state"]: Readonly<VolumeState>;
|
|
1572
|
+
/**
|
|
1573
|
+
* Emitted when the timeshift URLs are updated.
|
|
1574
|
+
*/
|
|
1575
|
+
["timeshift info"]: Readonly<TimeShiftInfo>;
|
|
1527
1576
|
["buffer state event"]: Readonly<BufferStateEvent>;
|
|
1528
1577
|
["initialized media"]: void;
|
|
1529
1578
|
}
|
package/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as C, e as I, f as _, a as O, C as D, D as T, I as a, N as A, V as s, g as r } from "./
|
|
1
|
+
import { c as C, e as I, f as _, a as O, C as D, D as T, I as a, N as A, V as s, g as r } from "./DpmCSjGZ.js";
|
|
2
2
|
export {
|
|
3
3
|
C as AUTHENTICATION_EXPIRED_CODE,
|
|
4
4
|
I as AUTHENTICATION_FAILED_CODE,
|
package/legacy.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export interface Channel {
|
|
|
18
18
|
* URLs to fetch thumbnail from
|
|
19
19
|
*/
|
|
20
20
|
thumbnailUrls: string[];
|
|
21
|
+
/**
|
|
22
|
+
* Urls for timeshift if available
|
|
23
|
+
*/
|
|
24
|
+
timeshiftUrls?: string[];
|
|
21
25
|
}
|
|
22
26
|
interface ClientOverrides {
|
|
23
27
|
maxVideoBitRate?: number;
|
|
@@ -222,6 +226,10 @@ interface MoQConnectInfo {
|
|
|
222
226
|
telemetry?: Telemetry;
|
|
223
227
|
channels: ChannelWithCatalog[];
|
|
224
228
|
edges: Edge[];
|
|
229
|
+
timeshift: {
|
|
230
|
+
urls: string[];
|
|
231
|
+
duration: string;
|
|
232
|
+
};
|
|
225
233
|
}
|
|
226
234
|
interface VindralConnectInfo {
|
|
227
235
|
logsUrl?: string;
|
|
@@ -455,6 +463,14 @@ export interface Options {
|
|
|
455
463
|
* This can be used to provide user options to limit the video bandwidth usage.
|
|
456
464
|
*/
|
|
457
465
|
maxVideoBitRate?: number;
|
|
466
|
+
/**
|
|
467
|
+
* Initial maximum bit rate cap applied when first connecting to a channel.
|
|
468
|
+
* This helps prevent buffering on initial connection by starting at a conservative bitrate.
|
|
469
|
+
* The client will adapt to higher bitrates as bandwidth allows if ABR is enabled.
|
|
470
|
+
*
|
|
471
|
+
* Default is 2.5 Mbps (2500000 bits per second).
|
|
472
|
+
*/
|
|
473
|
+
maxInitialBitRate?: number;
|
|
458
474
|
/**
|
|
459
475
|
* Controls video element background behaviour while loading.
|
|
460
476
|
* - If `false`, a black background will be shown.
|
|
@@ -467,6 +483,14 @@ export interface Options {
|
|
|
467
483
|
* Whether to start the player muted or to try to start playing audio automatically.
|
|
468
484
|
*/
|
|
469
485
|
muted?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Initial volume level for the player. A floating point value between 0-1.
|
|
488
|
+
* Default is 1 (100% volume).
|
|
489
|
+
*
|
|
490
|
+
* Note: Volume cannot be set on iOS devices due to system restrictions.
|
|
491
|
+
* The volume property is not settable in JavaScript on iOS, and reading it always returns 1.
|
|
492
|
+
*/
|
|
493
|
+
volume?: number;
|
|
470
494
|
/**
|
|
471
495
|
* Provide a custom reconnect handler to control when the instance should stop trying to
|
|
472
496
|
* reconnect. The reconnect handler should either return true to allow the reconnect or
|
|
@@ -800,6 +824,20 @@ interface IncomingDataModuleStatistics {
|
|
|
800
824
|
*/
|
|
801
825
|
bytesReceived: number;
|
|
802
826
|
}
|
|
827
|
+
interface JitterStatistics {
|
|
828
|
+
/** Minimum jitter in the recent window */
|
|
829
|
+
min: number;
|
|
830
|
+
/** Maximum jitter in the recent window for spike detection */
|
|
831
|
+
max: number;
|
|
832
|
+
/** Latest average jitter in ms (recent window) */
|
|
833
|
+
last: number;
|
|
834
|
+
/** Average jitter in ms (RFC 3550 style, smoothed with /16) */
|
|
835
|
+
average: number;
|
|
836
|
+
}
|
|
837
|
+
interface JitterModuleStatistics {
|
|
838
|
+
audioJitter: JitterStatistics | undefined;
|
|
839
|
+
videoJitter: JitterStatistics | undefined;
|
|
840
|
+
}
|
|
803
841
|
interface MseModuleStatistics {
|
|
804
842
|
quotaErrorCount: number;
|
|
805
843
|
mediaSourceOpenTime: number;
|
|
@@ -823,11 +861,11 @@ interface QualityOfServiceModuleStatistics {
|
|
|
823
861
|
*/
|
|
824
862
|
fatalQosCount: number;
|
|
825
863
|
/**
|
|
826
|
-
* Ratio of time being spent on different
|
|
827
|
-
* Example: `"timeSpentRatio": { "
|
|
864
|
+
* Ratio of time being spent on different quality indexes. Index 0 is always the highest quality.
|
|
865
|
+
* Example: `"timeSpentRatio": { "0": 0.8, "1": 0.2 }` shows 80% spent on the best level, 20% on the next one.
|
|
828
866
|
*/
|
|
829
867
|
timeSpentRatio: {
|
|
830
|
-
[
|
|
868
|
+
[qualityIndex: string]: number;
|
|
831
869
|
};
|
|
832
870
|
}
|
|
833
871
|
interface SyncModuleStatistics {
|
|
@@ -874,7 +912,7 @@ declare class UserAgentInformation {
|
|
|
874
912
|
userAgent: string;
|
|
875
913
|
};
|
|
876
914
|
}
|
|
877
|
-
type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & ConnectionStatistics & ConstraintCapStatistics & DecoderStatistics & DocumentStateModulesStatistics & IncomingDataModuleStatistics & MseModuleStatistics & PlaybackModuleStatistics & QualityOfServiceModuleStatistics & RenditionsModuleStatistics & SyncModuleStatistics & TelemetryModuleStatistics & VideoPlayerStatistics;
|
|
915
|
+
type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & ConnectionStatistics & ConstraintCapStatistics & DecoderStatistics & DocumentStateModulesStatistics & IncomingDataModuleStatistics & JitterModuleStatistics & MseModuleStatistics & PlaybackModuleStatistics & QualityOfServiceModuleStatistics & RenditionsModuleStatistics & SyncModuleStatistics & TelemetryModuleStatistics & VideoPlayerStatistics;
|
|
878
916
|
/**
|
|
879
917
|
* Contains internal statistics.
|
|
880
918
|
*
|
|
@@ -924,6 +962,10 @@ export type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["get
|
|
|
924
962
|
*/
|
|
925
963
|
timeToFirstFrame?: number;
|
|
926
964
|
iosMediaElementEnabled?: boolean;
|
|
965
|
+
/**
|
|
966
|
+
* Average bitrate for the entire session in bits/second.
|
|
967
|
+
*/
|
|
968
|
+
averageBitRate?: number;
|
|
927
969
|
};
|
|
928
970
|
/**
|
|
929
971
|
* Represents a Vindral client instance
|
|
@@ -964,7 +1006,6 @@ export type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["get
|
|
|
964
1006
|
export declare class Vindral extends Emitter<PublicVindralEvents> {
|
|
965
1007
|
#private;
|
|
966
1008
|
private static MAX_POOL_SIZE;
|
|
967
|
-
private static INITIAL_MAX_BIT_RATE;
|
|
968
1009
|
private static DISCONNECT_TIMEOUT;
|
|
969
1010
|
private static REMOVE_CUE_THRESHOLD;
|
|
970
1011
|
/**
|
|
@@ -1440,6 +1481,10 @@ export interface VolumeState {
|
|
|
1440
1481
|
*/
|
|
1441
1482
|
volume: number;
|
|
1442
1483
|
}
|
|
1484
|
+
interface TimeShiftInfo {
|
|
1485
|
+
urls: string[];
|
|
1486
|
+
duration: string;
|
|
1487
|
+
}
|
|
1443
1488
|
/**
|
|
1444
1489
|
* The events that can be emitted from the Vindral instance
|
|
1445
1490
|
*/
|
|
@@ -1539,6 +1584,10 @@ export interface PublicVindralEvents {
|
|
|
1539
1584
|
* from external sources such as OS media shortcuts or other native UI outside of the browser.
|
|
1540
1585
|
*/
|
|
1541
1586
|
["volume state"]: Readonly<VolumeState>;
|
|
1587
|
+
/**
|
|
1588
|
+
* Emitted when the timeshift URLs are updated.
|
|
1589
|
+
*/
|
|
1590
|
+
["timeshift info"]: Readonly<TimeShiftInfo>;
|
|
1542
1591
|
["buffer state event"]: Readonly<BufferStateEvent>;
|
|
1543
1592
|
["initialized media"]: void;
|
|
1544
1593
|
}
|