Page 1 of 1

youtube autoplay

Posted: Mon Sep 13, 2021 3:45 pm
by wking10
When a hotspot is created with type=Video and source=Youtube, and you specify the youtube URL under "Link Target URL, the video will autoplay with audio.
The way the video pop up and stay on same screen, it's as if it was an iframe. But if it's a normal iframe with embedded youtube video, Youtube doesn't let you autoplay unless with muted audio.
So just out of curiosity, I wonder what makes the built-in youtube hotspot template works differently?

thanks,
william

Re: youtube autoplay

Posted: Mon Sep 13, 2021 4:55 pm
by Hopki
Hi william,
The video element has an auto play checkbox.
If you are embedding a YouTube video with their embed code then you need to add the auto start parameter.
See: https://developers.google.com/youtube/player_parameters
Regards,

Re: youtube autoplay

Posted: Tue Oct 12, 2021 10:04 am
by wking10
Hi Martin,
When embedding, the autoplay parameter will only work if we also specify mute parameter, hence the video will auto start without sound.
This iframe below will auto start the video (muted):

<iframe src="https://www.youtube.com/embed/7w8fgCMRk ... "></iframe>

But if we set mute=0, then the video won't automatically play.


thanks,
william