Docs

Expo Web (iframe embed)

When you target Expo Web, Moviie playback uses the same watch iframe and Player JS API as a browser integration; not expo-video inside RN Web.

Expo Web (iframe embed)

When you run your Expo app on web (expo start --web), @moviie/player-expo resolves platform-specific modules:

  • useMoviiePlayer returns player: null. Playback metadata still comes from getPlayback via useMoviiePlayback / the SDK.
  • MoviieVideo renders an iframe whose src is the public embed URL: {watchOrigin}/embed/{embedId} (same route as Iframe code).

Treat web like an embed integration: load embed.js from the watch origin (the package injects it once by default) and use the Player API (window.Moviie, postMessage, Moviie.getPlayer(iframe)) as documented for websites; see Quick start (web) and Player API overview.

Publishable key is optional on web

The iframe mounts immediately from the embedId you passed to useMoviiePlayer — it does not wait for (or require) the playback fetch, because the public embed authorizes itself. Configuring the publishable key on web is still useful: it lets the hook populate playback (title, poster, controls metadata) for your own UI. Without it, playback stays null and error reports the missing key, while the player keeps working.

Configuration

  • EXPO_PUBLIC_MOVIIE_WATCH_ORIGIN: Optional override for the watch/embed origin (no trailing slash). Defaults to production https://watch.moviie.ai.
  • The embed script URL is {watchOrigin}/embed.js (see MOVIIE_WATCH_EMBED_JS_PATH in the package).

Optional MoviieVideo props on web:

  • onEmbedIframeRef: Callback with a minimal handle (contentWindow.postMessage) after the iframe mounts; align with Moviie.getPlayer when using embed.js.
  • loadEmbedScript: Default true. Set false if your host page already loads embed.js globally.

What is not supported on Expo Web (vs iOS / Android)

These rely on expo-video, native modules, or the React Native Moviie chrome; they do not apply inside the iframe layer:

CapabilityOn nativeOn Expo Web
VideoPlayer instance from useMoviiePlayerYesnull: control playback via Player API / iframe
Custom Moviie skin (timeline, HUD, RN fullscreen modal, etc.)YesNo: UI is the web embed inside the iframe
Telemetry wired to expo-video in your appYesNot applicable: embed handles player telemetry internally
rememberPosition persistence via SecureStore / native resume hook pathYesNot implemented in the package on web; embed may apply its own rules
backgroundPlayback, lockScreenNowPlayingNative useMoviiePlayer optionsIgnored on web
videoPresentation / VideoView PiP propsPassed to VideoViewNot applied to the iframe element; PiP/fullscreen follow browser + embed

The forwarded ref type MoviieVideoSurfaceRef on web is a stub (no-op methods); use the Player API for real controls.

On this page