VLC Player for react-native based on xuyuanzhou/react-native-yz-vlcplayer
, delia-m/react-native-yz-vlcplayer
and react-native-vlc-media-player
to be used on Lunarr.
yarn add @lunarr/vlc-player
Set Enable Bitcode
to NO
Build Settings ---> search Bitcode
Don't forget to pod update
and gradlew clean
import Video from "@lunarr/vlc-player";
<Video
ref={videoRef}
source={{ uri: url }}
style={styles.video}
onProgress={({ currentTime, duration }) => {
setState({
currentTime, // seconds
duration // seconds
});
}}
onSeek={({ currentTime, duration }) => {
setState({
currentTime, // seconds
duration // seconds
});
}}
onEnd={() => {
setState({ play: false });
}}
onError={() => {
setState({
play: false,
error: {
error: "Oops!",
message:
"There was an error playing this video, please try again later."
}
});
}}
paused={!state.play}
/>