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.
ChowChow is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.