Consider to reorder 'source' tags that based on browser support and compression benefits #273
Replies: 4 comments 1 reply
-
Thanks for the question @AwebsomeFr So the way it is described in the docs is correct - say a browser supports mp4 but not webm - it will skip over the webm file and carry on to mp4, using that file. If you believe this shouldn't be the case, the place to raise an issue would be against the spec itself (ie not MDN) :) |
Beta Was this translation helpful? Give feedback.
-
Just to check my understanding: you are saying that:
...so our examples should list the "better" option first. So in a case like https://developer.mozilla.org/en-US/docs/Web/Guide/Audio_and_video_delivery#html_video, if webm is preferable to than mp4, then we should have a different order given in the example? If so that sounds convincing to me. We could make this guidance explicit in places like https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#usage_notes. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply @AwebsomeFr - I believe then yes the first example you provided should have webm & mp4 swapped - if I've understood correctly :) |
Beta Was this translation helpful? Give feedback.
-
@wbamberg Exactly. WebM (video) & OGG (audio) = lower support, but better compression. So, these examples should give a try to the least supported format first (WebM before MP4, OGG before MP3):
|
Beta Was this translation helpful? Give feedback.
-
Hi,
In some page talking about
source
element, like:It is explained that the browser will choose the first format he knows.
But in all examples, the
source
tag is used by starting from most well supported format to the least one:Why do not consider to reorder that based on browser support and compression benefits?
That would seem more logical.
Beta Was this translation helpful? Give feedback.
All reactions