react-native-af-video-player icon indicating copy to clipboard operation
react-native-af-video-player copied to clipboard

warnings for refresh icon in player

Open sure1243jupiter opened this issue 6 years ago • 4 comments

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

sure1243jupiter avatar Jul 05 '18 06:07 sure1243jupiter

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

cleoTang avatar Apr 29 '19 03:04 cleoTang

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}
/>
  1. 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 })}
/>
  1. 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.

sure1243jupiter avatar Apr 29 '19 05:04 sure1243jupiter

Thank you, I try to

cleoTang avatar Apr 29 '19 05:04 cleoTang

The second solution can solve my problem. Thank you.

cleoTang avatar Apr 29 '19 06:04 cleoTang