@vindral/web-sdk 3.0.8 → 3.2.0

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.
Files changed (4) hide show
  1. package/index.d.ts +39 -6
  2. package/index.mjs +1343 -1255
  3. package/index.umd.js +5 -5
  4. package/package.json +2 -1
package/index.d.ts CHANGED
@@ -597,11 +597,36 @@ interface SyncModuleStatistics {
597
597
  timeshiftDriftAdjustmentCount: number;
598
598
  seekTime: number;
599
599
  }
600
- interface UserAgentInformation {
601
- userAgent: string;
602
- locationOrigin: string;
603
- locationPath: string;
604
- ancestorOrigins?: string[];
600
+ declare class UserAgentInformation {
601
+ private highEntropyValues?;
602
+ constructor();
603
+ getUserAgentInformation(): {
604
+ userAgentLegacy: string;
605
+ ua: {
606
+ browser: {
607
+ brands: string[];
608
+ fullVersionBrands: string[];
609
+ majorVersions: string[];
610
+ };
611
+ device: string;
612
+ os: {
613
+ family: string;
614
+ version: string;
615
+ major_version: number;
616
+ };
617
+ };
618
+ locationOrigin: string;
619
+ locationPath: string;
620
+ ancestorOrigins: string[] | undefined;
621
+ userAgent?: undefined;
622
+ } | {
623
+ userAgent: string;
624
+ locationOrigin: string;
625
+ locationPath: string;
626
+ ancestorOrigins: string[] | undefined;
627
+ userAgentLegacy?: undefined;
628
+ ua?: undefined;
629
+ };
605
630
  }
606
631
  declare type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & ConnectionStatistics & ConstraintCapStatistics & DecoderStatistics & DocumentStateModulesStatistics & IncomingDataModuleStatistics & MseModuleStatistics & PlaybackModuleStatistics & QualityOfServiceModuleStatistics & RenditionsModuleStatistics & SyncModuleStatistics & TelemetryModuleStatistics & VideoPlayerStatistics;
607
632
  /**
@@ -612,7 +637,7 @@ declare type ModuleStatistics = AdaptivityStatistics & BufferTimeStatistics & Co
612
637
  *
613
638
  * @interface
614
639
  */
615
- export declare type Statistics = ModuleStatistics & UserAgentInformation & {
640
+ export declare type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["getUserAgentInformation"]> & {
616
641
  /**
617
642
  * Version of the @vindral/web-sdk being used.
618
643
  */
@@ -737,6 +762,7 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
737
762
  private cachedEdges;
738
763
  private shiftedEdges;
739
764
  private pool;
765
+ private userAgentInformation;
740
766
  private sampleProcessingSesssions;
741
767
  private sizes;
742
768
  private isSuspended;
@@ -753,6 +779,13 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
753
779
  * Set the current volume.
754
780
  * Setting this to 0 is not equivalent to muting the audio.
755
781
  * Setting this to >0 is not equivalent to unmuting the audio.
782
+ *
783
+ * Note that setting volume is not allowed on iPadOS and iOS devices.
784
+ * This is an OS/browser limitation on the video element.
785
+ *
786
+ * [Read more about it on Apple docs](https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html)
787
+ * for iOS-Specific Considerations. The following section is the important part:
788
+ * ```On iOS devices, the audio level is always under the user's physical control. The volume property is not settable in JavaScript. Reading the volume property always returns 1.```
756
789
  */
757
790
  set volume(volume: number);
758
791
  /**