Hello Hype Forum friends!
I am trying to get a YouTube video embed working so that it continues playing when the layout has changed from mobile to desktop size on a desktop browser, or when someone changes the device orientation on mobile. Unfortunately, I have not been able to get this to work.
In looking for solutions, I’ve found info on how to stop audio of a YouTube video embed when the layout switches. But nothing on how to make the video (and audio) continue when the layout switches.
I was thinking that I might be able to get it to work if I turn the HTML Widget into a symbol.
So, I made a test Hype file that emulates the setup that I have on the website I’m building. It has 2 layouts (mobile and desktop) and 3 scenes:
- The first scene has a YouTube video embed that is just a regular HTML Widget Element.
- The second scene takes the HTML Widget Element and makes it into a symbol.
- The third scene presents the HTML Widget Element as a persistent symbol.
My findings are that on mobile: scene one and scene two keep the video playing when the device orientation is changed (but the device orientation can only be changed once before the vid stops playing). However, none of these solutions worked as intended on desktop (turning the HTML Element into a symbol did not make it so that the YouTube vid would keep playing when the browser was resized to a different layout).
Is this even possible to do? I’d just like visitors to the site to be able to watch the embedded YouTube video as it seamlessly continues to play, even if they resize their browser or change their device orientation back and forth (just like it is if they watch a YouTube video on the YouTube app or directly on a web browser. How can I recreate this behavior in Hype?
Here is the test Hype File I’ve been working with:
NN Responsive Vid Playback Tests.hype.zip (83.3 KB)
I would so appreciate any thoughts on how I might be able to get this to work!
All the best.