@oddin-gg/havik-player 1.15.0 → 1.16.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
@@ -289,6 +289,29 @@ export declare interface EmbedHandle {
289
289
  destroy(): void;
290
290
  }
291
291
 
292
+ /**
293
+ * Enter fullscreen for `video`, walking the capability ladder above.
294
+ * `container` is the element to present in element fullscreen (defaults to
295
+ * the video) — pass your player wrapper to keep your own controls visible on
296
+ * platforms that support it. Returns false when NO mechanism exists (some
297
+ * webviews) so the caller can hide or disable its button; rejections from a
298
+ * denied request (permissions policy) propagate.
299
+ *
300
+ * Call from a user gesture: every branch of the ladder requires one.
301
+ */
302
+ export declare function enterVideoFullscreen(video: HTMLVideoElement, container?: HTMLElement): Promise<boolean>;
303
+
304
+ /**
305
+ * Leave whichever fullscreen presentation `video` is in: iPhone's video-native
306
+ * fullscreen first (it reports only through the video, never the document),
307
+ * then element fullscreen via the document (unprefixed or prefixed). Safe to
308
+ * call when not fullscreen — and scoped to THIS video's presentation: an
309
+ * unrelated element's fullscreen (a lightbox, another player) is left alone,
310
+ * mirroring the ownership check exitPictureInPicture makes on
311
+ * pictureInPictureElement. Pass the same `container` you entered with.
312
+ */
313
+ export declare function exitVideoFullscreen(video: HTMLVideoElement, container?: HTMLElement): Promise<void>;
314
+
292
315
  export declare interface FairPlayInfo {
293
316
  licenseUrl: string;
294
317
  certificateUrl: string;
@@ -631,6 +654,17 @@ export declare interface Player {
631
654
  seekToLive(): void;
632
655
  enterPictureInPicture(): Promise<void>;
633
656
  exitPictureInPicture(): Promise<void>;
657
+ /**
658
+ * Enter fullscreen: element fullscreen on the player container where the
659
+ * API exists (custom controls stay on screen); on iPhone Safari falls back
660
+ * to the video-native presentation with NATIVE controls (there is no
661
+ * element Fullscreen API there at all). Call from a user gesture; on
662
+ * iPhone it takes effect once media is loaded. Resolves false when no
663
+ * fullscreen mechanism exists on the platform.
664
+ */
665
+ enterFullscreen(): Promise<boolean>;
666
+ /** Leave fullscreen (element or video-native). Safe when not fullscreen. */
667
+ exitFullscreen(): Promise<void>;
634
668
  /** Retry playback after an error (re-resolves and re-attaches). */
635
669
  retry(): Promise<void>;
636
670
  /** Re-resolve playback (refreshes the signed license URL) and re-attach. */
@@ -816,6 +850,13 @@ export declare interface TournamentResult {
816
850
  notFound: boolean;
817
851
  }
818
852
 
853
+ /**
854
+ * True while this video's fullscreen presentation is active: element
855
+ * fullscreen on `container` or the video itself, or iPhone's video-native
856
+ * fullscreen. Pass the same `container` you pass to enterVideoFullscreen.
857
+ */
858
+ export declare function videoFullscreenActive(video: HTMLVideoElement, container?: HTMLElement): boolean;
859
+
819
860
  export declare type WaitForLive = boolean | WaitForLiveOptions;
820
861
 
821
862
  export declare interface WaitForLiveOptions {
package/dist/index.d.ts CHANGED
@@ -289,6 +289,29 @@ export declare interface EmbedHandle {
289
289
  destroy(): void;
290
290
  }
291
291
 
292
+ /**
293
+ * Enter fullscreen for `video`, walking the capability ladder above.
294
+ * `container` is the element to present in element fullscreen (defaults to
295
+ * the video) — pass your player wrapper to keep your own controls visible on
296
+ * platforms that support it. Returns false when NO mechanism exists (some
297
+ * webviews) so the caller can hide or disable its button; rejections from a
298
+ * denied request (permissions policy) propagate.
299
+ *
300
+ * Call from a user gesture: every branch of the ladder requires one.
301
+ */
302
+ export declare function enterVideoFullscreen(video: HTMLVideoElement, container?: HTMLElement): Promise<boolean>;
303
+
304
+ /**
305
+ * Leave whichever fullscreen presentation `video` is in: iPhone's video-native
306
+ * fullscreen first (it reports only through the video, never the document),
307
+ * then element fullscreen via the document (unprefixed or prefixed). Safe to
308
+ * call when not fullscreen — and scoped to THIS video's presentation: an
309
+ * unrelated element's fullscreen (a lightbox, another player) is left alone,
310
+ * mirroring the ownership check exitPictureInPicture makes on
311
+ * pictureInPictureElement. Pass the same `container` you entered with.
312
+ */
313
+ export declare function exitVideoFullscreen(video: HTMLVideoElement, container?: HTMLElement): Promise<void>;
314
+
292
315
  export declare interface FairPlayInfo {
293
316
  licenseUrl: string;
294
317
  certificateUrl: string;
@@ -631,6 +654,17 @@ export declare interface Player {
631
654
  seekToLive(): void;
632
655
  enterPictureInPicture(): Promise<void>;
633
656
  exitPictureInPicture(): Promise<void>;
657
+ /**
658
+ * Enter fullscreen: element fullscreen on the player container where the
659
+ * API exists (custom controls stay on screen); on iPhone Safari falls back
660
+ * to the video-native presentation with NATIVE controls (there is no
661
+ * element Fullscreen API there at all). Call from a user gesture; on
662
+ * iPhone it takes effect once media is loaded. Resolves false when no
663
+ * fullscreen mechanism exists on the platform.
664
+ */
665
+ enterFullscreen(): Promise<boolean>;
666
+ /** Leave fullscreen (element or video-native). Safe when not fullscreen. */
667
+ exitFullscreen(): Promise<void>;
634
668
  /** Retry playback after an error (re-resolves and re-attaches). */
635
669
  retry(): Promise<void>;
636
670
  /** Re-resolve playback (refreshes the signed license URL) and re-attach. */
@@ -816,6 +850,13 @@ export declare interface TournamentResult {
816
850
  notFound: boolean;
817
851
  }
818
852
 
853
+ /**
854
+ * True while this video's fullscreen presentation is active: element
855
+ * fullscreen on `container` or the video itself, or iPhone's video-native
856
+ * fullscreen. Pass the same `container` you pass to enterVideoFullscreen.
857
+ */
858
+ export declare function videoFullscreenActive(video: HTMLVideoElement, container?: HTMLElement): boolean;
859
+
819
860
  export declare type WaitForLive = boolean | WaitForLiveOptions;
820
861
 
821
862
  export declare interface WaitForLiveOptions {