@vindral/web-sdk 4.1.4 → 4.1.5

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/README.md CHANGED
@@ -46,6 +46,12 @@ Install @vindral/web-sdk using `npm`:
46
46
  npm install --save @vindral/web-sdk
47
47
  ```
48
48
 
49
+ or `pnpm`:
50
+
51
+ ```bash
52
+ pnpm install --save @vindral/web-sdk
53
+ ```
54
+
49
55
  or `yarn`:
50
56
 
51
57
  ```bash
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
@@ -1,4 +1,4 @@
1
- import { A as o } from "./Bs3ZbgIy.js";
1
+ import { A as o } from "./CPEMXA01.js";
2
2
  export {
3
3
  o as ApiClient
4
4
  };
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.
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.
@@ -808,11 +824,11 @@ interface QualityOfServiceModuleStatistics {
808
824
  */
809
825
  fatalQosCount: number;
810
826
  /**
811
- * Ratio of time being spent on different bitrates.
812
- * Example: `"timeSpentRatio": { "1160000": 0.2, "2260000": 0.8 }` shows 20% spent on 1.16 Mbps, 80% spent on 2.26 Mbps.
827
+ * Ratio of time being spent on different quality indexes. Index 0 is always the highest quality.
828
+ * Example: `"timeSpentRatio": { "0": 0.8, "1": 0.2 }` shows 80% spent on the best level, 20% on the next one.
813
829
  */
814
830
  timeSpentRatio: {
815
- [bitRate: string]: number;
831
+ [qualityIndex: string]: number;
816
832
  };
817
833
  }
818
834
  interface SyncModuleStatistics {
@@ -821,6 +837,20 @@ interface SyncModuleStatistics {
821
837
  timeshiftDriftAdjustmentCount: number;
822
838
  seekTime: number;
823
839
  }
840
+ interface JitterStatistics {
841
+ /** Minimum jitter in the recent window */
842
+ min: number;
843
+ /** Maximum jitter in the recent window for spike detection */
844
+ max: number;
845
+ /** Latest average jitter in ms (recent window) */
846
+ last: number;
847
+ /** Average jitter in ms (RFC 3550 style, smoothed with /16) */
848
+ average: number;
849
+ }
850
+ interface JitterModuleStatistics {
851
+ audioJitter: JitterStatistics | undefined;
852
+ videoJitter: JitterStatistics | undefined;
853
+ }
824
854
  interface VideoPlayerStatistics {
825
855
  renderedFrameCount: number;
826
856
  rendererDroppedFrameCount: number;
@@ -859,7 +889,7 @@ declare class UserAgentInformation {
859
889
  userAgent: string;
860
890
  };
861
891
  }
862
- type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & ConnectionStatistics & ConstraintCapStatistics & DecoderStatistics & DocumentStateModulesStatistics & IncomingDataModuleStatistics & MseModuleStatistics & PlaybackModuleStatistics & QualityOfServiceModuleStatistics & RenditionsModuleStatistics & SyncModuleStatistics & TelemetryModuleStatistics & VideoPlayerStatistics;
892
+ type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & ConnectionStatistics & ConstraintCapStatistics & DecoderStatistics & DocumentStateModulesStatistics & IncomingDataModuleStatistics & JitterModuleStatistics & MseModuleStatistics & PlaybackModuleStatistics & QualityOfServiceModuleStatistics & RenditionsModuleStatistics & SyncModuleStatistics & TelemetryModuleStatistics & VideoPlayerStatistics;
863
893
  /**
864
894
  * Contains internal statistics.
865
895
  *
@@ -909,6 +939,10 @@ export type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["get
909
939
  */
910
940
  timeToFirstFrame?: number;
911
941
  iosMediaElementEnabled?: boolean;
942
+ /**
943
+ * Average bitrate for the entire session in bits/second.
944
+ */
945
+ averageBitRate?: number;
912
946
  };
913
947
  /**
914
948
  * Represents a Vindral client instance
@@ -949,7 +983,6 @@ export type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["get
949
983
  export declare class Vindral extends Emitter<PublicVindralEvents> {
950
984
  #private;
951
985
  private static MAX_POOL_SIZE;
952
- private static INITIAL_MAX_BIT_RATE;
953
986
  private static DISCONNECT_TIMEOUT;
954
987
  private static REMOVE_CUE_THRESHOLD;
955
988
  /**
@@ -1425,6 +1458,10 @@ export interface VolumeState {
1425
1458
  */
1426
1459
  volume: number;
1427
1460
  }
1461
+ interface TimeShiftInfo {
1462
+ urls: string[];
1463
+ duration: string;
1464
+ }
1428
1465
  /**
1429
1466
  * The events that can be emitted from the Vindral instance
1430
1467
  */
@@ -1524,6 +1561,10 @@ export interface PublicVindralEvents {
1524
1561
  * from external sources such as OS media shortcuts or other native UI outside of the browser.
1525
1562
  */
1526
1563
  ["volume state"]: Readonly<VolumeState>;
1564
+ /**
1565
+ * Emitted when the timeshift URLs are updated.
1566
+ */
1567
+ ["timeshift info"]: Readonly<TimeShiftInfo>;
1527
1568
  ["buffer state event"]: Readonly<BufferStateEvent>;
1528
1569
  ["initialized media"]: void;
1529
1570
  }
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 "./DTm3XZjU.js";
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 "./DROC3QN7.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.
@@ -823,11 +839,11 @@ interface QualityOfServiceModuleStatistics {
823
839
  */
824
840
  fatalQosCount: number;
825
841
  /**
826
- * Ratio of time being spent on different bitrates.
827
- * Example: `"timeSpentRatio": { "1160000": 0.2, "2260000": 0.8 }` shows 20% spent on 1.16 Mbps, 80% spent on 2.26 Mbps.
842
+ * Ratio of time being spent on different quality indexes. Index 0 is always the highest quality.
843
+ * Example: `"timeSpentRatio": { "0": 0.8, "1": 0.2 }` shows 80% spent on the best level, 20% on the next one.
828
844
  */
829
845
  timeSpentRatio: {
830
- [bitRate: string]: number;
846
+ [qualityIndex: string]: number;
831
847
  };
832
848
  }
833
849
  interface SyncModuleStatistics {
@@ -836,6 +852,20 @@ interface SyncModuleStatistics {
836
852
  timeshiftDriftAdjustmentCount: number;
837
853
  seekTime: number;
838
854
  }
855
+ interface JitterStatistics {
856
+ /** Minimum jitter in the recent window */
857
+ min: number;
858
+ /** Maximum jitter in the recent window for spike detection */
859
+ max: number;
860
+ /** Latest average jitter in ms (recent window) */
861
+ last: number;
862
+ /** Average jitter in ms (RFC 3550 style, smoothed with /16) */
863
+ average: number;
864
+ }
865
+ interface JitterModuleStatistics {
866
+ audioJitter: JitterStatistics | undefined;
867
+ videoJitter: JitterStatistics | undefined;
868
+ }
839
869
  interface VideoPlayerStatistics {
840
870
  renderedFrameCount: number;
841
871
  rendererDroppedFrameCount: number;
@@ -874,7 +904,7 @@ declare class UserAgentInformation {
874
904
  userAgent: string;
875
905
  };
876
906
  }
877
- type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & ConnectionStatistics & ConstraintCapStatistics & DecoderStatistics & DocumentStateModulesStatistics & IncomingDataModuleStatistics & MseModuleStatistics & PlaybackModuleStatistics & QualityOfServiceModuleStatistics & RenditionsModuleStatistics & SyncModuleStatistics & TelemetryModuleStatistics & VideoPlayerStatistics;
907
+ type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & ConnectionStatistics & ConstraintCapStatistics & DecoderStatistics & DocumentStateModulesStatistics & IncomingDataModuleStatistics & JitterModuleStatistics & MseModuleStatistics & PlaybackModuleStatistics & QualityOfServiceModuleStatistics & RenditionsModuleStatistics & SyncModuleStatistics & TelemetryModuleStatistics & VideoPlayerStatistics;
878
908
  /**
879
909
  * Contains internal statistics.
880
910
  *
@@ -924,6 +954,10 @@ export type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["get
924
954
  */
925
955
  timeToFirstFrame?: number;
926
956
  iosMediaElementEnabled?: boolean;
957
+ /**
958
+ * Average bitrate for the entire session in bits/second.
959
+ */
960
+ averageBitRate?: number;
927
961
  };
928
962
  /**
929
963
  * Represents a Vindral client instance
@@ -964,7 +998,6 @@ export type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["get
964
998
  export declare class Vindral extends Emitter<PublicVindralEvents> {
965
999
  #private;
966
1000
  private static MAX_POOL_SIZE;
967
- private static INITIAL_MAX_BIT_RATE;
968
1001
  private static DISCONNECT_TIMEOUT;
969
1002
  private static REMOVE_CUE_THRESHOLD;
970
1003
  /**
@@ -1440,6 +1473,10 @@ export interface VolumeState {
1440
1473
  */
1441
1474
  volume: number;
1442
1475
  }
1476
+ interface TimeShiftInfo {
1477
+ urls: string[];
1478
+ duration: string;
1479
+ }
1443
1480
  /**
1444
1481
  * The events that can be emitted from the Vindral instance
1445
1482
  */
@@ -1539,6 +1576,10 @@ export interface PublicVindralEvents {
1539
1576
  * from external sources such as OS media shortcuts or other native UI outside of the browser.
1540
1577
  */
1541
1578
  ["volume state"]: Readonly<VolumeState>;
1579
+ /**
1580
+ * Emitted when the timeshift URLs are updated.
1581
+ */
1582
+ ["timeshift info"]: Readonly<TimeShiftInfo>;
1542
1583
  ["buffer state event"]: Readonly<BufferStateEvent>;
1543
1584
  ["initialized media"]: void;
1544
1585
  }