Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-52965

Incorrect 'preload' attribute in html5 audio

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • Enable the 'multimedia plugins' filter
      • Go to Site administration ► Appearance ► Media embedding and uncheck MP3 audio.
      • Create a forum post with a link to an mp3 file in it
      • Check the generated media player has 'preload="none"' as an attribute
      • Use the Chrome 'network' tab to check that the mp3 file does not preload when you visit the forum post
      • Press play and check (via the 'network' tab) that the mp3 file is now downloaded.
      Show
      Enable the 'multimedia plugins' filter Go to Site administration ► Appearance ► Media embedding and uncheck MP3 audio . Create a forum post with a link to an mp3 file in it Check the generated media player has 'preload="none"' as an attribute Use the Chrome 'network' tab to check that the mp3 file does not preload when you visit the forum post Press play and check (via the 'network' tab) that the mp3 file is now downloaded.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-52965_master

      Description

      The core_media_player_html5audio player in lib/medialib.php has the attribute 'preload="no"'.

      The correct value for this tag is 'preload="none"' (according to https://developer.mozilla.org/en/docs/Web/HTML/Element/audio ).

      With Chrome, setting 'preload="no"' causes the browser to start preloading the file, whereas 'preload="none"' stops it from doing so (this was causing a problem on a client's site, whereby multiple requests to the server hosting the mp3 files, due to multiple audio tags on the page, was causing it the browser to stall).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Mar/16