About this project
react-native-vlc-media-player provides VLC-based media playback components for React Native applications. The package exports `VLCPlayer` for direct player control and `VlCPlayerView`, a higher-level view with title, back, autoplay, and other UI options.
Supported network sources include RTSP, RTP, RTMP, HLS, MMS, HTTP, FTP, UDP, and other protocols exposed through VLC. The README lists broad format coverage, including MKV, MP4, AVI, FLV, Ogg, MPEG transport streams, H.264, H.265, AV1, VP8/VP9, AAC, MP3, FLAC, Opus, AC3, and DTS. It also supports multiple audio tracks, including 5.1, and subtitle formats such as SRT, WebVTT, TTML, SSA/ASS, VobSub, and Teletext.
Player props cover source URI, local subtitle URI, paused state, repeat, playback rate, seek position, volume, mute, selected audio and text tracks, background playback, aspect ratio, automatic aspect ratio, resize mode, and autoplay. Event callbacks include onPlaying, onProgress, onPaused, onStopped, onBuffering, onEnded, onError, onLoad, onRecordingCreated, and onSnapshot. Ref methods can record the current stream to a directory, stop recording, and save a frame snapshot.
Installation is available through npm or Yarn, with React Native linking for non-Expo projects. Android normally requires no special settings, but the README includes a Gradle workaround for duplicate `libc++_shared.so` native libraries and notes that newer LibVLC versions address subtitle issues on Android 12 and 13. iOS setup uses CocoaPods; apps targeting iOS 14 and later may need `NSLocalNetworkUsageDescription` because MobileVLCKit can access the local network for sources such as RTSP camera streams.
Expo is supported only through a custom development build, not Expo Go, because the module contains custom native code. An Expo config plugin is provided with optional iOS VLCKit and Android legacy Jetifier settings.
The README documents a known iOS 17 simulator crash on some versions and recommends an iOS 18+ simulator in that case. It also lists an outstanding TODO indicating that some Android video aspect ratio and parameter handling is not fully implemented on the JavaScript side.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.