Open Bug 863485 Opened 11 years ago Updated 2 years ago

[webvtt] <track> does not parse data: URIs


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






(Reporter: rillian, Unassigned)


(Blocks 1 open bug, )


(Keywords: dev-doc-needed)

Investigating the opera webvtt test suite I ran to an issue where we don't appear to handle data URI's for track.src. The test has code like:

  var t = document.createElement('track');
  t.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00.000 --> 00:01.000\nfoo');

We don't display anything with a source like this.

Test example:

Original Opera test: although it's outdated in ways that don't agree with the current spec.
This isn't important until after we have more basic features working, but I wanted to get it tracked.
Tested with integration branch commit de894e21b1ae69c07648e917f3ccd5052a84e73b and media.webvtt.enabled=true in about:config.
FWIW, Chrome Canary 28 reports a CORS violation on the data uri.
heh that's weird, how do you get a CORS violation from local data @_@
heh that's weird, how do you get a CORS violation from local data @_@ like is that a desirable behaviour?

I mean, should we consider that to be a CORS violation in mozilla? (I don't know how we currently behave in this situation)
Closed: 11 years ago
Resolution: --- → WONTFIX
Resolution: WONTFIX → ---
Thanks for reopening this dbaron, there are real world examples like that don't allow text/vtt files to be uploaded where this would be useful.
I've created jsfiddle:

with sample which is addressing this issue. 

In Firefox 36.0.4 data URIs for <track> elements already seems to work fine, and it's the only browser right now with proper data URIs handling within <track> elements.

Chromium and WebKit based browsers report CORS errors. Internet Explorer 11 doesn't report any errors, but the subtitles embedded with data URI won't work.

I've tracked issues for:
- Chromium:
- WebKit:
- Internet Explorer:
Component: Audio/Video → Audio/Video: Playback
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.