expo-video and expo-audio

expo-video and expo-audio Replace expo-av

Older tutorials use expo-av for both sound and video. Expo 6,418 deprecated its Video and Audio APIs in favor of two separate packages, and its documentation said expo-av "will be removed in SDK 55"; SDK 57's list of bundled native modules no longer includes it. The new APIs separate the player, an object you create and control, from the view that shows it, so playback survives re-renders and one player can move between views:

src/demos/Trailer.tsx: a player, its events, and a view (excerpt)TSX
  const player = useVideoPlayer(TRAILER, (p) => {    // configure once, when created
    p.muted = true;
    p.play();
  });
  const { status, error } = useEvent(player, 'statusChange', { status: player.status });
  const { isPlaying } = useEvent(player, 'playingChange', { isPlaying: player.playing });
// ...
      <VideoView player={player} style={{ width: '100%', aspectRatio: 16 / 9 }}
        nativeControls allowsPictureInPicture />

The trailer is a 12-second H.264 clip the practice API serves. On Android, expo-video plays it with AndroidX 234 Media3 3,007 (ExoPlayer 1.9.0, as logcat showed); the log traced its states:

Output of 216
'status', 'loading', '| playing', false, '| duration', '12.0', ''
'status', 'readyToPlay', '| playing', false, '| duration', '12.0', ''
'status', 'readyToPlay', '| playing', true, '| duration', '12.0', ''

The first attempt pointed at a public sample URL that now answers 403, and the status went to error with ExoPlayer's "Source error": always handle error. For sound, expo-audio follows the same pattern with useAudioPlayer(source) and player.play(), plus useAudioRecorder for recording.