Coder Social home page Coder Social logo

Comments (3)

jeaniekarina avatar jeaniekarina commented on July 23, 2024 2

Make these two changes:

diff --git a/node_modules/react-native-af-video-player/components/Time.js b/node_modules/react-native-af-video-player/components/Time.js
index 01be913..9e847ac 100644
--- a/node_modules/react-native-af-video-player/components/Time.js
+++ b/node_modules/react-native-af-video-player/components/Time.js
@@ -32,7 +32,7 @@ class Time extends Component {
   render() {
     return (
       <View style={styles.container}>
-        <Text style={{ color: this.props.theme }}>{this.getTime(parseInt(this.props.time, 10))}</Text>
+        <Text style={{ color: this.props.theme.iconColor }}>{this.getTime(parseInt(this.props.time, 10))}</Text>
       </View>
     )
   }
diff --git a/node_modules/react-native-af-video-player/components/Video.js b/node_modules/react-native-af-video-player/components/Video.js
index 258171b..ae7cfd6 100644
--- a/node_modules/react-native-af-video-player/components/Video.js
+++ b/node_modules/react-native-af-video-player/components/Video.js
@@ -318,7 +318,7 @@ class Video extends Component {
         <Icons
           name="replay"
           size={60}
-          color={this.props.theme}
+          color={this.props.theme.iconColor}
           onPress={() => this.setState({ renderError: false })}
         />
       </Animated.View>

And then the theme will work correctly. Im using patch-package. npx patch-package react-native-af-video-player will apply it for you without waiting on this library to be updated.

from react-native-af-video-player.

sure1243jupiter avatar sure1243jupiter commented on July 23, 2024 1

hey @crzycoder sry for the late replay
do not fix the color="white" as static
i have changed it to
color={this.props.theme,iconColor} in the <Icons /> in the video.js file in react-native-af-video library

and in your code where you are calling react-native-af-video-player you can do like this

<Video
......
theme={styles.videoTheme} />

where you can pass the theme as declared styles from there it will take iconColor.
you can also pass the color to different views like this

const styles={
  videoTheme :
  {title:'#FFF',
  more: '#FFF',
  center: '#FFF',
  fullscreen: '#FFF',
  volume: '#FFF',
  scrubberThumb: '#FFF',
  scrubberBar: '#FFF',
  seconds: '#FFF',
  duration: '#FFF',
  progress: '#FFF',
  loading: '#FFF',
  iconColor:'#FFF'},
}

from react-native-af-video-player.

crzycoder avatar crzycoder commented on July 23, 2024

In video.js line 351 color={this.props.theme} replace it with color="white"

from react-native-af-video-player.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.