react-native-video
Installation
SKILL.md
react-native-video (v6 & v7)
Overview
react-native-video plays video/audio on iOS (AVPlayer), Android (ExoPlayer/Media3), and web (video.js). v6 and v7 are different APIs: v6 is one imperative <Video> component; v7 is a player-object model (useVideoPlayer + VideoView). Work out the version first, then read the matching reference file.
Step 0 — Detect the version FIRST (the most common mistake)
Before giving ANY API advice, find the major version — the surface is fundamentally different:
# easiest: the app's own package.json
cat package.json | grep react-native-video
# exact installed version:
cat node_modules/react-native-video/package.json | grep '"version"'
- v6.x → imperative
<Video source paused .../>; control via props + aref(ref.seek()). Readreferences/v6/. - v7.x (incl.
7.0.0-beta.*) →const player = useVideoPlayer(source)+<VideoView player={player} />; control via the player instance (player.seekTo()), events viauseEvent. Readreferences/v7/.