react-native-vlc-media-player
                                
                                 react-native-vlc-media-player copied to clipboard
                                
                                    react-native-vlc-media-player copied to clipboard
                            
                            
                            
                        Invariant Violation: requireNativeComponent: "RCTVLCPlayer" was not found in the UIManager.
Using expo, I've done the mentioned steps on README but I'm still getting this error.
the same error, any solution?
Fix issue:
First install expo-dev-client : npx expo install expo-dev-client.
VLCPlayer component is something like this:
`import { VLCPlayer } from 'react-native-vlc-media-player';
const calcVLCPlayerHeight = (windowWidth,aspetRatio) => { return windowWidth * aspetRatio; };
<VLCPlayer source={{ initType: 2, hwDecoderEnabled: 1, hwDecoderForced: 1, uri: 'rtsp://stream.com', initOptions: [ '--no-audio', '--rtsp-tcp', '--network-caching=150', '--rtsp-caching=150', '--no-stats', '--tcp-caching=150', '--realrtsp-caching=150', ], }} autoplay={true} autoAspectRatio={true} resizeMode="cover" isLive={true} autoReloadLive={true} style={{ height: calcVLCPlayerHeight( Dimensions.get('window').width, 3/4), marginTop: 30}} /> ` Behind make component, follow the steps:
- Make a development build in expo with npx expo prebuild --clean
- Run project with: npx expo run:androidornpx expo run:ios. This builds your project according to your device. (Necessary a emulator android/ios)
- With any changes, you need to start your project with npx expo start --dev-client
Sorry my english, I hope this works.
Omg, it works. Thank you so much, you've saved me 3 weeks of work. Thanks
Fix issue: First install expo-dev-client :
npx expo install expo-dev-client.VLCPlayer component is something like this:
`import { VLCPlayer } from 'react-native-vlc-media-player';
const calcVLCPlayerHeight = (windowWidth,aspetRatio) => { return windowWidth * aspetRatio; };
<VLCPlayer source={{ initType: 2, hwDecoderEnabled: 1, hwDecoderForced: 1, uri: 'rtsp://stream.com', initOptions: [ '--no-audio', '--rtsp-tcp', '--network-caching=150', '--rtsp-caching=150', '--no-stats', '--tcp-caching=150', '--realrtsp-caching=150', ], }} autoplay={true} autoAspectRatio={true} resizeMode="cover" isLive={true} autoReloadLive={true} style={{ height: calcVLCPlayerHeight( Dimensions.get('window').width, 3/4), marginTop: 30}} /> ` Behind make component, follow the steps:
- Make a development build in expo with
npx expo prebuild --clean- Run project with:
npx expo run:androidornpx expo run:ios. This builds your project according to your device. (Necessary a emulator android/ios)- With any changes, you need to start your project with
npx expo start --dev-clientSorry my english, I hope this works.
It works correctly on ios and android emulators but after publish (with command: eas update ). I've got the same error:requireNativeComponent: "RCTVLCPlayer" was not found in the UIManager.
Any idea why it doesn’t work after publish with expo on expo go app ?
Fix issue: First install expo-dev-client :
npx expo install expo-dev-client. VLCPlayer component is something like this:import { VLCPlayer } from 'react-native-vlc-media-player'; const calcVLCPlayerHeight = (windowWidth,aspetRatio) => { return windowWidth * aspetRatio; }; <VLCPlayer source={{ initType: 2, hwDecoderEnabled: 1, hwDecoderForced: 1, uri: 'rtsp://stream.com', initOptions: [ '--no-audio', '--rtsp-tcp', '--network-caching=150', '--rtsp-caching=150', '--no-stats', '--tcp-caching=150', '--realrtsp-caching=150', ], }} autoplay={true} autoAspectRatio={true} resizeMode="cover" isLive={true} autoReloadLive={true} style={{ height: calcVLCPlayerHeight( Dimensions.get('window').width, 3/4), marginTop: 30}} />Behind make component, follow the steps:
- Make a development build in expo with
npx expo prebuild --clean- Run project with:
npx expo run:androidornpx expo run:ios. This builds your project according to your device. (Necessary a emulator android/ios)- With any changes, you need to start your project with
npx expo start --dev-clientSorry my english, I hope this works.
It works correctly on ios and android emulators but after publish (with command: eas update ). I've got the same error:requireNativeComponent: "RCTVLCPlayer" was not found in the UIManager.
Any idea why it doesn’t work after publish with expo on expo go app ?
Its because when make a prebuild, and run project with npx expo run:android or npx expo run:ios project are ejected from expo go, 'cause expo go doesn't support native libs from react-native. The project running only on emulators with a development build.
If you notice when using the command npx expo start --dev-client , metro bundler starts the project in "development build" mode. And when you run the project in the emulator, an application is created for your project, not using expo.
Hi. Please can anyone give me a sample code to run a video from url in vlcplayer, i am not much experienced in this, but really want to use it for my work, please anyone.
import { VLCPlayer } from 'react-native-vlc-media-player';
const calcVLCPlayerHeight = (windowWidth,aspetRatio) => {
return windowWidth * aspetRatio;
};
<VLCPlayer
source={{
initType: 2,
hwDecoderEnabled: 1,
hwDecoderForced: 1,
uri:
'rtsp://stream.com',
initOptions: [
'--no-audio',
'--rtsp-tcp',
'--network-caching=150',
'--rtsp-caching=150',
'--no-stats',
'--tcp-caching=150',
'--realrtsp-caching=150',
],
}}
autoplay={true}
autoAspectRatio={true}
resizeMode="cover"
isLive={true}
autoReloadLive={true}
style={{ height: calcVLCPlayerHeight( Dimensions.get('window').width, 3/4), marginTop: 30}}
/>
Hi. Please can anyone give me a sample code to run a video from url in vlcplayer, i am not much experienced in this, but really want to use it for my work, please anyone.
I tried npx expo prebuild --clean and then npx expo run:android  but nothing worked .
Also, I built two different versions, with plugins in app.json and without plugins, and still got the same error on both builds.
Any suggestions?
Note that expo-dev-client is also installed
I tried
npx expo prebuild --cleanand thennpx expo run:androidbut nothing worked .Also, I built two different versions, with plugins in
app.jsonand without plugins, and still got the same error on both builds.Any suggestions?
Note that
expo-dev-clientis also installed
you started project with npx expo start --dev-client ?
what errors you got ?
I tried
npx expo prebuild --cleanand thennpx expo run:androidbut nothing worked . Also, I built two different versions, with plugins inapp.jsonand without plugins, and still got the same error on both builds. Any suggestions? Note thatexpo-dev-clientis also installedyou started project with
npx expo start --dev-client? what errors you got ?
I will be listing all things that I tried here:
1. when I run npx expo run:android the app will start automatically in the emulator
Here is what I see first:
2. When I try to start the app from Expo Go and import <VLCPlayer/> component I receive this :
[Invariant Violation: requireNativeComponent: "RCTVLCPlayer" was not found in the UIManager.
3. When I use npx expo start --dev-client  to open my development build, Here is what I got:
I just entered a whirl with no solution, any suggestions?
hello, @amjadmak any update with your error? im getting the same error here :/
Hey, @mvmmarcus . Unfortunately, no updates. I could not use it. I tried to use it for a hobby project, but since there is an error I just left the whole project.
I would like to see a solution though
@amjadmak tks for feedback. I will abort expo and build app with CLI :/
@mvmmarcus before aborting Expo, you can try two options.
- A different react nativelibrary that offers the same or similar feature.
- Degrade your current react nativeversion. I read that it works fine with previousreact nativeversions.
You can also go to the link Here and vote for adding an RTSP streaming library to Expo. I have seen a lot of people asking this but still not available
Check how many versions of Expo you have in your package.json file. You can uninstall the libraries one by one and see if it works. Personally, I had the same problem. Upon carefully checking my package.json file, it turned out that I had 2 versions of Expo, both in dependencies and devDependencies.