Audio preloading

Audio preloading

by Robyn Lambell -
Number of replies: 5

Hi
I have a video with audio and what is happening is the audio in the video is automatically playing when the course is opened.

The video doesn't start just the audio and we cannot stop it.  If you press play on the video you get two lots of audio. 

This is happening to some users but not all.  It doesn't appear to matter whether the video is on the course page, in a page or in a lesson, they get the same problem.

I cannot replicate it and I am finding it difficult to ascertain the issue.

I have Moodle 3.1 and the video is an MP4.

Any help would be appreciated.


Average of ratings: -
In reply to Robyn Lambell

Re: Audio preloading

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Robyn

The intermittent nature of the problem makes it hard to find the cause. As I am sure you have found. Are there any common characteristics of the user environment or device/browser when the problem occurs? eg....they are all using Internet Explorer.

And, is this just one problem video, or does it occur on other videos too? If you have a good video and a bad video, you can compare what the makeup of the videos are. Not all MP4s are made up the same way. 

Provided the videos are shareable, you could post them, or publically accessible links to them, here and I could have a look. 

In reply to Justin Hunt

Re: Audio preloading

by Robyn Lambell -

Hi Justin and Ben

They are different videos, different users (some are staff, facilitators, admin users), both Firefox and IE and different devices.

I personally do not have the issue in either Firefox or IE, so I am creating courses thinking they are completely fine.

There were no hidden files anywhere.  I checked Moodle docs and it advised that videos directly on a course page may or will autoplay but the video isn't autoplaying just the audio and it is happening in a lesson as well.  Sometimes when the course is opened or when they open the lesson if there are a number of videos in the lesson the audio for all of them will commence all at the same time or a few seconds apart and as the video isn't playing we cannot stop it.

Fortunately all of the courses are under development and are not live to staff but until we fix this issue we cannot make them live to staff.


I cannot seem to add one of the videos to this forum, it is too large but as I said it isn't a particular video, user or browser.

I am trying to find a fix 'if' I can before my technical team come back.

In reply to Robyn Lambell

Re: Audio preloading

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Robyn

This sounds like a problem for your technical team to be honest. I would wait for them.

  • I would first do my best to find out how to reproduce the problem reliably. Thats really important.

  • Then I would check in the javascript console for telltale error messages that might point to the culprit.

  • I would see if the problem only happened when multiple videos were on the page or just one.

  • I would upload a standard  baseline 3.1 encoded MP4, that plays on anything pretty much, to the same place. Then see if it worked or not.
    ( I made this one myself. https://drive.google.com/open?id=1cLyRcALATWiVTt7YW0PX3ewk70o6durT    )

  • I would check what filter and player are being used to play the videos? Then I would turn off all filters but the one supposed to play the media. Then I would turn the others back on one by one, testing to see if any causes the problem.  

Something like that anyway.

( My guess is that they are always autoplaying, but that the video codec used in the MP4 is not available on certain PCs. So the video bit just stops, while the audio bit keeps on going.  And because of the size of some videos they load later or earlier than others, and this affects whether they autoplay or not.) 

In reply to Robyn Lambell

Re: Audio preloading

by ben reynolds -

I note that all the users you mention are people likely to have editing rights. Have you got a student role in the classroom? If so, I would enable "login as" in the course and then have users login as a student and see what happens.

I have the experience your users describe when I am editing a Lesson using the "Expanded" tab. In edit mode, all the videos in a lesson are on the same page, and they will all begin to play relatively shortly after I enter edit mode. They are all .swf (Flash based). This does not happen in my FF because Flash is not enabled in that browser. I don't use IE, so have no idea what happens there.
I think Jason is correct about video codecs working/not working in different peoples' browsers, which is why the audio will play with no video.

If you would like me to take a look, you can email me a link and login info. ben.reynolds@jhu.edu Put your name and "Moodle" in the subject header so it hopefully doesn't get filtered as spam.

In reply to Robyn Lambell

Re: Audio preloading

by ben reynolds -

Really odd. Justin has asked some good questions.

I'm wondering if there's a link on the course page that is somehow hidden. I can't imagine a situation in which a video inside a lesson would begin playing when the course is opened.

Also, do the users having this unpleasant experience all have the same role in the course?

To check for hidden links in hidden topics, assuming you are not using the new stealth activities setting, you might want to go to course settings > course format > format and make hidden sections are shown in collapsed form. If you are using a version older than 3 or so, it's a different procedure.