@flamingo-stack/openframe-frontend-core 0.0.551 → 0.0.552

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 (96) hide show
  1. package/dist/{chunk-V5PDJFZS.js → chunk-4DD3223G.js} +6 -6
  2. package/dist/{chunk-MEY3PYOL.cjs → chunk-4XG7TG7B.cjs} +7 -7
  3. package/dist/{chunk-MEY3PYOL.cjs.map → chunk-4XG7TG7B.cjs.map} +1 -1
  4. package/dist/{chunk-ZYQAFJLF.cjs → chunk-6J6Q5QEM.cjs} +4 -4
  5. package/dist/{chunk-ZYQAFJLF.cjs.map → chunk-6J6Q5QEM.cjs.map} +1 -1
  6. package/dist/{chunk-AK4LW6PF.cjs → chunk-6MHMEF5W.cjs} +39 -39
  7. package/dist/{chunk-AK4LW6PF.cjs.map → chunk-6MHMEF5W.cjs.map} +1 -1
  8. package/dist/{chunk-2YLMNXLB.js → chunk-6XOJTTWY.js} +2 -2
  9. package/dist/{chunk-RJFD55SK.js → chunk-7MPOW46J.js} +2 -2
  10. package/dist/{chunk-SWDTM5O6.js → chunk-7TRIUG7Q.js} +5 -5
  11. package/dist/{chunk-TXFJFO4A.js → chunk-BFOXIIM4.js} +2 -2
  12. package/dist/{chunk-EFNDA2CG.js → chunk-CMDPARDV.js} +2 -2
  13. package/dist/{chunk-ZDWWXME5.cjs → chunk-DOPZ5LCH.cjs} +14 -14
  14. package/dist/{chunk-ZDWWXME5.cjs.map → chunk-DOPZ5LCH.cjs.map} +1 -1
  15. package/dist/{chunk-PPPIBTCO.cjs → chunk-HK5YRHEN.cjs} +9 -9
  16. package/dist/{chunk-PPPIBTCO.cjs.map → chunk-HK5YRHEN.cjs.map} +1 -1
  17. package/dist/{chunk-IFH47QXW.js → chunk-KSGQG6WU.js} +2 -2
  18. package/dist/{chunk-V3HNIPTE.cjs → chunk-MVE2YQVG.cjs} +20 -20
  19. package/dist/{chunk-V3HNIPTE.cjs.map → chunk-MVE2YQVG.cjs.map} +1 -1
  20. package/dist/{chunk-T2JKOG6K.cjs → chunk-OVQ3O66O.cjs} +5 -5
  21. package/dist/{chunk-T2JKOG6K.cjs.map → chunk-OVQ3O66O.cjs.map} +1 -1
  22. package/dist/{chunk-O24VSDVN.cjs → chunk-PVPXI5V6.cjs} +31 -31
  23. package/dist/{chunk-O24VSDVN.cjs.map → chunk-PVPXI5V6.cjs.map} +1 -1
  24. package/dist/{chunk-NVK7YZHN.js → chunk-RJEP74Z4.js} +2 -2
  25. package/dist/{chunk-H4RHXJHF.js → chunk-RJSDYOFD.js} +2 -2
  26. package/dist/{chunk-H4OIDXP4.cjs → chunk-RMTTW7LG.cjs} +27 -27
  27. package/dist/{chunk-H4OIDXP4.cjs.map → chunk-RMTTW7LG.cjs.map} +1 -1
  28. package/dist/{chunk-NRTKEPUX.cjs → chunk-RMWLUKTC.cjs} +11 -11
  29. package/dist/{chunk-NRTKEPUX.cjs.map → chunk-RMWLUKTC.cjs.map} +1 -1
  30. package/dist/{chunk-EZIKNMYV.js → chunk-SIXNMDYY.js} +2 -2
  31. package/dist/{chunk-YA5JDHWE.cjs → chunk-SXXIV7IL.cjs} +86 -86
  32. package/dist/{chunk-YA5JDHWE.cjs.map → chunk-SXXIV7IL.cjs.map} +1 -1
  33. package/dist/{chunk-JI4JR3KC.js → chunk-TI75367M.js} +234 -205
  34. package/dist/{chunk-JI4JR3KC.js.map → chunk-TI75367M.js.map} +1 -1
  35. package/dist/{chunk-YEXTFNVE.js → chunk-WXDDPK7T.js} +4 -4
  36. package/dist/{chunk-CPADTPX4.cjs → chunk-X4RCWYYF.cjs} +825 -796
  37. package/dist/chunk-X4RCWYYF.cjs.map +1 -0
  38. package/dist/{chunk-MKDL3S4U.cjs → chunk-XEOZB5DX.cjs} +3 -3
  39. package/dist/{chunk-MKDL3S4U.cjs.map → chunk-XEOZB5DX.cjs.map} +1 -1
  40. package/dist/{chunk-72ZPQTPN.cjs → chunk-Y64725GI.cjs} +61 -61
  41. package/dist/{chunk-72ZPQTPN.cjs.map → chunk-Y64725GI.cjs.map} +1 -1
  42. package/dist/{chunk-OMSEQDCU.js → chunk-Y6PD76R6.js} +2 -2
  43. package/dist/{chunk-MVK7SNVO.js → chunk-Z5UK7SKC.js} +4 -4
  44. package/dist/components/case-studies/index.cjs +8 -8
  45. package/dist/components/case-studies/index.js +2 -2
  46. package/dist/components/chat/index.cjs +2 -2
  47. package/dist/components/chat/index.js +1 -1
  48. package/dist/components/contact/index.cjs +3 -3
  49. package/dist/components/contact/index.js +2 -2
  50. package/dist/components/docs/index.cjs +5 -5
  51. package/dist/components/docs/index.js +4 -4
  52. package/dist/components/embeds/index.cjs +3 -3
  53. package/dist/components/embeds/index.js +2 -2
  54. package/dist/components/faq/index.cjs +3 -3
  55. package/dist/components/faq/index.js +2 -2
  56. package/dist/components/features/index.cjs +2 -2
  57. package/dist/components/features/index.js +1 -1
  58. package/dist/components/features/use-ios-native-video-fullscreen.d.ts +4 -0
  59. package/dist/components/features/use-ios-native-video-fullscreen.d.ts.map +1 -0
  60. package/dist/components/features/video.d.ts.map +1 -1
  61. package/dist/components/help-center-pages/index.cjs +22 -22
  62. package/dist/components/help-center-pages/index.js +13 -13
  63. package/dist/components/index.cjs +131 -131
  64. package/dist/components/index.js +11 -11
  65. package/dist/components/meeting-scheduler/index.cjs +28 -28
  66. package/dist/components/meeting-scheduler/index.js +3 -3
  67. package/dist/components/navigation/index.cjs +2 -2
  68. package/dist/components/navigation/index.js +1 -1
  69. package/dist/components/onboarding-guides/index.cjs +5 -5
  70. package/dist/components/onboarding-guides/index.js +4 -4
  71. package/dist/components/related-content/index.cjs +3 -3
  72. package/dist/components/related-content/index.js +2 -2
  73. package/dist/components/tickets/index.cjs +6 -6
  74. package/dist/components/tickets/index.js +5 -5
  75. package/dist/components/ui/index.cjs +2 -2
  76. package/dist/components/ui/index.js +1 -1
  77. package/dist/index.cjs +2 -2
  78. package/dist/index.js +1 -1
  79. package/package.json +1 -1
  80. package/src/components/features/__tests__/use-ios-native-video-fullscreen.test.tsx +116 -0
  81. package/src/components/features/use-ios-native-video-fullscreen.ts +89 -0
  82. package/src/components/features/video.tsx +5 -0
  83. package/dist/chunk-CPADTPX4.cjs.map +0 -1
  84. /package/dist/{chunk-V5PDJFZS.js.map → chunk-4DD3223G.js.map} +0 -0
  85. /package/dist/{chunk-2YLMNXLB.js.map → chunk-6XOJTTWY.js.map} +0 -0
  86. /package/dist/{chunk-RJFD55SK.js.map → chunk-7MPOW46J.js.map} +0 -0
  87. /package/dist/{chunk-SWDTM5O6.js.map → chunk-7TRIUG7Q.js.map} +0 -0
  88. /package/dist/{chunk-TXFJFO4A.js.map → chunk-BFOXIIM4.js.map} +0 -0
  89. /package/dist/{chunk-EFNDA2CG.js.map → chunk-CMDPARDV.js.map} +0 -0
  90. /package/dist/{chunk-IFH47QXW.js.map → chunk-KSGQG6WU.js.map} +0 -0
  91. /package/dist/{chunk-NVK7YZHN.js.map → chunk-RJEP74Z4.js.map} +0 -0
  92. /package/dist/{chunk-H4RHXJHF.js.map → chunk-RJSDYOFD.js.map} +0 -0
  93. /package/dist/{chunk-EZIKNMYV.js.map → chunk-SIXNMDYY.js.map} +0 -0
  94. /package/dist/{chunk-YEXTFNVE.js.map → chunk-WXDDPK7T.js.map} +0 -0
  95. /package/dist/{chunk-OMSEQDCU.js.map → chunk-Y6PD76R6.js.map} +0 -0
  96. /package/dist/{chunk-MVK7SNVO.js.map → chunk-Z5UK7SKC.js.map} +0 -0
@@ -0,0 +1,89 @@
1
+ 'use client';
2
+
3
+ /**
4
+ * iOS app shell only: hand the player's fullscreen control to Apple's own video
5
+ * player instead of the Fullscreen API.
6
+ *
7
+ * This is what media-chrome already does on iPhone Safari — `requestFullscreen`
8
+ * does not exist on `Element.prototype` there, so its `enterFullscreen` falls
9
+ * through to `media.webkitEnterFullscreen()` and the video is handed to the
10
+ * system player. The Capacitor shell turns element fullscreen ON (WKWebView's
11
+ * `isElementFullscreenEnabled`), so media-chrome takes the `requestFullscreen()`
12
+ * branch instead — and WebKit then hands the web view back with its scroll
13
+ * view's `contentInsetAdjustmentBehavior` reset from Capacitor's `.never` to
14
+ * `.automatic` and its own `safeAreaInsets` stranded at the fullscreen
15
+ * container's values. The app comes back from a video with a doubled top band
16
+ * and dead space above the home indicator until a rotation, and the shell can
17
+ * only paper over it afterwards (`MainViewController` KVOs `fullscreenState` to
18
+ * restore the behavior). Never entering element fullscreen is the actual fix.
19
+ *
20
+ * The takeover is an event interception, not a monkey-patch: the fullscreen
21
+ * button dispatches `mediaenterfullscreenrequest` (`composed`, `bubbles`) from
22
+ * inside the player's shadow trees, so a CAPTURE listener on the `<mux-player>`
23
+ * host sees it before the `<media-controller>` that would service it, and
24
+ * `stopImmediatePropagation()` is enough to claim the request. Which element
25
+ * media-chrome would have passed to `requestFullscreen` never enters into it.
26
+ *
27
+ * The player's own fullscreen STATE stays correct for free: the system player
28
+ * fires `webkitbeginfullscreen` / `webkitendfullscreen` on the `<video>`,
29
+ * `mux-video` re-dispatches both, and media-chrome's state mediator already
30
+ * listens for them.
31
+ *
32
+ * Anything the takeover cannot service falls through to media-chrome untouched:
33
+ * no `<video>` yet, or `webkitSupportsFullscreen` still false — it stays false
34
+ * until metadata has loaded, which is reachable on a Save-Data connection where
35
+ * preload is `'none'`.
36
+ */
37
+
38
+ import { useEffect } from 'react';
39
+
40
+ /** media-chrome's `MediaUIEvents.MEDIA_ENTER_FULLSCREEN_REQUEST`. Spelled out
41
+ * rather than imported: media-chrome is a transitive dep of the Mux player, not
42
+ * a declared one. */
43
+ const ENTER_FULLSCREEN_REQUEST = 'mediaenterfullscreenrequest';
44
+
45
+ /** The two `HTMLVideoElement` members WebKit adds for its own video-fullscreen
46
+ * presentation — absent from the DOM lib, and absent at runtime off Apple. */
47
+ interface NativeFullscreenVideo extends HTMLVideoElement {
48
+ webkitSupportsFullscreen?: boolean;
49
+ webkitEnterFullscreen?: () => void;
50
+ }
51
+
52
+ interface CapacitorGlobal {
53
+ isNativePlatform?: () => boolean;
54
+ getPlatform?: () => string;
55
+ }
56
+
57
+ /** Gated on the shell, not on the platform: element fullscreen behaves fine in
58
+ * Safari (iPad) and on the desktop shell, where taking it away would only cost
59
+ * the player its chrome in fullscreen. */
60
+ function isIosAppShell(): boolean {
61
+ const capacitor = (globalThis as { Capacitor?: CapacitorGlobal }).Capacitor;
62
+ return capacitor?.isNativePlatform?.() === true && capacitor.getPlatform?.() === 'ios';
63
+ }
64
+
65
+ /** The real `<video>` behind `<mux-player>`: `player.media` is the `<mux-video>`
66
+ * custom element and `nativeEl` is the element WebKit presents. */
67
+ function nativeVideoElement(player: EventTarget): NativeFullscreenVideo | null {
68
+ const media = (player as { media?: { nativeEl?: unknown } | null }).media;
69
+ const element = media?.nativeEl ?? media;
70
+ return element instanceof HTMLVideoElement ? element : null;
71
+ }
72
+
73
+ export function useIosNativeVideoFullscreen(playerRef: { current: unknown }): void {
74
+ useEffect(() => {
75
+ if (!isIosAppShell()) return;
76
+ const player = playerRef.current;
77
+ if (!(player instanceof EventTarget)) return;
78
+
79
+ const takeOver = (event: Event) => {
80
+ const video = nativeVideoElement(player);
81
+ if (!video?.webkitSupportsFullscreen || typeof video.webkitEnterFullscreen !== 'function') return;
82
+ event.stopImmediatePropagation();
83
+ video.webkitEnterFullscreen();
84
+ };
85
+
86
+ player.addEventListener(ENTER_FULLSCREEN_REQUEST, takeOver, true);
87
+ return () => player.removeEventListener(ENTER_FULLSCREEN_REQUEST, takeOver, true);
88
+ }, [playerRef]);
89
+ }
@@ -34,6 +34,7 @@ import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, us
34
34
  import MuxPlayer from '@mux/mux-player-react';
35
35
  import { VideoPlayBadge, VideoUnmuteGlyph } from './video-center-badge';
36
36
  import { fetchPriorityProp } from '../../utils/fetch-priority';
37
+ import { useIosNativeVideoFullscreen } from './use-ios-native-video-fullscreen';
37
38
  import { saveDataEnabled } from './use-video-warmup';
38
39
 
39
40
  // =============================================================================
@@ -938,6 +939,10 @@ function FilePlayer({
938
939
  return () => { try { el.removeEventListener?.('ended', handler); } catch { /* ignore */ } };
939
940
  }, []);
940
941
 
942
+ // In the iOS shell the fullscreen control goes to Apple's video player rather
943
+ // than to element fullscreen, which WebKit exits by breaking the safe areas.
944
+ useIosNativeVideoFullscreen(hoverPlayerRef);
945
+
941
946
  // Imperative handle — snapshot getters + control mutators for handoff.
942
947
  useImperativeHandle(playerHandleRef, (): VideoPlayerHandle => ({
943
948
  getCurrentTime: () => hoverPlayerRef.current?.currentTime ?? 0,