Open Bug 778617 (MSE) Opened 12 years ago Updated 21 days ago

[meta] Tracking bug for Media Source Extensions API implementation

Categories

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

defect

Tracking

()

tracking-b2g +
Tracking Status
relnote-firefox --- 36+

People

(Reporter: kinetik, Unassigned)

References

(Depends on 36 open bugs, )

Details

(4 keywords, Whiteboard: [shumway] [dependency: marketplace-partners])

Attachments

(2 obsolete files)

This proposal extends HTMLMediaElement to allow JavaScript to generate media streams for playback. Allowing JavaScript to generate streams facilitates a variety of use cases like adaptive streaming and time shifting live streams.
Attached patch WebIDL/DOM stubs - patch v0 (obsolete) — Splinter Review
I plan to work on this in the near future, but I've got a couple of things to finish first.  In the mean time, I stubbed out the DOM side of this to give myself an excuse to play with the new WebIDL bindings.
Attachment #647050 - Attachment description: patch v0 → WebIDL/DOM stubs - patch v0
is there a bug filed for handling mediaStream decoding/decryption?
(In reply to David Dahl :ddahl from comment #2)
> is there a bug filed for handling mediaStream decoding/decryption?

You mean like the webm encryption stuff? Not that I'm aware of. Of course, the MediaSource API makes it possible to implement many scrambling and encryption methods in javascript.
And if you're referring to the Encrypted Media Extensions (http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html), there's no bug that I'm aware of, and I don't think there is a plan to implement it at this stage.
Any progress? Is there any estimation on when this API will be implemented?
Depends on: 792675
Attachment #647050 - Attachment is obsolete: true
(In reply to Matthew Gregan [:kinetik] from comment #1)
> I plan to work on this in the near future

Matthew - are you still planning to work on this? If not, can this be reassigned? With WebRTC support around the corner, I think the MediaSource API will allow the creation of some pretty amazing applications.

Please let me know the current status of this bug. Thanks!
Yes, I picked it up again recently.  There are a first set of patches coming shortly.
Excellent!
Anything new? when should we expect first patch?
Hey Matthew, what's the latest on the Media Source Extensions API implementation? You mentioned that a first set of patches would be out around 1 month ago. Any progress?
Depends on: 855130
Alias: mediasource
Whiteboard: [shumway]
List things that we may need to do after Bug 855130 landing.

1. Relation between MediaSource & SourceBuffer should be 1-to-N
2. MediaSource::addSourceBuffer: param(type) MIME type checking.
3. Depend on Bug 744896: to enable/ disable audio track/ to select a video.
4. HTMLMediaElement behavior change 
https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#htmlmediaelement-extensions
Depends on: 744896
Items 2 and 4 are partially done in the latest patch attached to bug 855130.  I'll file bugs for the others (and a number of other things) that block this bug over the next day or so.
Depends on: 881512
Depends on: 881514
Depends on: 886194
Depends on: 886196
Depends on: 889201
Depends on: 889202
Depends on: 889205
Depends on: 889712
Depends on: 895754
Depends on: 896866
Depends on: 907468
Depends on: 833023
Hi, 

How is this going? Are you working on it or waiting for some of the dependencies to clear? Can you give a hint of when it will be milestone?

Thank you

Dennis
It's being worked on, most of the action is in the dependent bugs.  The proposed schedule is here: https://wiki.mozilla.org/Platform/MediaSourceExtensions
Blocks: 932516
No longer blocks: 932516
Depends on: 932516
Depends on: 939612
Depends on: 939613
Blocks: m3u8video
Depends on: 943186
This API is needed if you want to see youtube video on 1080p:
http://googlesystem.blogspot.fr/2013/10/youtube-drops-support-for-1080p-streams.html

" YouTube removed the non-DASH streams for 480p and 1080p. This means that you'll no longer be able to watch 1080p videos in YouTube's HTML5 player if you use Firefox or Safari. "
Depends on: 950120
Blocks: 962353
Blocks: 974362
Depends on: 976037
Whiteboard: [shumway] → [shumway:m2]
Blocks: 979096
No longer blocks: 962353
Depends on: 962353
No longer blocks: 974362
Depends on: 974362
No longer blocks: 979096
Depends on: 979096
Depends on: 979099
Depends on: 979100
Whiteboard: [shumway:m2] → [shumway]
Depends on: 989888
The proposed schedule is from the last year. Is the schedule still actual or not? What is the timeline when Firefox would be able to play videos using DASH reference implementation at dashif.org?
(In reply to anvar.sosnitski from comment #17)
> The proposed schedule is from the last year. Is the schedule still actual or
> not? What is the timeline when Firefox would be able to play videos using
> DASH reference implementation at dashif.org?

Some DASH implementations are working in nightly builds - those that use WebM/VP9. See for example:

http://cd.pn/mse/webm/dash-player.html

Support for YouTube's DASH player is ongoing. Nightly build plus bug 989888 allows playback of VP9 Dash streams on YouTube. More work on that is needed for seeking and stream switching however.

I have not yet investigated dashif.org support due to it requiring (AFAIK) H.264 support and we've had muxer issues to deal with in that regard. I would hop ewe can get on to testing and getting it working in the near future.
Depends on: 238041
Shipping Chrome supports the MSE API:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/RG1dEbQEu8E
As does IE 11:
http://msdn.microsoft.com/en-us/library/ie/dn594470%28v=vs.85%29.aspx
Whiteboard: [shumway] → [shumway] [blink-parity] [ie11-parity]
Depends on: 996368
Depends on: 77992
Depends on: 1000608
Depends on: 1000180
Depends on: 1000686
Depends on: 1002019
Depends on: 1002290
Depends on: 1002294
Depends on: 1002320
Depends on: 1002987
Depends on: 1002994
(In reply to cajbir (:cajbir) from comment #18)
> (In reply to anvar.sosnitski from comment #17)
> > The proposed schedule is from the last year. Is the schedule still actual or
> > not? What is the timeline when Firefox would be able to play videos using
> > DASH reference implementation at dashif.org?
> 
> Some DASH implementations are working in nightly builds - those that use
> WebM/VP9. See for example:
> 
> http://cd.pn/mse/webm/dash-player.html
> 
> Support for YouTube's DASH player is ongoing. Nightly build plus bug 989888
> allows playback of VP9 Dash streams on YouTube. More work on that is needed
> for seeking and stream switching however.
> 
> I have not yet investigated dashif.org support due to it requiring (AFAIK)
> H.264 support and we've had muxer issues to deal with in that regard. I
> would hop ewe can get on to testing and getting it working in the near
> future.

@cajbir - I help manage the dash.js project https://github.com/Dash-Industry-Forum/dash.js which is the reference client for the DASH Industry Forum and also the preferred MSE implementation for many members including Microsoft and Akamai. We have good implementations under Chrome and IE11 and would love to add Firefox to that mix, not just for our companies but for the MSE ecosystem in general. If there is anything we can do from our end to help accelerate testing and/or code changes for H.264 ISOBMFF support please don't hesitate to reach out. 

Cheers

Will Law
Depends on: 931388
Depends on: 975782
Depends on: 978613
Depends on: 1008542
Depends on: 1013032
Is there a first FF stable release where MSE can be used or is it still in Nightly?
Dash on youtube doesn't work even in Nightly 32. I think we have to wait for all issues on which this one depends until get it working in nightly. It is too early to talk about stable.
(In reply to Aymeric Vitte from comment #21)
> Is there a first FF stable release where MSE can be used or is it still in
> Nightly?

(In reply to Nazar Mokrynskyi from comment #22)
> Dash on youtube doesn't work even in Nightly 32. I think we have to wait for
> all issues on which this one depends until get it working in nightly. It is
> too early to talk about stable.

It works with VP9/WEBM video streams on youtube. But videos that have them are by far the minority. Also they have around half the bitrate and are more resource demanding to decode.
For whatever (irrational) reason h.264 - which is overwhelmingly the dominant format - is ignored until everything else is done.
(In reply to avada from comment #23)
> For whatever (irrational) reason h.264 - which is overwhelmingly the
> dominant format - is ignored until everything else is done.

This is an inappropriate comment. Please don't pass judgement (using words like irrational) on why things are done, assume good intent from the people doing the work. H.264 support relies on other work which is being done in parallel.
Do you have any idea when this could be available?
Depends on: 1022479
Depends on: 1024858
Depends on: 1025768
Depends on: 1025770
Depends on: 1028642
Depends on: 1028742
Depends on: 1028748
Depends on: 1028144
Depends on: 1030539
Depends on: 1030527
Depends on: 1035622
Afaik h264 in general meanwhile works. Does that mean support for dash/h264 as well (or maybe soon down the road)?
Yes, see bug 1027875.
Depends on: 1031532
Blocks: 1031121
As of today, Google has locked Nightly users out of being able to switch back an forth between HTML5 and Flash. 

HTML5 is now potentially the permanent default on YouTube for Fx33+. This should probably become a higher priority if not already YouTube's policy sticks.
Whiteboard: [shumway] [blink-parity] [ie11-parity] → [shumway] [blink-parity] [ie11-parity][dependency: marketplace-partners]
Depends on: 1041374
Depends on: 1041387
Depends on: 1041396
Depends on: 1041405
Depends on: 1041919
Depends on: 1044505
Depends on: 1044498
Depends on: 1044498
Depends on: 1044762
Depends on: 1043696
Blocks: 1049327
Blocks: 1049326
Blocks: 1049323
Blocks: 1049321
Blocks: 1049318
Blocks: 1049317
Blocks: 1050083
Blocks: 1050099
Depends on: 1050580
Depends on: 1050652
Blocks: 1053657
Blocks: 1053658
Blocks: 1053674
Blocks: 1053682
Depends on: 1040552
Depends on: 1054970
Sandip, how can we nominate this as a b2g 2.2 feature?
Flags: needinfo?(skamat)
Depends on: 1055899
Summary: Implement proposed Media Source Extensions API → Tracking bug for Media Source Extensions API implementation
No longer blocks: 1049317
Depends on: 1049317
No longer blocks: 1049318
Depends on: 1049318
No longer blocks: 1049321
Depends on: 1049321
No longer blocks: 1049323
Depends on: 1049323
No longer blocks: 1049326
Depends on: 1049326
No longer blocks: 1049327
Depends on: 1049327
No longer blocks: 1050083
Depends on: 1050083
No longer blocks: 1050099
Depends on: 1050099
No longer blocks: 1053658
Depends on: 1053658
No longer blocks: 1053674
Depends on: 1053674
No longer blocks: 1053682
Depends on: 1053682
No longer blocks: 1053657
Depends on: 1053657
No longer depends on: 238041
Depends on: 1056440
Depends on: 1056452
Depends on: 1056534
Depends on: 1057181
Depends on: 1058418
Depends on: 1058422
Assignee: kinetik → nobody
Status: ASSIGNED → NEW
Alias: mediasource → MSE
Depends on: 1059569
Depends on: 1059625
Depends on: 1061007
Depends on: 1054783
Now that there is support for H264 in FirefoxNightly when I'm trying to use H264 with MSE I'm getting a 'NotSupportedError: Operation is not supported' error when I'm calling var sourceBuffer = ms.addSourceBuffer('video/mp4;codecs="avc1.42c00d"');
Of course, have you ever look to this site (youtube.com/html5)?
MSE with H264 is not implemented enough today. Just stay tuned, when this bug are resolved, it should work:)
Depends on: 1062017
Depends on: 1062018
Depends on: 1062020
Depends on: 1062023
Depends on: 1062055
Depends on: 1062101
Depends on: 1062657
Depends on: 1062661
Depends on: 1062664
Depends on: 1062666
Depends on: 1062669
Depends on: 1062670
Depends on: 1022075
Blocks: shumway-1.0
No longer blocks: shumway-m4
feature-b2g: --- → 2.2?
Flags: needinfo?(skamat)
Depends on: 1063323
Depends on: 1063365
> feature-b2g: --- → 2.2?

We are currently reviewing the bug backlog for this feature, and the resulting schedule changes. Please don't set this flag until after that review. Thanks!
Depends on: 1064113
Depends on: 1064128
No longer depends on: 1064128
Depends on: 1064160
Depends on: 1064570
Depends on: 1064699
Depends on: 1064705
Depends on: 1065207
Depends on: 1065215
Depends on: 1065218
Depends on: 1065219
Depends on: 1065221
Depends on: 1065235
Depends on: 1065250
Depends on: 1065855
Depends on: 1068483
Depends on: 1069671
Depends on: 1074614
Depends on: 1075980
Depends on: 1066467
(In reply to info from comment #30)
> Now that there is support for H264 in FirefoxNightly when I'm trying to use
> H264 with MSE I'm getting a 'NotSupportedError: Operation is not supported'
> error when I'm calling var sourceBuffer =
> ms.addSourceBuffer('video/mp4;codecs="avc1.42c00d"');

I have the same error. 
Does Anyone know how to fix it?
(In reply to John from comment #33)
> (In reply to info from comment #30)
> > Now that there is support for H264 in FirefoxNightly when I'm trying to use
> > H264 with MSE I'm getting a 'NotSupportedError: Operation is not supported'
> > error when I'm calling var sourceBuffer =
> > ms.addSourceBuffer('video/mp4;codecs="avc1.42c00d"');
> 
> I have the same error. 
> Does Anyone know how to fix it?

Oh, don't support yet, video/webm is OK.
(In reply to John from comment #33)
> (In reply to info from comment #30)
> > Now that there is support for H264 in FirefoxNightly when I'm trying to use
> > H264 with MSE I'm getting a 'NotSupportedError: Operation is not supported'
> > error when I'm calling var sourceBuffer =
> > ms.addSourceBuffer('video/mp4;codecs="avc1.42c00d"');
> 
> I have the same error. 
> Does Anyone know how to fix it?

set media.mediasource.ignore_codecs to true
Depends on: 1081766
Depends on: 1081817
Blocks: 1083089
Depends on: 1086525
Depends on: 1087165
Depends on: ship-MSE
Depends on: 1091774
Depends on: 1092025
Depends on: 1092915
Depends on: 1092932
Depends on: 1093020
Depends on: 1094310
Depends on: 1094271
Depends on: 1094501
Depends on: 1096089
Depends on: 1095778
Depends on: 1096752
Depends on: 1096790
Depends on: 1097252
Depends on: 1097441
Depends on: 1098022
Depends on: 1098674
Depends on: 1098678
Depends on: 1098680
Depends on: 1098990
Depends on: 1098637
Depends on: 1100176
Depends on: 1097723
Depends on: 1101062
Depends on: 1101247
Depends on: 1100913
No longer depends on: 1096717
Depends on: 1102666
Depends on: 1104410
Depends on: 1104426
No longer depends on: 1104410
Depends on: 1105066
Depends on: 1102647
Depends on: 1105132
Depends on: 1105553
No longer depends on: 1105514
Depends on: 1100063
Depends on: 1105771
Depends on: 1107611
Depends on: 1107737
Depends on: 1108059
Depends on: 1108846
Depends on: 1108917
Depends on: 1109431
Depends on: 1109437
Depends on: 1109987
Depends on: 1103357
Depends on: 1096755
Depends on: 1110534
Depends on: 1111311
Depends on: 1111328
Depends on: 1111413
Release Note Request (optional, but appreciated)
[Why is this notable]: A new area for videos
[Suggested wording]: Media Source Extensions API implemented
[Links (documentation, blog post, etc)]: Any link?

AFAIK, this will ship with 36.
relnote-firefox: --- → ?
Depends on: 1111966
Depends on: 1112424
Depends on: 1112444
Depends on: 1112445
Depends on: 1112446
Depends on: 1107889
It doesn't have to be in 2.2. But, need to continue working on it. 
Bobby, please follow up this topic.
feature-b2g: 2.2? → ---
Flags: needinfo?(bchien)
(In reply to Ralph Giles (:rillian) from comment #39)
> Specification is https://w3c.github.io/media-source/
Thanks but I was hoping for something more general and less technical.
Depends on: 896884
Depends on: 1095549
Depends on: 1091407
Depends on: 1037305
continue work and mark as tracking-b2g:+ for future release.
tracking-b2g: --- → +
Flags: needinfo?(bchien)
Priority: -- → P1
Depends on: 1113776
Depends on: 1091325
Depends on: 1113924
Depends on: 1114802
Depends on: 1114840
Depends on: 1114849
Depends on: 1114847
Depends on: 1114844
Depends on: 1114885
Blocks: MSE-FxOS
Depends on: 1108086
Depends on: 1115096
Depends on: 1115190
Depends on: 1115835
(In reply to Sylvestre Ledru [:sylvestre] from comment #38)
> Release Note Request (optional, but appreciated)
> [Why is this notable]: A new area for videos
> [Suggested wording]: Media Source Extensions API implemented
> [Links (documentation, blog post, etc)]: Any link?
> 
> AFAIK, this will ship with 36.

See bug 1112761.  API use in 36 will be limited.
Depends on: 1116043
Depends on: 1116056
Depends on: 1116284
Depends on: 1116353
Depends on: 1116382
Depends on: 1116384
Depends on: 1116626
Depends on: 1062993
Depends on: 1082974
Depends on: 1109292
Depends on: 1117881
Depends on: 1117903
Depends on: 1117991
Depends on: 1118123
Depends on: 1118126
Depends on: 1108847
Depends on: 1118370
Depends on: 1118528
Depends on: 1118533
Depends on: 1118589
Depends on: 1116507
Depends on: 1119033
Depends on: 1119119
Depends on: 1119208
Depends on: 1089048
Depends on: 1119456
Depends on: 1119463
Depends on: 1119535
Depends on: 1119691
Depends on: 1119757
Depends on: 1120079
Depends on: 1120084
Depends on: 1120086
Depends on: 1120128
Depends on: 1120266
Depends on: 1120282
Depends on: 1120453
Depends on: 1120701
Depends on: 1121288
Depends on: 1121342
Added to the release notes with "Media Source Extensions API implemented (Youtube only)" as wording.
Let me know if someone has an issue with this.
Update to "Implemented a subset of the Media Source Extensions (MSE) API to allow native HTML5 playback on YouTube. Full support is on the way". Thanks to Bobby for the new version!
Depends on: 1121661
Depends on: 1121135
Depends on: 1121668
Depends on: 1121747
Depends on: 1121750
Depends on: 1121757
Depends on: 1122149
Depends on: 1122250
Depends on: 1122358
Depends on: 1122803
Depends on: 1122802
Depends on: 1122873
Depends on: 1123198
Depends on: 1123202
Depends on: 1123203
Depends on: 1123492
Depends on: 1123507
Depends on: 1123923
No longer depends on: 1121747
Depends on: 1124316
Depends on: 1124487
Depends on: 1124952
Depends on: 1102642
Depends on: 1125469
Depends on: 1125581
Depends on: 1125776
Depends on: 1125911
Depends on: 1125915
Depends on: 1125917
Depends on: 1125993
No longer depends on: 1125993
Depends on: 1126052
Depends on: 1126332
Depends on: 1126465
Blocks: 1124024
Depends on: 1127111
Depends on: 1127203
Depends on: 1127173
Depends on: 1127122
Depends on: 1092611
Depends on: 1127448
Depends on: 1127554
Depends on: 1127775
Depends on: 1127920
Depends on: 1128069
Depends on: 1125621
Depends on: 1128115
Depends on: 1128171
Depends on: 1128179
Depends on: 1128013
Depends on: 1128295
Depends on: 1128332
Depends on: 1128410
Depends on: 1114976
Depends on: 1128409
Depends on: 1081911
Depends on: 1128649
Depends on: 1128170
Depends on: 1128742
Depends on: 1129039
Depends on: 1129224
Depends on: 1129455
Depends on: 1128522
Depends on: 1129732
Depends on: 1129877
Depends on: 1130053
Depends on: 1130237
Depends on: 1130239
Depends on: 1130253
Depends on: 1130826
Depends on: 1130839
Depends on: 1126359
Depends on: 1130948
I already took a look in your brand-new MSE implementation using our MPEG-DASH player bitdash - and was happy to see it playing! Streaming different videos and playing around with our API worked fine.

We have several test streams online, which might also be interesting for your work, located at: http://www.dash-player.com/demo/streaming-server-and-encoder-support/ (tested with Chrome, IE11 and Safari 8). You can select different videos from different vendors. Most of them are working great, some, like 'Sintel' (first two entries in the list) are stalling the video after a few seconds, whereas audio is still playing. As there are no error messages showing up, I can only guess, but I think the problem is introduced by representation changes (quality adaptation). If I disable the automatic quality switching (select a dedicated representation) everything works fine. Changing the representation manually stalls the video again.

We have also a 24/7 live stream available for testing (http://www.dash-player.com/demo/live-streaming/). I experience the same behaviour - playback of a few seconds, then video stops, whereas audio is still playing.

However, we are optimistic that everything will be fixed till the official release and we are happy to help, if needed.
Just for info, we also have DRM showcases available, for ClearKey (http://www.dash-player.com/demo/drm-and-protection/), PlayReady (http://www.dash-player.com/demo/playready-demo/) and Widevine Modular (http://www.dash-player.com/demo/widevine-modular/).
(In reply to Reinhard from comment #46)
> I already took a look in your brand-new MSE implementation using our
> MPEG-DASH player bitdash - and was happy to see it playing! Streaming
> different videos and playing around with our API worked fine.
> 
> We have several test streams online, which might also be interesting for
> your work, located at:
> http://www.dash-player.com/demo/streaming-server-and-encoder-support/
> (tested with Chrome, IE11 and Safari 8). You can select different videos
> from different vendors. Most of them are working great, some, like 'Sintel'
> (first two entries in the list) are stalling the video after a few seconds,
> whereas audio is still playing. As there are no error messages showing up, I
> can only guess, but I think the problem is introduced by representation
> changes (quality adaptation). If I disable the automatic quality switching
> (select a dedicated representation) everything works fine. Changing the
> representation manually stalls the video again.

the fragmented MP4 aren't per spec. They have start time of -0.021333. Specs require that they start at 0. We massage invalid files that are close to 0 but not 0, but only if start time is positive.
about:media shows that we have video data from [28,30] and then only from [564,660] ; it stalls at 30s like it should.

Can you please open a bug for the video that doesn't play?
Depends on: 1131392
Depends on: 1131433
Depends on: 1131482
Blocks: 1131487
Depends on: 1131638
Depends on: 1131832
Depends on: 1131919
No longer blocks: 1131487
Depends on: 1131487
Depends on: 1131952
No longer depends on: 1131487
No longer depends on: 1126332
Depends on: 1132342
Depends on: 1132594
Depends on: 1132757
Depends on: 1132796
Depends on: 1132034
Depends on: 1132825
Depends on: 1132851
Depends on: 1133167
No longer depends on: 1133167
Depends on: 1133478
Depends on: 1133625
Depends on: 1133633
Depends on: 1133862
Depends on: 1134064
Depends on: 1134101
Depends on: 1134398
Depends on: 1134888
Depends on: 1135304
No longer depends on: 1135304
Depends on: 1135424
Depends on: 1135227
No longer depends on: 1135424
Depends on: 1135562
Depends on: 1135566
Depends on: 1136138
Depends on: 1136576
Depends on: 1136706
Depends on: 1135295
Depends on: 1133305
Thank you for your effort about our reported issues (Bug 1131487). We tried with other videos, for instance 1080p60 (http://www.dash-player.com/demo/hfr/) - which worked fine. We also tested 4k sequences, like http://www.dash-player.com/demo/4k/.

The playback works fine, until the switch to the first 4k representation (3840x1608) - the video stalls. In the following you can find the HTMLMediaElement debug data:

http://www.dash-player.com/demo/4k/
	mediasource:http://www.dash-player.com/4885f9ac-c61f-6749-91db-3c585a945fe9
	currentTime: 34.446812
		SourceBuffer 0
			start=18.75 end=34.5
			start=63.041666 end=68.041666
			start=68.083333 end=115.666666
			start=115.708333 end=144.75
		SourceBuffer 1
			start=0 end=79.552
	Internal Data:
	Dumping data for reader 125f9ec00:
		Dumping Audio Track Decoders: - mLastAudioTime: 35.498666
			Reader 0: 126566800 ranges=[(0.000000, 79.552000)] active=true size=1637674
		Dumping Video Track Decoders - mLastVideoTime: 34.500000
			Reader 7: 125f97000 ranges=[(119.833333, 144.750000)] active=false size=3508275
			Reader 6: 125ea9000 ranges=[(115.708333, 119.833333)] active=false size=1307443
			Reader 5: 125ea9400 ranges=[(110.708333, 115.666666)] active=false size=1464886
			Reader 4: 124935400 ranges=[(79.625000, 110.750000)] active=false size=11376191
			Reader 3: 11fe0e000 ranges=[(72.500000, 79.625000)] active=false size=1651288
			Reader 2: 1185d7400 ranges=[(68.083333, 72.500000)] active=false size=14582884
			Reader 1: 118905c00 ranges=[(63.041666, 68.041666)] active=false size=8046674
			Reader 0: 12afce000 ranges=[(18.750000, 34.500000)] active=true size=9218236
	
As it can be seen, the video buffer ends at about 34 seconds (thats also where the playback stops) and there is a gap till about 63 seconds. Should we open a new bug for this or append it to Bug 1131487?

We changed our handling of init and media segments, as a switch from a lower representation to 4k results in a stall on Chrome. Therefore now the init segment of the highest representation is pushed to the MSE first.

The (4k/8k, 1080p60) fmp4 content for the MSE was generated by bitcodin (portal.bitcodin.com). If you want you can also use it to generate test content - please note that it is currently in beta status. We are happy to increase your credits if you need more for stabilising the MSE ;-)
Please open a new bug. This bug is a container to track the progress of MSE ; it's not to report MSE bug per-say.
thanks.. we can take it from there.

At a guess, you either haven't appended data from 34s onward, or the data got evicted during appendBuffer and as you don't appear to check that and never resubmit as required: it stalls.
Flags: needinfo?(reinhard.grandl)
Ok, the bug is reported with number 1137118 (https://bugzilla.mozilla.org/show_bug.cgi?id=1137118).
Flags: needinfo?(reinhard.grandl)
Depends on: 1137118
Depends on: 1137511
Depends on: 1137574
Depends on: 1137576
Depends on: 1138260
Depends on: 1138137
No longer depends on: 1138140
Depends on: 1138786
Depends on: 1138790
Depends on: 1124287
Depends on: 1138967
Depends on: 1138992
Hi all,

I think it's kind of unfair to have a flag youtubeonly for a firefox for a feature. 

If it's good enough for youtube to play with and take responsibility to take care of it in a way that will be good for their end users then it's also should be available for other websites.

What's next - facebookonly flag and yahooonly flag? 

If the implementation is not complete then I can understand that it is under a flag, but it cannot be available only for a specific domain and for all the others it will be restricted... if it is good enough for youtube to work with , it's also good enough for others.
hi Guy, the "youtubeonly" flag is temporary while we are testing MSE. Bug 1108086 is an example of an MSE site (Steam.com's Live Broadcasts) that Firefox doesn't support yet and would break without the temporary "youtubeonly" flag.
Well, If a website is doing something that is not yet fully supported then it will have to not do it.

But if a different website simply wants to implement the exact same solution that youtube implemented using firefox mse - it is not fail / ok to enable it only to youtube or any other specific domain. Why should youtube be able to test/deploy their but I can't?
Hi guy,
It is probably better to discuss or clarify policy in one of the fora such as https://www.mozilla.org/en-US/about/forums/#firefox-dev

Does bug 1112761 comment 3 & bug1112761 comment 7 help, if you wish to experiment.
> media.mediasource.enabled: false means no, true means check the other pref.
> media.mediasource.youtubeonly: 
>   false or unset means enabled everywhere, set to true means only https://*.youtube.com.
John,

To have a media.mediasource.enabled I totally understand and agree it should be there.
If mediasource is not ready for stable then this pref should be false.

But to allow only youtube to test it large scale on their platform/domain without giving the opportunity for other websites is just wrong.

Thanks for the tip , i'll try to discuss in the forums.
Disabling the YouTube restriction is just a matter of setting media.mediasource.youtubeonly property to false.
I understand that, But I can't do it for my users right...
(In reply to guy paskar from comment #61)
> I understand that, But I can't do it for my users right...

Just as an example , this is not my website and I don't have anything to do with it but bitdash has made a great html5 dash player which works great in ff  - http://www.bitmovin.net/bitdash-mpeg-dash-player/

Why can youtube use media source in ff in their production environment but bitdash (or me using their player) can't?
It's just a safety measure until the MSE implementation is more stabilized. IIUC the plan is to have MSE on by default for all websites in Firefox 38 (though the Youtube support got pushed back from 36 to 37, so perhaps the timeline changed a bit).
Ah, from bug 1138992 comment #3, it will probably be Firefox 39 or 40, but no decision has been made yet.
(In reply to Emanuel Hoogeveen [:ehoogeveen] from comment #63)
> It's just a safety measure until the MSE implementation is more stabilized.
> IIUC the plan is to have MSE on by default for all websites in Firefox 38
> (though the Youtube support got pushed back from 36 to 37, so perhaps the
> timeline changed a bit).

Just saying, if it's good enough for youtube domain - its good enough for other domains that can be responsible for the safety of their products.
Depends on: 1139522
Depends on: 1139748
Depends on: 1140688
Depends on: 1140690
Depends on: 1140729
Depends on: 1140949
Depends on: 1141333
Depends on: 1141241
Depends on: 1141349
Depends on: 1139503
Depends on: 1141914
Depends on: 1142433
Depends on: 1142914
Depends on: 1143514
Depends on: 1143586
Depends on: 1143650
Depends on: 1143971
Depends on: 1144509
Depends on: 1144617
Depends on: 1145038
Depends on: 1145382
Depends on: 1145513
Depends on: 1145517
Depends on: 1145642
Depends on: 1145815
Depends on: 1146685
Depends on: 1148103
No longer depends on: 1148171
Depends on: 1144401
Depends on: 1105760
Depends on: 1149343
Depends on: 1150305
Depends on: BLACK-YT
YouTube has disabled MSE playback for Fx37 and 38b. So much for "YouTube only".
(In reply to Leman Bennett [Omega] from comment #66)
Youtube seems to have disabled HTML5 playback by default now. 
I'm forced to manually enable it on nightly and release channel now now. (Youtube.com/html5)
Depends on: 1151375
Depends on: 1151638
Depends on: 1151713
Depends on: 1151721
Depends on: 1152056
Depends on: 1152312
Depends on: 1144199
Depends on: 1152574
Depends on: 1152587
Depends on: 1152630
Depends on: 1153110
Depends on: 1153469
Depends on: 1153685
Depends on: 1154162
Depends on: 1142992
Depends on: 1154536
Depends on: 1155608
Depends on: 1157203
Depends on: 1157087
Depends on: 1158089
Depends on: 1146313
Depends on: 1160321
Depends on: 1160424
Depends on: 1161349
Depends on: 1163300
Depends on: 1163454
Depends on: 1163485
Depends on: 1163486
Depends on: 1084456
Depends on: 1165145
Depends on: 1105293
Depends on: 1165772
Depends on: 1165775
Can someone provide an update of where general MSE API support stands in FF 38 and plans for 39/40? Things got a bit confusing with youtubeonly, etc.
Depends on: 1169102
Depends on: 1169212
Depends on: 1169559
+1 for johneluther's request. We desperately need this for adaptive streaming with HTML5 video in the browser, but I'm not quite sure what the status is and enabling the flag didn't work for any MSE-dependent player lib we tested.
Depends on: 1171311
Depends on: 1171314
Depends on: 1171760
Depends on: 1171778
I'm using Linux Fedora 21 and Firefox 38.0.5
I have issues with MSE+VP9
the youtube video doesn't start playing but it buffers in the background

further information:
https://bugzilla.mozilla.org/show_bug.cgi?id=1173179
Depends on: 1175633
Depends on: 1177147
Depends on: 1178063
Depends on: 1179497
Any news relating to johneluther's and Sebastian Kippe's requests ? As far as I can see, MSE is not enabled by default on FF41 dev edition. Any update on the target release ?
Flags: needinfo?(kinetik)
More a question for jya or kft.
Flags: needinfo?(kinetik) → needinfo?(jyavenard)
(In reply to Sebastian Kippe from comment #69)
> +1 for johneluther's request. We desperately need this for adaptive
> streaming with HTML5 video in the browser, but I'm not quite sure what the
> status is and enabling the flag didn't work for any MSE-dependent player lib
> we tested.

Firefox has a whitelist limiting MSE (to YouTube, Netflix, and Dailymotion) while we fix some compatibility bugs. The whitelist will likely be removed in Firefox 42, making MSE available to all websites. The whitelist is disabled in the Firefox Nightly and Aurora channels. If you find any MSE players that don't work in Firefox Nightly or Aurora, please file a bug! :)


(In reply to Djfe from comment #70)
> I'm using Linux Fedora 21 and Firefox 38.0.5
> I have issues with MSE+VP9
> the youtube video doesn't start playing but it buffers in the background
> 
> further information:
> https://bugzilla.mozilla.org/show_bug.cgi?id=1173179

Firefox does not yet support MSE for VP9, but we're working on it.
Depends on: 1182418
Depends on: 1183196
Depends on: 1183977
Flags: needinfo?(jyavenard)
Depends on: 1185179
Depends on: 1185621
Depends on: 1185625
Depends on: 1185814
Depends on: 1185827
Depends on: 1185828
Depends on: 1186136
Depends on: 1186149
Depends on: 1186162
Depends on: 1185886
Depends on: 1187080
Depends on: 1187136
Depends on: 1187143
Depends on: 1188210
Depends on: 1188220
Depends on: 1188238
Depends on: 1188518
No longer depends on: 1188518
Depends on: 1188676
Depends on: 1188758
Depends on: 1188804
Depends on: 1189589
Depends on: 1189776
Depends on: 1189899
Depends on: 1189987
Depends on: 1190530
Depends on: 1191202
Depends on: 1191366
Depends on: 1191712
Depends on: 1192097
Depends on: 1194015
Depends on: 1194188
Depends on: 1194197
Depends on: 1194607
Depends on: 1194624
Depends on: 1194708
Depends on: 1195073
Depends on: 1197083
Depends on: 1197086
Depends on: 1197103
Depends on: 1197438
(In reply to Chris Peterson [:cpeterson] from comment #73)
> (In reply to Sebastian Kippe from comment #69)
> > +1 for johneluther's request. We desperately need this for adaptive
> > streaming with HTML5 video in the browser, but I'm not quite sure what the
> > status is and enabling the flag didn't work for any MSE-dependent player lib
> > we tested.
> 
> Firefox has a whitelist limiting MSE (to YouTube, Netflix, and Dailymotion)
> while we fix some compatibility bugs. The whitelist will likely be removed
> in Firefox 42, making MSE available to all websites. The whitelist is
> disabled in the Firefox Nightly and Aurora channels. If you find any MSE
> players that don't work in Firefox Nightly or Aurora, please file a bug! :)
> 
> 
> (In reply to Djfe from comment #70)
> > I'm using Linux Fedora 21 and Firefox 38.0.5
> > I have issues with MSE+VP9
> > the youtube video doesn't start playing but it buffers in the background
> > 
> > further information:
> > https://bugzilla.mozilla.org/show_bug.cgi?id=1173179
> 
> Firefox does not yet support MSE for VP9, but we're working on it.

Hello Chris,

Can you help to point where is the source code that whitelisted Youtube, Netflix, and Dailymotion?

Thanks,

Tony
There is no whitelist anymore ; we won't be adding new sites to the whitelist
Depends on: 1199878
Depends on: 1199879
Depends on: 1199904
Depends on: 1199911
Depends on: 1200834
Depends on: 1202578
Depends on: 1202580
Depends on: 1202585
Depends on: 1202590
No longer depends on: 1160424
Depends on: 1205470
Depends on: 1205179
Depends on: 1205911
Depends on: 1206567
Component: Audio/Video → Audio/Video: Playback
Depends on: 1206845
Is the plan still to remove the whitelist in Firefox 42?
Depends on: 1207478
the whitelist has already been removed in 42
Depends on: 1207946
No longer depends on: 1131952
Depends on: 1208035
Depends on: 1208038
Depends on: 1208054
Depends on: 1208917
Depends on: 1209386
Depends on: 1209834
Depends on: 1209850
Depends on: 1210726
Depends on: 1211328
Depends on: 1211652
Does it apply to Linux too? Youtube doesn't play good in Linux, and Netflix doesn't work.
I'm talking about the 41 stable version in Linux 64 bits.
No longer depends on: 1095549
No longer depends on: 1077519
No longer depends on: 1129455
No longer depends on: 1131832
No longer depends on: 1132594
No longer depends on: 1133382
No longer depends on: 1135562
No longer depends on: 1139108
No longer depends on: 1140949
No longer depends on: 1146313
No longer depends on: 1147748
No longer depends on: 1149369
No longer depends on: 1149814
No longer depends on: 1152056
No longer depends on: 1154162
No longer depends on: 1156567
No longer depends on: 1161349
No longer depends on: 1163300
No longer depends on: 1178063
No longer depends on: 1183132
No longer depends on: 1191222
No longer depends on: 1192016
No longer depends on: 1193610
No longer depends on: 1193614
No longer depends on: 1206845
No longer depends on: 1210726
Depends on: 1213498
No longer depends on: 1213498
Depends on: 1214943
Depends on: 1215370
Depends on: 1221016
Depends on: 1220033
Depends on: 1221954
Depends on: 1227017
Depends on: 1229339
Depends on: 1229631
Depends on: 1229657
Depends on: 1229936
Depends on: 1229987
Depends on: 1230527
Depends on: 1232252
Marking this MSE tracking bug as meta so it doesn't show up in our list of actionable P1 bugs.
Keywords: meta
Depends on: 1240201
Depends on: 1246521
Depends on: 1247138
Depends on: 1247189
Depends on: 1247849
Hi,

running the following snippet over the page I get lots of blocking bugs, that are invalid/wontfix/wfm and so on including 37 bugs, that are duplicates of others:

jQuery(function($) {
	var i = 1;
	$('#dependson_input_area').nextAll('a.bz_bug_link').each(function() {
		if ($(this).attr('title').match(/^RESOLVED(?! FIXED)/))
			console.log(i++ + ") " + $(this).text() + ": " + $(this).attr('title'));
	});
});

Shouldn't these be removed from blocking this bug here and the duplicates changed to the correct number?
why that ?

they were blocking, and now are fixed.
This is a tracking bug.
There are very few blockers left now.

I personally prefer to keep the old blockers in, gives a good idea on the progress as well as allow to search for regression
Depends on: 1258410
Depends on: 1258562
Depends on: 1259274
Depends on: 1260319
No longer depends on: 1260319
Depends on: 1261273
Depends on: 1262396
Depends on: 1264622
Depends on: 1266938
Depends on: 1269177
Depends on: 1269178
Depends on: 1269249
Depends on: 1269325
Depends on: 1270699
Depends on: 1272759
No longer depends on: 1272759
Depends on: 1272916
Depends on: 1272959
No longer depends on: 1272959
Depends on: 1272964
Depends on: 1274190
Depends on: 1274933
Depends on: 1270323
Depends on: 1276184
Depends on: 1277508
Depends on: 1277729
Depends on: 1277733
Depends on: 1277737
No longer depends on: 1277737
Blocks: 1279885
No longer blocks: 1279885
Depends on: 1280023
Depends on: 1280613
Depends on: 1286115
Depends on: 1286722
Depends on: 1286723
Depends on: 1286796
Depends on: 1286810
Depends on: 1287021
Depends on: 1287244
Depends on: 1292157
Depends on: 1293159
Depends on: 1293576
Depends on: 1293613
Depends on: 1293646
Depends on: 1293843
Depends on: 1293927
Depends on: 1297036
Depends on: 1297037
Depends on: 1297580
Depends on: 1298606
Depends on: 1298617
Depends on: 1298594
Depends on: 1300296
Depends on: 1301307
Depends on: 1302465
Depends on: 1302573
Depends on: 1302632
Depends on: 1302656
Depends on: 1314533
Depends on: 1315211
Depends on: 1322587
Depends on: 1325491
Depends on: 1345799
Depends on: 1350056
Depends on: 1352050
Depends on: 1352333
Depends on: 1354090
Depends on: 1362165
Depends on: 1362440
Depends on: 1367333
No longer depends on: 1367333
Depends on: 1367993
Depends on: 1368092
Depends on: 1368952
Depends on: 1371999
Depends on: 1383122
Depends on: 1347518
Depends on: 1394234
Mass change P1->P2 to align with new Mozilla triage process
Priority: P1 → P2
Depends on: 1400598
Blocks: 1401147
Depends on: 1402226
Depends on: 1404241
Depends on: 1406118
Depends on: 1407243
Depends on: 1407261
Depends on: 1407940
Depends on: 1409272
Depends on: 1411523
No longer depends on: 1411523
Depends on: 1451149
Depends on: 1456743
Depends on: 1456744
Depends on: 1456745
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Whiteboard: [shumway] [blink-parity] [ie11-parity][dependency: marketplace-partners] → [shumway] [dependency: marketplace-partners]
Depends on: 1466606
Depends on: 1470814
Depends on: 1470944
Depends on: 1481166
Depends on: 1481397
Summary: Tracking bug for Media Source Extensions API implementation → [meta] Tracking bug for Media Source Extensions API implementation
Depends on: 1501585
Depends on: 1523886
Depends on: 1524500
Depends on: 1524890
Depends on: 1531201
Depends on: 1535493
Depends on: 1679283
Depends on: 1681801
Depends on: 1613672
Depends on: 1687355
Depends on: 1689222
Depends on: 1698881
Depends on: 1698978
Depends on: 1169485
Depends on: 1301409
Depends on: 1700425
Blocks: 1130973
Depends on: 1700479
Depends on: 1700493
Depends on: 1707846
Depends on: 1763651

Comment on attachment 647050 [details] [diff] [review]
WebIDL/DOM stubs - patch v0

HG changeset patch

User Matthew Gregan <kinetik@flim.org>

Date 1343619599 -43200

Node ID 877a5b12f3d525a8d93f73ea8c93d8bcbf190d38

Parent f528e021ceb1daff2d854d9c460e907d4397b0d4

Bug 778617 - Implementation of the media source extensions API.

diff --git a/content/media/Makefile.in b/content/media/Makefile.in
--- a/content/media/Makefile.in
+++ b/content/media/Makefile.in
@@ -87,6 +87,8 @@ endif

PARALLEL_DIRS += webrtc

+PARALLEL_DIRS += mediasource
+
TEST_DIRS += test

FORCE_STATIC_LIB = 1
diff --git a/content/media/mediasource/Makefile.in b/content/media/mediasource/Makefile.in
new file mode 100644
--- /dev/null
+++ b/content/media/mediasource/Makefile.in
@@ -0,0 +1,36 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+FAIL_ON_WARNINGS := 1
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE = content
+LIBRARY_NAME = gkconmediasource_s
+LIBXUL_LIBRARY = 1
+
+
+EXPORTS += \

  •  nsDOMMediaSource.h \
    
  •  nsDOMSourceBuffer.h \
    
  •  nsDOMSourceBufferList.h \
    
  •  $(NULL)
    

+CPPSRCS = \

  •  nsDOMMediaSource.cpp \
    
  •  nsDOMSourceBuffer.cpp \
    
  •  nsDOMSourceBufferList.cpp \
    
  •  $(NULL)
    

+FORCE_STATIC_LIB = 1
+
+include $(topsrcdir)/config/rules.mk
+
+LOCAL_INCLUDES = \

  •  -I$(topsrcdir)/dom/base \
    
  •  $(NULL)
    

diff --git a/content/media/mediasource/nsDOMMediaSource.cpp b/content/media/mediasource/nsDOMMediaSource.cpp
new file mode 100644
--- /dev/null
+++ b/content/media/mediasource/nsDOMMediaSource.cpp
@@ -0,0 +1,70 @@
+/* -- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 --/
+/
This Source Code Form is subject to the terms of the Mozilla Public

    • License, v. 2.0. If a copy of the MPL was not distributed with this file,
    • You can obtain one at http://mozilla.org/MPL/2.0/. */
      +#include "nsContentUtils.h"
      +#include "nsDOMClassInfoID.h"
      +#include "nsDOMMediaSource.h"
      +#include "nsDOMSourceBuffer.h"
      +#include "nsDOMSourceBufferList.h"

+using namespace mozilla;
+
+#if 0
+DOMCI_DATA(MediaSource, nsDOMMediaSource)
+#endif
+
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(nsDOMMediaSource, mGlobal)
+NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMMediaSource)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMMediaSource)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMMediaSource)

  • NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
  • NS_INTERFACE_MAP_ENTRY(nsISupports)
    +NS_INTERFACE_MAP_END

+/static/ already_AddRefed<nsDOMMediaSource>
+nsDOMMediaSource::Constructor(nsISupports* aGlobal, ErrorResult& aRv)
+{

  • nsDOMMediaSource* mediaSource = new nsDOMMediaSource(aGlobal);
  • NS_ADDREF(mediaSource);
  • return mediaSource;
    +}

+already_AddRefed<nsDOMSourceBufferList>
+nsDOMMediaSource::GetSourceBuffers(ErrorResult& aRv)
+{

  • nsDOMSourceBufferList* sourceBuffers = new nsDOMSourceBufferList(this);
  • NS_ADDREF(sourceBuffers);
  • return sourceBuffers;
    +}

+already_AddRefed<nsDOMSourceBufferList>
+nsDOMMediaSource::GetActiveSourceBuffers(ErrorResult& aRv)
+{

  • nsDOMSourceBufferList* activeSourceBuffers = new nsDOMSourceBufferList(this);
  • NS_ADDREF(activeSourceBuffers);
  • return activeSourceBuffers;
    +}

+already_AddRefed<nsDOMSourceBuffer>
+nsDOMMediaSource::AddSourceBuffer(const nsAString& aType, ErrorResult& aRv)
+{

  • return nullptr;
    +}

+void
+nsDOMMediaSource::RemoveSourceBuffer(dom::NonNull<nsDOMSourceBuffer> aSourceBuffer, ErrorResult& aRv)
+{
+}
+
+dom::State
+nsDOMMediaSource::GetReadyState(ErrorResult& aRv)
+{

  • return dom::StateValues::Closed;
    +}

+void
+nsDOMMediaSource::EndOfStream(const dom::Optional<dom::EndOfStreamError>& aError, ErrorResult& aRv)
+{
+}
diff --git a/content/media/mediasource/nsDOMMediaSource.h b/content/media/mediasource/nsDOMMediaSource.h
new file mode 100644
--- /dev/null
+++ b/content/media/mediasource/nsDOMMediaSource.h
@@ -0,0 +1,54 @@
+/* -- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 --/
+/
This Source Code Form is subject to the terms of the Mozilla Public

    • License, v. 2.0. If a copy of the MPL was not distributed with this file,

+#include "nscore.h"
+#include "nsCOMPtr.h"
+#include "mozilla/Attributes.h"
+#include "nsWrapperCache.h"
+#include "mozilla/dom/MediaSourceBinding.h"
+#include "nsCycleCollectionParticipant.h"
+
+class nsDOMSourceBufferList;
+class nsDOMSourceBuffer;
+
+class nsDOMMediaSource MOZ_FINAL : public nsISupports, public nsWrapperCache
+{
+public:

  • NS_DECL_CYCLE_COLLECTING_ISUPPORTS
  • NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMMediaSource)
  • nsISupports* GetParentObject() const {
  • return mGlobal;
  • }
  • JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) {
  • return mozilla::dom::MediaSourceBinding::Wrap(cx, scope, this, triedToWrap);
  • }
  • static already_AddRefed<nsDOMMediaSource> Constructor(nsISupports* aGlobal, mozilla::ErrorResult& aRv);
  • already_AddRefed<nsDOMSourceBufferList> GetSourceBuffers(mozilla::ErrorResult& aRv);
  • already_AddRefed<nsDOMSourceBufferList> GetActiveSourceBuffers(mozilla::ErrorResult& aRv);
  • already_AddRefed<nsDOMSourceBuffer> AddSourceBuffer(const nsAString& aType, mozilla::ErrorResult& aRv);
  • void RemoveSourceBuffer(mozilla::dom::NonNull<nsDOMSourceBuffer> aSourceBuffer, mozilla::ErrorResult& aRv);
  • mozilla::dom::State GetReadyState(mozilla::ErrorResult& aRv);
  • void EndOfStream(const mozilla::dom::Optional<mozilla::dom::EndOfStreamError>& aError, mozilla::ErrorResult& aRv);

+private:

  • nsDOMMediaSource(nsISupports* aGlobal)
  • : mGlobal(aGlobal)
  • {
  • SetIsDOMBinding();
  • }
  • nsCOMPtr<nsISupports> mGlobal;
    +};

+#endif /* MOZILLA_MEDIASOURCE_H_ /
diff --git a/content/media/mediasource/nsDOMSourceBuffer.cpp b/content/media/mediasource/nsDOMSourceBuffer.cpp
new file mode 100644
--- /dev/null
+++ b/content/media/mediasource/nsDOMSourceBuffer.cpp
@@ -0,0 +1,38 @@
+/
-- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 --/
+/
This Source Code Form is subject to the terms of the Mozilla Public

    • License, v. 2.0. If a copy of the MPL was not distributed with this file,
    • You can obtain one at http://mozilla.org/MPL/2.0/. */
      +#include "nsContentUtils.h"
      +#include "nsDOMClassInfoID.h"
      +#include "nsDOMSourceBuffer.h"

+using namespace mozilla;
+
+#if 0
+DOMCI_DATA(SourceBuffer, nsDOMSourceBuffer)
+#endif
+
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(nsDOMSourceBuffer, mParent)
+NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMSourceBuffer)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMSourceBuffer)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMSourceBuffer)

  • NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
  • NS_INTERFACE_MAP_ENTRY(nsISupports)
    +NS_INTERFACE_MAP_END

+already_AddRefed<nsTimeRanges>
+nsDOMSourceBuffer::GetBuffered(ErrorResult& aRv)
+{

  • return nullptr;
    +}

+void
+nsDOMSourceBuffer::Append(dom::Uint8Array& aData, ErrorResult& aRv)
+{
+}
+
+void
+nsDOMSourceBuffer::Abort(ErrorResult& aRv)
+{
+}
diff --git a/content/media/mediasource/nsDOMSourceBuffer.h b/content/media/mediasource/nsDOMSourceBuffer.h
new file mode 100644
--- /dev/null
+++ b/content/media/mediasource/nsDOMSourceBuffer.h
@@ -0,0 +1,48 @@
+/* -- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 --/
+/
This Source Code Form is subject to the terms of the Mozilla Public

    • License, v. 2.0. If a copy of the MPL was not distributed with this file,

+#include "nscore.h"
+#include "nsCOMPtr.h"
+#include "nsWrapperCache.h"
+#include "mozilla/Attributes.h"
+#include "mozilla/dom/TypedArray.h"
+#include "mozilla/ErrorResult.h"
+#include "nsTimeRanges.h"
+#include "mozilla/dom/SourceBufferBinding.h"
+#include "nsCycleCollectionParticipant.h"
+
+class nsDOMSourceBuffer MOZ_FINAL : public nsISupports, public nsWrapperCache
+{
+public:

  • NS_DECL_CYCLE_COLLECTING_ISUPPORTS
  • NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMSourceBuffer)
  • nsDOMSourceBuffer(nsISupports* aParent)
  • : mParent(aParent)
  • {
  • SetIsDOMBinding();
  • }
  • nsISupports* GetParentObject() const {
  • return mParent;
  • }
  • JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) {
  • return mozilla::dom::SourceBufferBinding::Wrap(cx, scope, this, triedToWrap);
  • }
  • already_AddRefed<nsTimeRanges> GetBuffered(mozilla::ErrorResult& aRv);
  • void Append(mozilla::dom::Uint8Array& aData, mozilla::ErrorResult& aRv);
  • void Abort(mozilla::ErrorResult& aRv);

+private:

  • nsCOMPtr<nsISupports> mParent;
    +};

+#endif /* MOZILLA_SOURCEBUFFER_H_ /
diff --git a/content/media/mediasource/nsDOMSourceBufferList.cpp b/content/media/mediasource/nsDOMSourceBufferList.cpp
new file mode 100644
--- /dev/null
+++ b/content/media/mediasource/nsDOMSourceBufferList.cpp
@@ -0,0 +1,34 @@
+/
-- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 --/
+/
This Source Code Form is subject to the terms of the Mozilla Public

    • License, v. 2.0. If a copy of the MPL was not distributed with this file,
    • You can obtain one at http://mozilla.org/MPL/2.0/. */
      +#include "nsContentUtils.h"
      +#include "nsDOMClassInfoID.h"
      +#include "nsDOMSourceBufferList.h"

+using namespace mozilla;
+
+#if 0
+DOMCI_DATA(SourceBufferList, nsDOMSourceBufferList)
+#endif
+
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(nsDOMSourceBufferList, mParent)
+NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMSourceBufferList)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMSourceBufferList)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMSourceBufferList)

  • NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
  • NS_INTERFACE_MAP_ENTRY(nsISupports)
    +NS_INTERFACE_MAP_END

+already_AddRefed<nsDOMSourceBuffer>
+nsDOMSourceBufferList::__indexedgetter(uint32_t aIndex, ErrorResult& aRv)
+{

  • return nullptr;
    +}

+uint32_t
+nsDOMSourceBufferList::GetLength(ErrorResult& aRv)
+{

  • return 0;
    +}
    diff --git a/content/media/mediasource/nsDOMSourceBufferList.h b/content/media/mediasource/nsDOMSourceBufferList.h
    new file mode 100644
    --- /dev/null
    +++ b/content/media/mediasource/nsDOMSourceBufferList.h
    @@ -0,0 +1,46 @@
    +/* -- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 --/
    +/
    This Source Code Form is subject to the terms of the Mozilla Public
    • License, v. 2.0. If a copy of the MPL was not distributed with this file,

+#include "nscore.h"
+#include "nsCOMPtr.h"
+#include "mozilla/Attributes.h"
+#include "nsWrapperCache.h"
+#include "nsDOMSourceBuffer.h"
+#include "mozilla/dom/SourceBufferListBinding.h"
+#include "nsCycleCollectionParticipant.h"
+
+class nsDOMMediaSource;
+
+class nsDOMSourceBufferList MOZ_FINAL : public nsISupports, public nsWrapperCache
+{
+public:

  • NS_DECL_CYCLE_COLLECTING_ISUPPORTS
  • NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMSourceBufferList)
  • nsDOMSourceBufferList(nsISupports* aParent)
  • : mParent(aParent)
  • {
  • SetIsDOMBinding();
  • }
  • nsISupports* GetParentObject() const {
  • return mParent;
  • }
  • JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap) {
  • return mozilla::dom::SourceBufferListBinding::Wrap(cx, scope, this, triedToWrap);
  • }
  • already_AddRefed<nsDOMSourceBuffer> __indexedgetter(uint32_t aIndex, mozilla::ErrorResult& aRv);
  • uint32_t GetLength(mozilla::ErrorResult& aRv);

+private:

  • nsCOMPtr<nsISupports> mParent;
    +};

+#endif /* MOZILLA_SOURCEBUFFERLIST_H_ */
diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -239,6 +239,18 @@ DOMInterfaces = {
'headerFile': 'mozilla/dom/workers/bindings/XMLHttpRequestUpload.h'
}],

+'MediaSource': {

  • 'nativeType': 'nsDOMMediaSource',
    +},

+'SourceBuffer': {

  • 'nativeType': 'nsDOMSourceBuffer',
    +},

+'SourceBufferList': {

  • 'nativeType': 'nsDOMSourceBufferList',
    +},

####################################

Test Interfaces of various sorts

####################################
@@ -318,6 +330,8 @@ def addExternalHTMLElement(element):
addExternalHTMLElement('HTMLCanvasElement')
addExternalHTMLElement('HTMLImageElement')
addExternalHTMLElement('HTMLVideoElement')
+addExternalHTMLElement('HTMLVideoElement')
+addExternalHTMLElement('TimeRanges')
addExternalIface('CanvasGradient', headerFile='nsIDOMCanvasRenderingContext2D.h')
addExternalIface('CanvasPattern', headerFile='nsIDOMCanvasRenderingContext2D.h')
addExternalIface('HitRegionOptions', nativeType='nsISupports')
diff --git a/dom/webidl/MediaSource.webidl b/dom/webidl/MediaSource.webidl
new file mode 100644
--- /dev/null
+++ b/dom/webidl/MediaSource.webidl
@@ -0,0 +1,28 @@
+/* -- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -- /
+/
This Source Code Form is subject to the terms of the Mozilla Public

+enum State {"closed", "open", "ended"};
+
+enum EndOfStreamError {"network", "decode"};
+
+[Constructor]
+interface MediaSource : EventTarget {

  • readonly attribute SourceBufferList sourceBuffers;
  • readonly attribute SourceBufferList activeSourceBuffers;
  • SourceBuffer addSourceBuffer(DOMString type);
  • void removeSourceBuffer(SourceBuffer sourceBuffer);
  • readonly attribute State readyState;
  • void endOfStream(optional EndOfStreamError error);
    +};
    diff --git a/dom/webidl/SourceBuffer.webidl b/dom/webidl/SourceBuffer.webidl
    new file mode 100644
    --- /dev/null
    +++ b/dom/webidl/SourceBuffer.webidl
    @@ -0,0 +1,21 @@
    +/* -- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -- /
    +/
    This Source Code Form is subject to the terms of the Mozilla Public
    • License, v. 2.0. If a copy of the MPL was not distributed with this file,
    • The origin of this IDL file is
    • Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
    • liability, trademark and document use rules apply.
  • */

+interface TimeRanges;
+
+interface SourceBuffer : EventTarget {

  • readonly attribute TimeRanges buffered;
  • void append(Uint8Array data);
  • void abort();
    +};
    diff --git a/dom/webidl/SourceBufferList.webidl b/dom/webidl/SourceBufferList.webidl
    new file mode 100644
    --- /dev/null
    +++ b/dom/webidl/SourceBufferList.webidl
    @@ -0,0 +1,16 @@
    +/* -- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -- /
    +/
    This Source Code Form is subject to the terms of the Mozilla Public
    • License, v. 2.0. If a copy of the MPL was not distributed with this file,
    • The origin of this IDL file is
    • Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
    • liability, trademark and document use rules apply.
  • */

+interface SourceBufferList : EventTarget {

  • readonly attribute unsigned long length;
  • getter SourceBuffer? (unsigned long index);
    +};
    diff --git a/dom/webidl/WebIDL.mk b/dom/webidl/WebIDL.mk
    --- a/dom/webidl/WebIDL.mk
    +++ b/dom/webidl/WebIDL.mk
    @@ -15,6 +15,9 @@ webidl_files =
    XMLHttpRequest.webidl
    XMLHttpRequestEventTarget.webidl
    XMLHttpRequestUpload.webidl \
  • MediaSource.webidl \
  • SourceBuffer.webidl \
  • SourceBufferList.webidl
    $(NULL)

ifdef MOZ_WEBGL
diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in
--- a/layout/build/Makefile.in
+++ b/layout/build/Makefile.in
@@ -171,6 +171,10 @@ SHARED_LIBRARY_LIBS +=
$(NULL)
endif

+SHARED_LIBRARY_LIBS += \

  • $(DEPTH)/content/media/mediasource/$(LIB_PREFIX)gkconmediasource_s.$(LIB_SUFFIX) \
  • $(NULL)

ifdef NS_PRINTING
SHARED_LIBRARY_LIBS +=
../printing/$(LIB_PREFIX)gkprinting_s.$(LIB_SUFFIX) \

Severity: normal → S3
Attachment #9386048 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.