-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(ios)the same uri work in 3.0.0 but not work in 3.1.0 #1140
Comments
I will go ahead and test this to see if I can find any problems. Which uri are you using, I am guessing 3.1.0 has a bug for some files but not all. |
hi cobarx, I use local resource, in 3.0.0 need use absolute path,but in 3.1.0 ,need use relative path |
Can you give me an example of what that local resource looks like. I want to make sure I'm testing the right thing. |
ok,i will make a simple example for you later |
In my project the ios directory structure like this
in early version, we need use the MainBundlePath in the uri can make it work import React, {Component} from 'react';
import {
StyleSheet,
View,
} from 'react-native';
import Video from 'react-native-video';
import { MainBundlePath } from 'react-native-fs';
type Props = {};
export default class App extends Component<Props> {
render() {
console.warn('mainPath:', MainBundlePath);
return (
<View style={styles.container}>
<Video
source={{uri: MainBundlePath + '/static/test.mp3'}}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
}); But recently ,we update our version to 3.1.0, in 3.1.0, we use this relative path can work, if add
|
i found |
I have the same issue between and use the component like this: |
Same issue here, works on 3.0.0 but doesn't on 3.1.0 with a local uri |
For me it works with |
External URLs are working fine, but any local file does not load. The
This exact code worked prior to upgrading |
Quick fix, thanks a lot :) |
YOU amazing HEROS!! |
3.2.0 is good use,but 3.2.1 & 3.1.0 is not |
Current behavior
When i upgrade from 3.0.0 to 3.1.0, the video can not load with the same uri, in 3.0.0 the uri is ok,but in 3.1.0 it not work, have something to mind before upgrade?
Platform
Video sample
The text was updated successfully, but these errors were encountered: