@molecule/app-video-expo

Provider bond · video · App (browser) · v1.0.0 · Apache-2.0

Expo video playback provider for React Native.

npm install @molecule/app-video-expo

npm · Source on GitHub · Implements @molecule/app-video

How it works

@molecule/app-video-expo is a provider bond on the app (browser) side: it implements the video core interface (@molecule/app-video) with a concrete vendor or library behind it.

Your code calls the core; you wire this provider once at startup. Swapping vendors later is one line in that wiring, not a rewrite.

import { setProvider } from '@molecule/app-video'
import { provider } from '@molecule/app-video-expo'

setProvider(provider)

Works with: @molecule/app-i18n, @molecule/app-video

Reference

Video playback on iOS and Android using Expo SDK 53.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { setProvider } from '@molecule/app-video'
import { provider } from '@molecule/app-video-expo'

setProvider(provider)

Type

provider

Installation

npm install @molecule/app-video-expo @molecule/app-i18n @molecule/app-video expo-video react react-native
npm install -D @types/react

API

Interfaces

ExpoVideoPlayer

A device playback session created by the Expo video provider.

interface ExpoVideoPlayer extends VideoPlayer {
  /** Bindings for the view that renders this session. */
  readonly [surfaceProps]: ComponentProps<typeof VideoSurface>
}

Functions

createExpoVideoPlayer(config)

Creates a playback session for the Expo video view.

function createExpoVideoPlayer(config: NativePlayerConfig): ExpoVideoPlayer
  • config — Sources and initial playback settings.

Returns: The Expo playback session.

Constants

provider

The Expo provider for the video playback bond.

const provider: NativeVideoProvider<ExpoVideoPlayer>

Core Interface

Implements @molecule/app-video interface.

Bond Wiring

Setup function to register this provider with the core interface:

import { setProvider } from '@molecule/app-video'
import { provider } from '@molecule/app-video-expo'

export function setupVideoExpo(): void {
  setProvider(provider)
}

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-i18n ^1.3.0
  • @molecule/app-video ^2.0.0
  • expo-video 2.2.2
  • react ^19.0.0
  • react-native 0.79.6

Runtime Dependencies

  • @molecule/app-i18n
  • @molecule/app-video
  • expo-video
  • react
  • react-native

Wire this provider in an Expo app before mounting the React Native VideoPlayer. Rebuild an existing development client after installing expo-video. For an imperative player, call createPlayer from the native video entry, mount the returned view inside a sized parent, and call player.destroy() when the session is no longer needed. HLS adapts automatically. Explicit quality choices select among the sources you supply. Embedded subtitle tracks use the platform player. The React video player renders external WebVTT captions in its own controls. For picture-in-picture, enable supportsPictureInPicture in the expo-video config plugin and rebuild the app. On Android, use the system controls to leave picture-in-picture.