abbasfreestyle / react-native-af-video-player

MIT License
381 stars 288 forks source link

warnings for refresh icon in player #66

Open sure1243jupiter opened 6 years ago

sure1243jupiter commented 6 years ago

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

vidplayer_issue1

The warning says the error is getting in video.js file in the "react-native-af-video-player" library

vidplayer_issue2

and also getting this warning after that

vidplayer_issue3 vidplayer_issue4

cleoTang commented 5 years ago

Hi! Now I have this problem, can I ask you how to solve it?

sure1243jupiter commented 5 years ago

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'
  }
  1. try declaring this theme in your file and pass this theme as prop to Video
    <Video
    theme={theme}
    />
  2. 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

change there like this and save the file.

  <Icons
          name="replay"
          size={60}
          color={this.props.theme.iconColor}
          onPress={() => this.setState({ renderError: false })}
/>
  1. or of that doesn't work try directly adding color to 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.

cleoTang commented 5 years ago

Thank you, I try to

cleoTang commented 5 years ago

The second solution can solve my problem. Thank you.