Report any technical problems you discover and discuss solutions.

YouTube embed code - Autoplay & related videos

  • Nazryn
  • Onderwerp Auteur
  • Offline
  • Nieuw lid
  • Nieuw lid
Meer
12 jaren 9 maanden geleden #806 door Nazryn
Hi,

I've been trying to get a video to play (autoplay and not show related videos at the end) within Xerte and i'm not sure what might be causing it to fail. I've tried using the same embed code in Moodle and it seems to work fine.

Here's the code;

<iframe height="315" src=" www.youtube.com/embed/ESj91NwIraY?rel=0&autoplay=1 " frameborder="0" width="560" allowfullscreen="">

The embed code works with just the '?rel=0' part, but seems to fail when I add the autoplay.
Does anyone know what might be the problem?

Many thanks!
Nazryn
Newman University

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
12 jaren 9 maanden geleden #833 door tom
Beantwoord door tom in topic YouTube embed code - Autoplay & related videos
The youtube page doesn't really use the imber code, but extracts information from it. Autoplay is not supported. If you want that, use the 'Navigators->Embed content' page.

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
12 jaren 9 maanden geleden #847 door JohnSmith
Beantwoord door JohnSmith in topic YouTube embed code - Autoplay & related videos
Hi,

At the time when we developed this page model, we decided not to implement the autoplay feature since autoplay is not generally considered good practice and playback should be in the control of the end user.

If this is something that you need though then you can make the necessary changes in your own local install at:

/modules/xerte/parent_templates/Nottingham/models_html5/youtube.html

You will see that the iframe object supports autoplay but it is off by default. You can force it on always by changing the value at line 27 but it would be better if you added some code between lines 107-134 to parse the actual pasted embed code.

Regards,

John

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Moderators: ronmjultenJohnSmith
Tijd voor maken pagina: 0.230 seconden
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo