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

Incorrect 'preload' attribute in html5 audio

XMLWordPrintable

    • MOODLE_30_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-52965_master
    • 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.

      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).

            davosmith Davo Smith
            davosmith Davo Smith
            David Monllaó David Monllaó
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.