Commit graph

270 commits

Author SHA1 Message Date
Fernando Jiménez Moreno
507a1e4370 Update servo-media. Remove implicit shutdown requests. It all happens automagicly now 2019-08-19 09:55:00 +02:00
Fernando Jiménez Moreno
322062bb3f Fix HTMLMediaElement seek race condition 2019-08-12 15:45:13 +02:00
sreeise
598d343854 Changed DOMString usages to string in MediaFragmentParser 2019-07-25 13:34:18 -04:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
bors-servo
fdbb317d7a
Auto merge of #23774 - sreeise:media_fragment_parser, r=ferjm
Media fragment parser

<!-- Please describe your changes on the following line: -->
Media fragment parser for audio and video.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #22366 (GitHub issue number if applicable)

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23774)
<!-- Reviewable:end -->
2019-07-23 05:00:01 -04:00
sreeise
dc11219496 Media fragment parser 2019-07-22 21:39:55 -04:00
Fernando Jiménez Moreno
ef02196dd8 More detach shadow changes 2019-07-22 17:40:17 +02:00
Fernando Jiménez Moreno
1f3c879a85 Detach shadow clean up 2019-07-22 17:40:16 +02:00
Fernando Jiménez Moreno
23def72787 Implement method to remove media controls 2019-07-22 17:40:15 +02:00
Fernando Jiménez Moreno
82339a9295 Do not try to render controls if they are already rendered 2019-07-22 17:40:15 +02:00
Fernando Jiménez Moreno
3a99c6ba6a Do not render controls until we have metadata 2019-07-22 17:40:15 +02:00
Fernando Jiménez Moreno
f16cf2d6a4 Expose HTMLMediaElement.controls 2019-07-22 17:40:15 +02:00
Fernando Jiménez Moreno
9496dff529 Anchor controls inside bottom of video element 2019-07-22 17:40:14 +02:00
Fernando Jiménez Moreno
a664449681 Media UI basic functionality 2019-07-22 17:40:14 +02:00
Fernando Jiménez Moreno
1c02fc94a8 Barebones media UI 2019-07-22 17:40:14 +02:00
Fernando Jiménez Moreno
8e0160fa71 Update servo media to include global mute support 2019-07-05 11:01:19 +02:00
Fernando Jiménez Moreno
89dc0119f0 Do not use WR external images if frames are not textures 2019-07-04 10:26:48 +02:00
Fernando Jiménez Moreno
cd17b6ca66 Fix typos, warnings and other nits 2019-07-04 10:26:48 +02:00
Fernando Jiménez Moreno
7d589ed4f5 Media crate 2019-07-04 10:25:49 +02:00
Víctor Manuel Jáquez Leal
6e2ee394c9 Handle WR's lock/unlock logic under FrameRenderer 2019-07-04 10:25:48 +02:00
Víctor Manuel Jáquez Leal
95c3d52e7b Add a task source for messages from GLPlayer thread 2019-07-04 10:25:48 +02:00
Víctor Manuel Jáquez Leal
65f9e2161c Add texture image in MediaFrameRenderer 2019-07-04 10:25:48 +02:00
Víctor Manuel Jáquez Leal
586d3f8da5 Register and unregister a player in GLPlayer thread 2019-07-04 10:25:48 +02:00
Víctor Manuel Jáquez Leal
fe860f3aad Define the channel type for player events 2019-07-04 10:25:47 +02:00
Víctor Manuel Jáquez Leal
e36c0489bf Ignore frame if it is a GL texture
And mock what would be if we handle GL textures.
2019-07-04 10:25:47 +02:00
Víctor Manuel Jáquez Leal
9f4f9dc750 Add media (WindowGLContext) module in canvas_trait
This module adds a structure (WindowGLContext) which holds the
OpenGL parameters that are going to be used by servo-media player
to render video frames using OpenGL.

In order to fill this structure, three new methods were added to
WindowMethods trait. In this patch only the Glutin-based
implementation provides a simple boilerplate.

The WindowGLContext is created in the entry point of libservo, when
the application window is created, and later passed to the
constellation, the pipeline and to the window element in dom, thus
htmlmediaelement has a mean to obtain these parameters via its
window.
2019-07-04 10:24:01 +02:00
Simon Sapin
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00
Josh Matthews
b1510d9ad5 Upgrade headers, headers-core, and hyper_serde. 2019-06-13 11:08:16 -04:00
Víctor Manuel Jáquez Leal
985efb4b8d Use media element task source to receive the player's events
This is crumb left behind when changing the usage of dom task source
to the proper media element task source.
2019-06-06 17:03:59 +02:00
bors-servo
03f223663f
Auto merge of #23459 - Eijebong:compartments, r=jdm
Add an inCompartments config option for bindings

Fixes #23257

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23459)
<!-- Reviewable:end -->
2019-06-02 14:41:20 -04:00
Víctor Manuel Jáquez Leal
02dfee7b47 Pass frame renderer to player only if video element
Otherwise it will only render audio but no video frames.
2019-05-30 09:51:49 +02:00
Fernando Jiménez Moreno
dfbf7e37ab Allow simultaneous playback of audio and video for getUserMedia 2019-05-29 16:17:36 +02:00
Bastien Orivel
292d468cd1 Use the newly added inCompartments option everywhere it can be 2019-05-25 17:28:07 +02:00
Jack Britton
ade697b782 Implement HTMLMediaElement.crossorigin attribute logic. 2019-05-22 12:23:51 +02:00
Víctor Manuel Jáquez Leal
f643740c15 No need to clone again the raw data.
Players frame's get_data() already delivers a cloned raw data.
2019-05-09 11:59:56 +02:00
bors-servo
17590fd48f
Auto merge of #23342 - Manishearth:webrtc-streams, r=ferjm
Receive streams in WebRTC (and MediaStreamTrack support)

This adds the `ontrack` event handler to webrtc, and all the `MediaStreamTrack` stuff necessary to make it work.

WebRTC has the ability to group media tracks into streams using MSIDs, but I haven't yet figured out how to do this. For now, `ontrack` should work.

This _should_ be complete, but it hasn't yet been tested (hence the WIP)

r? @ferjm or @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23342)
<!-- Reviewable:end -->
2019-05-09 00:26:02 -04:00
Manish Goregaokar
a9ab13b279 Use MediaStreamTracks in MediaStreams 2019-05-07 17:09:04 -07:00
bors-servo
cd06c3450e
Auto merge of #23229 - georgeroman:implement_htmlmediaelement_canplaytype, r=ferjm
Finish the implementation of the HTMLMediaElement canPlayType method

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #22299

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23229)
<!-- Reviewable:end -->
2019-05-07 13:57:46 -04:00
Víctor Manuel Jáquez Leal
f9bee36b71 Update Player instantiator API
Now servo/media player requires a new parameter for its creator, which
is a trait object that provides the GL parameters needed for setup the
generation of frames as GL textures.

This patch provides a dummy GL context trait object where the code
path will go to the default of raw frames.

Webaudio test expectation also were changed, adding two new failing
tests.
2019-05-02 17:27:12 +02:00
George Roman
5eb691c4d2 Finish the implementation of the HTMLMediaElement canPlayType method 2019-05-02 17:27:18 +03:00
bors-servo
852223b08a
Auto merge of #23253 - BartGitHub:refactor-promise-compartment, r=jdm
Refactor promise compartment

<!-- Please describe your changes on the following line: -->
This PR adds a mechanism to verify that certain code is executed inside a ```JSAutoCompartment```, and applies this to the ```Promise::new_in_current_compartment``` constructor.

r? @jdm

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23167

<!-- Either: -->
- [x] These changes do not require tests because they do not change existing functionality.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23253)
<!-- Reviewable:end -->
2019-04-29 13:59:04 -04:00
bors-servo
67beaa46e2
Auto merge of #23236 - swarnimarun:loop_patch, r=ferjm
Implement HTMLMediaElement.loop Attribute

<!-- Please describe your changes on the following line: -->
Work done for Implementing HTMLMediaElement.loop Attribute,
- Uncomment `loop` attribute from webidl
- Add make_bool macros for Loop and SetLoop functions
- Update the required tests

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22290

<!-- Either: -->
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23236)
<!-- Reviewable:end -->
2019-04-29 12:20:43 -04:00
Swarnim Arun
3bf3a7861a Implement HTMLMediaElement.loop Attribute 2019-04-26 23:13:18 +05:30
Fernando Jiménez Moreno
441357b74e Add is_connected flag to node and use it to replace most uses of is_in_doc 2019-04-26 10:17:45 +02:00
bors-servo
b73956cc37
Auto merge of #23090 - miller-time:nav-fetch-referrer, r=gterzian
Add referrer to navigation fetch request

<!-- Please describe your changes on the following line: -->
Implement step 13 of [following hyperlinks](https://html.spec.whatwg.org/#following-hyperlinks-2) and step 14.3 of [window open](https://html.spec.whatwg.org/#window-open-steps), as well as other referrer- and fetch-related updates.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22890 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23090)
<!-- Reviewable:end -->
2019-04-25 20:21:23 -04:00
Aron Zwaan
e2e6e2ac94 Pass InCompartment by value 2019-04-25 11:37:35 +02:00
Aron Zwaan
1b6949d4cf Add proof parameter to Promise::new_in_current_compartment 2019-04-24 19:46:10 +02:00
Fernando Jiménez Moreno
74a48937f1 Remove use of auto media backend. And update servo-media 2019-04-23 16:24:33 +02:00
Russell Cousineau
2440e0f98a set referrer in window.load_url
- this conforms to follow-hyperlinks spec step 13
- this conforms to window-open spec step 14.3
- replace uses of `referrer_url` with `referrer`
- in Request class, change "no-referrer" to ""
- set websocket fetch referrer to "no-referrer"
2019-04-19 16:50:38 -07:00
Fernando Jiménez Moreno
501e6c1aed Allow replaying media 2019-04-17 12:11:14 +02:00