Audio - Autoplay on first slide

Audio - autoplay does not work on first slide.

Thanks

falcon's picture

Are you on a PC/Mac or a mobile device`?

PC, Firefox, Drupal

falcon's picture

Sounds like a bug. Thank you for reporting! (On mobile it isn't possible to make it work, but possible on PC)

Is there a reason why this would not work on mobile devices?

falcon's picture

A website shouldn't be able to start playing video or audio automatically because it uses lots of bandwidth. The mobile checks if playing the audio is triggered by a click on the page or not. If it isn't it won't start playing.

Thank you. Much as I found (after a bit of googling). Do you know if the click needs to be a specific one of the audio element, or could it be anything that then invokes the play() method?

falcon's picture

Can be any click as long as it is in the stack that ended up calling the play method afaik
janilemm@gmail.com's picture

Hi!

I was recently able to reproduce this one on both in Moodle and Drupal, with following OS's / browsers:

  • Mac/Firefox (newest version)
  • PC/IE 11

Actually, these browsers are not playing audio at all - it is not depending if autoplay is on/off.
Test audio is on Course Presentation slide.

On Mac/Chrome and Mac/Safari (newest versions) I can't reproduce this.

Cheers,

Jani

janilemm@gmail.com's picture

Hi!

Just done some more testing, and it seems to be that this issue is related to .wav audiofiles only.
Changed the audiofile into .mp3 file and it works fine with Firefox as well.

It would be nice if you can confirm if this is related to .wav only :-)

Best regards,
Jani

BV52's picture

Hi Jani,

Thank you for the information. However I cannot reproduce the issue on my end, I'm using Mac with Firefox V 66.0.2 (64-bit). Do you have a sample content that we can check?

-BV52

janilemm@gmail.com's picture

Hi,

Sure - here's test content, created in h5p.org.

Here's my observations:

  • If audio is on the first slide of course presentation, it is no playing on autoplay (all browsers) before user has navigated away from first slide and then back. This is not depending if the audio is mp3 or wav.
  • Wav audio examples on slide 4 and 5 doesn't played at all at Firefox & IE11 but are OK with Chrome, Safari and Edge.

Cheers,

Jani

BV52's picture

Hi Jani,

Thank you for the additional information. There is an existing bug report for the auto-play issue on the first slide and you can follow the progress here. For the other issue I've created a separate report here.

-BV52 

janilemm@gmail.com's picture

Hi BV,

Thank you confirming this.

Cheers,
Jani

janilemm@gmail.com's picture

Hi,

I was able to reproduce this in H5P.org, Drupal & Moodle, on these OS's / browsers:

  • Win/IE 11
  • Mac/Firefox (newest version)

It seems that these browsers doesn't play audio at all - it is not depending if autoplay is on/off.
My test audio is on Course presentation slide. Tested on several workstations.

On Chrome (both OS's) and Edge, audio works fine.

Hopes this helps you to solve this issue.

Cheers,

Jani

Hello,
We are also having the same issue. First slides of all modules do not auto play. However, it seemed to work when we started to build the content and the issue did not surface. Only after we built many modules we discovered the issue. I look forward to hear a resolve on this issue.
Anyone has any workarounds? It seems just adding a heading slide with no audio in the beginning seems to work.
Ranjana Verma

otacke's picture

Hi Rverma!

I am not entirely sure if that's a problem with H5P or simply browsers becoming more strict when it comes to autoplaying audio.

Best,
Oliver

Our issue is that the audio autoplays then when you navigate back to the slide to see/hear it again - the audio has to be manually triggered. Does autoplay only work on the first pass of the slide deck?

BV52's picture

Hi nkearns,

In most cases the auto-play not working can be attributed to security features within browsers. The best way for us to check this is if you can provide a sample content that exhibits this issue. 

-BV

Hi Bienvenido

Yes thanks for your reply. In more detail the H5P presentations that were created last year – the audio works fine – auto plays on first pass and also if you go back through the slides it autoplays again. These still work perfectly.

H5P’s created this month – all settings the same – the autoplay only plays on first pass then if you go back to a previous slide you need to manually trigger the audio. 

All being played in same browser (Chrome Version 119.0.6045.200 (Official Build) (64-bit)) on same Windows PC.

 I can attach an example directly to you but not in the forum as the activities are part of a research project and cannot be made public for ethical reasons.

 Any advice would be appreciated,

 Many thanks

 Niki

BV52's picture

Hi Niki,

You can fill out this form: https://h5p.org/contact

Once I answer from my side you will  be able to attach files in the email.

No promises, as I have mentioned and what Oliver's blog have explained this is usually the browser's security blocking the auto-play.  

-BV

Thanks for the reply - some more info from our technical team:

both of the activities are using different versions of the H5P Course Presentation library (1.22 vs 1.25), and the H5P audio library (1.4 vs 1.5) 

This would indicate that the newer version has a bug that means that a second pass of the slides is not allowing autoplay of audio.

Just to reitterate - my issue is not with autoplay 'not' working - it works. However, if you go back to a previous slide it no longer autoplays on the newer version of the H5P presentation. So this is not a browseer issue as the older version of the h5p everything works perfectly. I will send an example using the lin in your email thanks,

Niki