Closed Bug 1578609 Opened 5 years ago Closed 5 years ago

Media element didn't start loading from its source element child with type=""

Categories

(Core :: Audio/Video, defect, P2)

68 Branch
Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla71
Webcompat Priority ?
Tracking Status
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- fixed

People

(Reporter: karlcow, Assigned: alwu)

References

()

Details

Attachments

(2 files)

A test case
https://codepen.io/webcompat/pen/pozdjPG

this source code.

<video>
  <source src="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4">
</video>

<video>
  <source src="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4" type="">
</video>

On Firefox,

  1. if we do not specify anything, the video is displayed
  2. If we specify an empty type='', the video is not being displayed.

On Chrome the video is always displayed.

NI myself for further investigation.

Flags: needinfo?(alwu)
Priority: -- → P2
Assignee: nobody → alwu
Flags: needinfo?(alwu)
Summary: empty type='' breaks the video element. → Media element didn't start loading from its source element child with type=""

If source element's type is empty, it's equal to not having any type, so we won't have to check can play type.

Empty type is an invalid mime type, but the spec leaves some room for how we should interpret those in this case: https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource:attr-source-type

With this change I would say we're interpreting the spec to say "if the type parses and a mime type, and the UA definitely doesn't support it, then fail, otherwise continue". In this case the empty MimeType is not certain to be unsupported, so we try our best, which seems reasonable.

Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6d54bc134d27
part1 : only check source element's type attribute when it's not empty. r=bryce
https://hg.mozilla.org/integration/autoland/rev/5a7c394c6f0f
part2 : add test 'test_load_source_empty_type.html'. r=bryce
Regressions: 1580372
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Flags: in-testsuite+

Is this something you would like to uplift to 70? Are there examples out there of people reporting this issue? We can also leave it to ride the trains with 71.

Flags: needinfo?(alwu)

I didn't see any other reporting similar issue like this, and it's also not a common issue. So we can probably let it stay on 71.

Flags: needinfo?(alwu)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: