TheWidlarzGroup / react-native-video

A <Video /> component for react-native
http://thewidlarzgroup.github.io/react-native-video/
MIT License
7.16k stars 2.88k forks source link

[BUG]: Portrait video auto crop to landscape when bad network #3713

Closed hieppd79 closed 4 months ago

hieppd79 commented 5 months ago

Version

v6 (Beta 8)

What platforms are you having the problem on?

No response

Architecture

Old architecture

What happened?

Portrait video auto crop to landscape when bad network

Bad network : image

Normal network: image

This is my component image

Reproduction

repository link

Reproduction

image
hieppd79 commented 5 months ago

And i have a question, When the network is slow, the video will stop for a certain frame. How can I capture that event and add it to the loading indicator?

freeboub commented 5 months ago

Currently there is no such event... regarding to the ticket, I think the issue comes from you video. BTW, did you try to use resize mode : https://react-native-video.github.io/react-native-video/component/props#resizemode ? Is it android or ios or both ?

hieppd79 commented 5 months ago

Currently there is no such event... regarding to the ticket, I think the issue comes from you video. BTW, did you try to use resize mode : https://react-native-video.github.io/react-native-video/component/props#resizemode ? Is it android or ios or both ?

I have tried and only resizeMode.contain is suitable, but when the network is slow, this situation is quite uncomfortable for the user. I encounter it a lot on iOS, I will confirm later on Android.

hieppd79 commented 5 months ago

Currently there is no such event... regarding to the ticket, I think the issue comes from you video. BTW, did you try to use resize mode : https://react-native-video.github.io/react-native-video/component/props#resizemode ? Is it android or ios or both ?

I have tried and only resizeMode.contain is suitable, but when the network is slow, this situation is quite uncomfortable for the user. I encounter it a lot on iOS, I will confirm later on Android.

"I think the issue comes from you video" Can you explain your speculation more clearly? @freeboub I don't play pre-recorded videos, I play stream with .m3u8

freeboub commented 5 months ago

@hieppd-slz It is possible that your m3u manifest contains bad informations, this is what I am suspecting. If you have a sample m3u to share, I can have a look

freeboub commented 4 months ago

I think this issue is fixed in 6.1.2. please test this version, I will reopen if reproduced

hieppd79 commented 4 months ago

image @freeboub still exist on 6.1.2

freeboub commented 4 months ago

@hieppd-slz without a sample video to reproduce the issue, it cannot be investigated...

hieppd79 commented 4 months ago

@hieppd-slz without a sample video to reproduce the issue, it cannot be investigated...

image

do you want the master.m3u8 file for analysis?

hieppd79 commented 4 months ago

@freeboub I'm streaming now with https://3bfa35a01653.ap-northeast-2.playback.live-video.net/api/video/v1/ap-northeast-2.299113936449.channel.OmJQKmFqSFi4.m3u8

freeboub commented 4 months ago

I tried to put the video in the sample and force low profile video, but I don't reproduce the issue ... On emulator changing to "low profile" gives some video resize issue (but this is an emulator issue) On my phone (oppo A57), switching to low profile gives a VIDEO_DECODING error, enabling useTextureView={false} fixed the issue.

Maybe you should try this useTextureView option ...

Bu I don't reproduce the resize issue you are showing :/

hieppd79 commented 4 months ago

I tried to put the video in the sample and force low profile video, but I don't reproduce the issue ... On emulator changing to "low profile" gives some video resize issue (but this is an emulator issue) On my phone (oppo A57), switching to low profile gives a VIDEO_DECODING error, enabling useTextureView={false} fixed the issue.

Maybe you should try this useTextureView option ...

Bu I don't reproduce the resize issue you are showing :/

it seems to be an android property, this phenomenon occurs on ios and is reported by users, one more information is, when this phenomenon occurs, src dimensions returned from onLoad is landscape, while the stream being played is portrait @freeboub pls re-open this issue