视频周围出现绿色边框
我在我的视频应用程序中使用 react-native-video 。大多数视频都按预期工作。但对于某些视频,视频周围会出现绿色边框。我不知道它来自哪里。有人可以帮我解决这个问题吗?
请检查下面的源代码
<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>
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?
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是指你的视频风格。首先更改您的
video
组件样式,如下所示:如果不起作用,您可以更改
video
组件的resizeMode
,例如stretch
it's maybe refer to your video style . at first change your
video
component style like this :if not work , you can change
resizeMode
ofvideo
component likestretch