0

I am using react-native-video in my app for videos. Most of the videos are working as expected. But for some videos, a green border is appearing around the video.I don't know from where it is coming. Can someone please help me with this?

Green Border

Please check below source code

                     <View style={{
                        width:  160,
                        height:  270,
                        justifyContent:"center", 
                        alignItems: 'center',
                    }} >
                        
                        <Video
                            ref={(ref) => {
                                Player = ref
                       
                            }}
                            source={source}
                            ignoreSilentSwitch="ignore"
                            key={"key"+keyVal.toString()}
                           
                            style={{
                                width: 160,
                                height: 270,

                            }}
                            muted={false}
                            volume={1.0}
                          
                            resizeMode= {"contain"}
                            paused={isPaused}
                            onError={(error) => {
                            }}
                           
                            onReadyForDisplay={() => {

                            }}
                          
                            playInBackground={false}
                            playWhenInactive={false}
                        />

                    </View>
Nagesh Fultambkar
  • 546
  • 1
  • 7
  • 22

1 Answers1

0

it's maybe refer to your video style . at first change your video component style like this :

  style={{
            width: "100%",
            height: "100%",
         }}

if not work , you can change resizeMode of video component like stretch

Meisan Saba
  • 800
  • 2
  • 9
  • 25