Closed RZulfikri closed 7 years ago
@RZulfikri just add source string https://github.com/shahen94/react-native-video-processing/blob/master/lib/VideoPlayer/VideoPlayer.ios.js#L10
<VideoPlayer
....
source={this.props.uri}
....
/>
already try that solution, but i got nothing in my view, it only litle red in left corner..
and my code :
did i miss something ?
Can you please copy and past your source URI here, also please give me more details on which platform did you checked it, on which rn version do you use
actually i use file from camera roll/device. I use image picker component, so the URI may look like "/Users/lembah8/Library/Developer/CoreSimulator/Devices/B187BB61-5580-423A-98BC-1E1D0F3D5FA2/data/Containers/Data/Application/D82AA33C-E5B0-467A-B4BD-B2F57E7EDBA4/tmp/trim.72D3B914-8A93-473D-8158-4046026A7C34.MOV"
i try it on IOS, using react-native 4.0
seems like you linked library not correctly, check How to setup
section
I think when the path is like yours, @RZulfikri, you need to prepend file://
to the path.
@shahen94 already try setup xcodeproj by following video tutorial for twice, but still got same problem.. @flybayer already try but still same..
can you add some example project ?
thanks.
@shahen94 when i try on android it work
This the view when i try in ios and android.
Android | IOS |
---|---|
![]() |
![]() |
i guess i missing something when setup IOS but i dont know what. For information, my project didnt have "ProjectName-Bridging-Header.h" so i create one and add some code from your video. Did the problem because of that ?
@RZulfikri you are using reacts natives images picker right ?
@shahen94 yup..
Well, as result it gives you object right, pass origUrl
to source
still same, i got uri like this "file:///Users/lembah8/Library/Developer/CoreSimulator/Devices/B187BB61-5580-423A-98BC-1E1D0F3D5FA2/data/Containers/Data/Application/5020CE67-D857-4C72-9166-C13D7060452E/tmp/trim.0B0D6057-ED5D-40EA-A8D0-FEDCE281F0CA.MOV"
@RZulfikri origUrl
gives you url from assets library, it should start with assets-library?
.
@shahen94 so i should try that on device ? because assets-library only for devices ?
@RZulfikri not only, i used it on simulator
@RZulfikri Definitely you're linked the library not correctly. React-native shows red border around unrecognized view.
@shahen94 what should i do then ?
@RZulfikri check chrome console, there should but an error, remove library from project and follow the video, and do all what it shows
@shahen94 ok thank you, i will try..
yeah you right. Already remove library and re-add library but still got this issue..
@shahen94 i guess it because failed import method.. based on tutorial video, i must import RVVideoProcessing like #import "RNVideoProcessing.h"
and it look same at "RNVideoProcessing.h" #import "RNTrimmerView.h"
and i'm trying to add file directory before file name, but still got that error.. And thanks for your response
@shahen94 i already follow step from readme and step from video, but still error..
@RZulfikri do you still have this issue ?
@shahen94 For IOS ? yes..
Well, let's try to link android manually.
$ react-native unlink react-native-video-processing
after that
Open up android/app/src/main/java/[...]/MainApplication.java
Add import com.shahenlibrary.RNVideoProcessingPackage;
to the imports at the top of the file
Add new new RNVideoProcessingPackage()
to the list returned by the getPackages() method
Append the following lines to android/settings.gradle
:
include ':react-native-video-processing'
project(':react-native-video-processing').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video-processing/android')
Insert the following lines inside the dependencies block in android/app/build.gradle
:
compile project(':react-native-video-processing')
And then link iOS version again as demonstrated in the video.
https://github.com/shahen94/react-native-video-processing/issues/48
@shahen94 thanks
I'm trying the usage example from readme, i use
and also for Trimmer
but, i got warning 'Failed prop type: Invalid prop source supplied to VideoPlayer' and no view loaded, also same for Trimmer . i got this in ios and android. did i miss something ?
then i'm trying using
source={require('./video.mp4')}
no error and no view loaded.if you don't mind, would you add an example ?
thx