Embedding Vimeo videos - autoplay means videos won't stop playing in Hype

I’m successfully embedding Vimeo videos into a rectangle in Hype - editing the source then copying embed code.
However an annoying thing is happening when I create embed code with autoplay, Hype won’t stop playing the video while the file is open - which is distracting! I feel like this is a bug - I’ve tried it with a few different videos with the same result.
Sample file attached to show what I’m talking about. - VimeoTest.hype.zip (12.2 KB)
Is this a bug or can I make it stop?

If you were to put this page directly on the web and load it, the video won’t autoplay (due to restrictions regarding autoplaying media that isn’t muted).

So you’re experiencing an annoyance that browser developers have ensured doesn’t happen to other people. Since Hype’s scene editor is a web browser, it’s doing what it thinks is right based on the code you give it, but Hype allows autoplaying audio.

I was trying to think of a way to detect in JavaScript whether an element is shown on Hype’s scene editor (and remove an autoplay variable) but I’m not sure how to do that.

One workaround: You could have two versions of an element: one with the video autoplaying, and the other a placeholder, and just hide the autoplaying version during development.

1 Like

Thanks for the quick response Daniel - understand now and since it won’t autoplay when uploaded I’ll just turn that function off - unless you can suggest a way to get around this in a browser? When I go to a vimeo page it will autoplay - but obviously not when it’s in embedded code.

hi Daniel,

I’m working on this project again and am finding that actually videos DO autoplay as expected when uploaded to the web with embedded Vimeo iFrame code - this works in safari and chrome on a mac desktop and safari on an iPhone.

I’m also finding I have to quit Hype (not just close projects) to stop the autoplay which seem like a bug.

I can workaround this but my project has 20 embedded videos so it’s pretty annoying to work with - they all autoplay during development - I’m also using scene unload javascript to empty the HTML code of the video container to stop videos playing but Hype doesn’t seem to be reading this within the software (it works in browsers).

Unfortunately your workaround of hiding a video element with autoplay doesn’t work - it continues to autoplay while Hype is open, I have to quit Hype completely to get it to stop playing. Any suggestions would be great, thanks.

I’ve attached a sample hype file so you can see what I’m doing - note this is responsive.EmbeddedVideoAutoplay.hype.zip (29.5 KB)

have you considered using vimeos API? It’ll preserve exact control for videos …

////
while working within Hype you could simply set the autoplay = 0 in the embed-code … though. reset when publishing …

Thanks for the response Hans-Gerd. My programming skills are pretty basic however so am not sure how to do this - I know the theory behind what you’re suggesting but have no idea how to execute it - if you have a link or a demo file it would be much appreciated.

My current strategy is to reset to autoplay = 1 for every video when publishing. However with 20 videos this gets a bit tedious and I have to mute my sound as the noise of 20 videos playing simultaneously builds up to a cacophony…