Bug 121303
Summary: | First <source> element is unconditionally selected if it has no type attribute | ||
---|---|---|---|
Product: | WebKit | Reporter: | Philippe Normand <pnormand> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | eric.carlson, ian |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Philippe Normand
Consider the following:
<audio controls autoplay>
<source src="demo-audio.ogg" />
<source src="demo-audio.mp3" />
</audio>
For this audio element the media element will instruct the player to use the first source, even if the player doesn't support ogg vorbis. This is because the source has no type attribute so HTMLMediaElement::selectNextSourceChild will not call MediaPlayer::supportsType() for the source and assume that it's supported.
Why not try to guess the mime type if it's not explicitly specified in the tag? That would allow us to call supportsType(). We could use mimeTypeFromURL(mediaURL) in that case.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Philippe Normand
Hi Ian,
Eric and I have been talking about this issue. We're not sure what "then the load failed" in step 9 of the <source> loading substeps means exactly. Should the loading process stop or continue at step 10 "failed with elements" ?