@oddin-gg/havik-player 2.18.0 → 2.19.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.
package/dist/index.d.cts CHANGED
@@ -624,6 +624,26 @@ export declare type FrameToHost = {
624
624
  message: string;
625
625
  };
626
626
 
627
+ /**
628
+ * Whether a fullscreen presentation for `video` can work, by the same
629
+ * ladder enterVideoFullscreen walks. False means a request is KNOWN to
630
+ * fail, so the caller should hide its button:
631
+ *
632
+ * - the element API exists on `container` (or the video) but the document
633
+ * reports `fullscreenEnabled === false` — the Fullscreen spec sets that
634
+ * exactly when permissions policy blocks the feature, which is what a
635
+ * cross-origin iframe without `fullscreen` in its `allow` list looks
636
+ * like (prefixed `webkitFullscreenEnabled` on older Safari);
637
+ * - no element API at all, media already loaded, and the video does not
638
+ * offer the video-native presentation either (a webview with nothing).
639
+ *
640
+ * True otherwise — including "not known yet": with no element API and
641
+ * media not loaded (iPhone before the first play) the video-native flag
642
+ * is not readable, so the answer stays optimistic. Re-check on
643
+ * `loadedmetadata`; the managed control bar does.
644
+ */
645
+ export declare function fullscreenSupported(video: HTMLVideoElement, container?: HTMLElement): boolean;
646
+
627
647
  export declare function getDeviceId(): string;
628
648
 
629
649
  /**
@@ -997,6 +1017,14 @@ export declare interface Player {
997
1017
  enterFullscreen(): Promise<boolean>;
998
1018
  /** Leave fullscreen (element or video-native). Safe when not fullscreen. */
999
1019
  exitFullscreen(): Promise<void>;
1020
+ /**
1021
+ * Whether enterFullscreen can work here: false when the page's permissions
1022
+ * policy blocks fullscreen (an iframe without `fullscreen` in `allow`) or
1023
+ * the platform has no mechanism, so a custom UI can hide its button. Stays
1024
+ * true before media loads on iPhone (not knowable yet); re-check on the
1025
+ * video's `loadedmetadata`.
1026
+ */
1027
+ fullscreenSupported(): boolean;
1000
1028
  /** Retry playback after an error (re-resolves and re-attaches). */
1001
1029
  retry(): Promise<void>;
1002
1030
  /** Re-resolve playback (refreshes the signed license URL) and re-attach. */
package/dist/index.d.ts CHANGED
@@ -624,6 +624,26 @@ export declare type FrameToHost = {
624
624
  message: string;
625
625
  };
626
626
 
627
+ /**
628
+ * Whether a fullscreen presentation for `video` can work, by the same
629
+ * ladder enterVideoFullscreen walks. False means a request is KNOWN to
630
+ * fail, so the caller should hide its button:
631
+ *
632
+ * - the element API exists on `container` (or the video) but the document
633
+ * reports `fullscreenEnabled === false` — the Fullscreen spec sets that
634
+ * exactly when permissions policy blocks the feature, which is what a
635
+ * cross-origin iframe without `fullscreen` in its `allow` list looks
636
+ * like (prefixed `webkitFullscreenEnabled` on older Safari);
637
+ * - no element API at all, media already loaded, and the video does not
638
+ * offer the video-native presentation either (a webview with nothing).
639
+ *
640
+ * True otherwise — including "not known yet": with no element API and
641
+ * media not loaded (iPhone before the first play) the video-native flag
642
+ * is not readable, so the answer stays optimistic. Re-check on
643
+ * `loadedmetadata`; the managed control bar does.
644
+ */
645
+ export declare function fullscreenSupported(video: HTMLVideoElement, container?: HTMLElement): boolean;
646
+
627
647
  export declare function getDeviceId(): string;
628
648
 
629
649
  /**
@@ -997,6 +1017,14 @@ export declare interface Player {
997
1017
  enterFullscreen(): Promise<boolean>;
998
1018
  /** Leave fullscreen (element or video-native). Safe when not fullscreen. */
999
1019
  exitFullscreen(): Promise<void>;
1020
+ /**
1021
+ * Whether enterFullscreen can work here: false when the page's permissions
1022
+ * policy blocks fullscreen (an iframe without `fullscreen` in `allow`) or
1023
+ * the platform has no mechanism, so a custom UI can hide its button. Stays
1024
+ * true before media loads on iPhone (not knowable yet); re-check on the
1025
+ * video's `loadedmetadata`.
1026
+ */
1027
+ fullscreenSupported(): boolean;
1000
1028
  /** Retry playback after an error (re-resolves and re-attaches). */
1001
1029
  retry(): Promise<void>;
1002
1030
  /** Re-resolve playback (refreshes the signed license URL) and re-attach. */