ChowChow
ChowChow

Reputation: 1

Video stops when switching screen mode from mobile portrait to mobile landscape

I have two layouts for my video component where one of which will be rendered depending on the screen size. I start playing the video when it's on mobile mode, and now I'm switching into mobile landscape mode which will cause the video to stop because a different layout is being rendered again. What are the possible solutions for this problem? What is the clean solution to it?

I'm considering to use a context to share video information such as timestamp, playing, setPlaying... between these video components(theoretical the same one) so that when the other is being rendered I can grab the shared information.

Upvotes: 0

Views: 21

Answers (0)

Related Questions