Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the options for the mediaelement player's "preload" setting?

The only setting I've come across for "preload" is "none" - what are the alternetives?

I have a long-ish movie that takes a while to start (because of the size, I assume) and I'd like to be able to get it to play more quickly. I reckon that making the video start loading immediately the page loads would give the viewer a quicker response...

like image 807
David Avatar asked Feb 24 '23 20:02

David


1 Answers

The preload attribute is part of the HTML 5 spec. Steve Souders blog post discusses the allowable values and explains how each browser handles the attribute.

  • no preload attribute - Preload is not specified.
  • preload='none' - From the spec, “Hints to the UA that the user is not expected to need the video, or that minimizing unnecessary traffic is desirable.”
  • preload='metadata' - “Hints to the UA that the user is not expected to need the video, but that fetching its metadata (dimensions, first frame, track list, duration, and so on) is desirable.”
  • preload='auto' -“Hints to the UA that optimistically downloading the entire video is considered desirable.”
  • preload or preload='' - The preload attribute is specified but no value is given. Specifying the empty string is the same as specifying “auto”.

With regard to the mediaelement player, it's going to depend on whether you are using the default or fallback player. However, in order to preload some amount of your video with the default player, you don't want the value set to 'none'.

like image 110
rwc9u Avatar answered May 16 '23 04:05

rwc9u