react-native-af-video-player
react-native-af-video-player copied to clipboard
warnings for refresh icon in player
versions : "react-native": "0.54.1", "react-native-af-video-player": "^0.2.1",
getting the error since the last two versions of video player getting this screen and the refresh icon is failing to displaying its color
The warning says the error is getting in video.js file in the "react-native-af-video-player" library
and also getting this warning after that
Hi! Now I have this problem, can I ask you how to solve it?
Actually i have not been using RN Since long time but any way try these solutions.
const theme = {
title: '#FFF',
more: '#FFF',
center: '#FFF',
fullscreen: '#FFF',
volume: '#FFF',
scrubberThumb: '#FFF',
scrubberBar: '#FFF',
seconds: '#FFF',
duration: '#FFF',
progress: '#FFF',
loading: '#FFF'
}
- try declaring this theme in your file and pass this theme as prop to Video
<Video
theme={theme}
/>
- or if it doesn't work try directly modifying the library file video.js file in "node_modules/react-native-af-video-player/components"
add a custom theme like this
const theme = {
title: '#FFF',
more: '#FFF',
center: '#FFF',
fullscreen: '#FFF',
volume: '#FFF',
scrubberThumb: '#FFF',
scrubberBar: '#FFF',
seconds: '#FFF',
duration: '#FFF',
progress: '#FFF',
loading: '#FFF',
iconColor: '#FFF' // this is the icon color
}
and pass this theme as props in <Video> and in Video.js file library in line no.318 you will find a tag with <Icons>
change there like this and save the file.
<Icons
name="replay"
size={60}
color={this.props.theme.iconColor}
onPress={() => this.setState({ renderError: false })}
/>
- or of that doesn't work try directly adding color to <Icons> without depending on props but this will make the icon player color to static we cannot change it dynamicaly then from props.
<Icons
name="replay"
size={60}
color="#FFF"
onPress={() => this.setState({ renderError: false })}
/>
pls comment out if this works or not.
Thank you, I try to
The second solution can solve my problem. Thank you.