Forum Discussion
You Tube Video autoplay Parameter Not Working
Thanks Jürgen,
I so appreciate your detailed information. What you indicate about cross-origin integration is a real revelation for me, and explains a lot, especially when I don't have access to the outer iFrame. I now think of it as being similar to Russian dolls (each inside of a larger one), and it's only the largest (outside) doll that determines what is seen.
And yes, your "Insert Video from Website" suggestion is the best way to go. But I am facilitating a workshop on web objects and need to be able to demonstrate how all likely situations work (or don't).
What I have discovered while thrashing around is that if I put the video as web object in a layer that is called from the base layer, the autoplay works. It solves my issue, but I can't explain why. It shouldn't have any effect on the cross-origin integration.
- Jürgen_Schoene_2 years agoCommunity Member
for you workshop you should modify the index.html of the web object
in your version there is only the iframe - it works, but is actually wrong
here is a complete version
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="address=no">
<meta name="referrer" content="same-origin">
<title>youtube</title>
<style>
body {
position: absolute;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
iframe {
border: none;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<iframe src="https://www.youtube.com/embed/kykOE2e62DE?autoplay=1&modestbranding=1&start=11" allow="autoplay; fullscreen; picture-in-picture;" allowfullscreen></iframe>
</body>
</html>>What I have discovered while thrashing around is that if I put the video as web object in a layer that is called from the base layer, the autoplay works. It solves my issue, but I can't explain why. It shouldn't have any effect on the cross-origin integration.
very interesting, I will have a look at that - autoplay on chrome is a very special thing