Docs

Quick start (Expo)

Load playback metadata for an embed in an Expo app.

Before you begin

You need a Moviie account and a publishable API key (mvi_pub_*).

  1. Sign up at app.moviie.ai/signin.
  2. Go to Organization Settings → API Keys and create a Publishable key.
  3. Copy the key and set it as an environment variable:
EXPO_PUBLIC_MOVIIE_PUBLISHABLE_KEY=mvi_pub_your_key_here

See Identifiers & keys for details on key types and bundle ID configuration.


1. Install

pnpm add @moviie/player-expo expo-video expo-application expo-secure-store

Add the config plugin to app.json:

{
  "expo": {
    "plugins": [
      ["@moviie/player-expo"]
    ]
  }
}

2. Fetch playback

Set EXPO_PUBLIC_MOVIIE_PUBLISHABLE_KEY to a mvi_pub_* key from your organization. getPlayback requires this key; private keys are rejected by the API.

import { MoviieClient } from "@moviie/player-expo"

const client = new MoviieClient({
  publishableKey: process.env.EXPO_PUBLIC_MOVIIE_PUBLISHABLE_KEY,
  clientInfo: {
    bundleId: "com.example.app",
    platform: "ios",
    sdkVersion: "1.0.0",
  },
})

const playback = await client.getPlayback(embedId)
console.log(playback.playback.uri)

3. Wire expo-video

Use playback.playback.uri as the HLS source in useVideoPlayer / VideoView.

See the product docs at docs.moviie.ai/player-expo for more examples.

Expo Web (--web)

Device builds use expo-video as above. On web, MoviieVideo uses the iframe embed and the Player JavaScript API instead; see Expo Web (iframe embed).

On this page