Commit graph

337 commits

Author SHA1 Message Date
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
Josh Matthews
eebd831ea5 Move media backend initialization to process startup. 2019-04-15 16:46:25 -04:00
bors-servo
17204544d9
Auto merge of #23157 - ferjm:gum.playback, r=Manishearth
MediaStream playback through audio and video elements

- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] 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/23157)
<!-- Reviewable:end -->
2019-04-13 20:28:17 -04:00
Fernando Jiménez Moreno
0eb2c1d02e Do not tie media element 'muted' state change to player availability 2019-04-11 09:02:49 +02:00
Lucas Fantacuci
6b2be9b31d Implementing the builder pattern for RequestInit 2019-04-10 14:01:30 -03:00
Fernando Jiménez Moreno
af242a0571 MediaStream playback through audio and video elements 2019-04-10 17:55:46 +02:00
Aron Zwaan
782b58587a Rename Promise::new to Promise::new_in_current_compartment 2019-04-03 20:45:30 +02:00
Fernando Jiménez Moreno
d15640081c Implement srcObject logic for Blob media providers 2019-03-27 07:11:29 +01:00
Fernando Jiménez Moreno
bc74dc0e85 Use servo-media-auto and call ServoMedia::init where required 2019-03-25 09:51:53 +01:00
Fernando Jiménez Moreno
36825b82f3 Shutdown player when HTMLMediaElement is dropped 2019-03-25 09:29:30 +01:00
Peter Hall
8bfd4dc1e2 #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
sreeise
cac4aa56f7 Added AudioTrack, AudioTrackList, VideoTrack, VideoTrackList, and TrackEvent interfaces 2019-03-03 09:04:50 -05:00
Steve Sweetney
02d3328d3c Implement HTMLMediaElement muted and defaultMuted attributes 2019-02-18 15:20:00 -05:00
Fernando Jiménez Moreno
4b23c631ea No need to share a reference for HTMLMediaElement played TimeRange 2019-01-17 10:01:38 +01:00
Fernando Jiménez Moreno
f5581a78ab Add media cache and implement HTMLMediaElement.buffering 2019-01-17 10:01:38 +01:00
bors-servo
2cf9a00c99
Auto merge of #22399 - ferjm:poster.frame, r=jdm
Implement HTMLMediaElement poster attribute

- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22288
- [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/22399)
<!-- Reviewable:end -->
2019-01-14 17:35:23 -05:00
german gomez
5605f235c6 Implement Ended media attribute
Signed-off-by: german gomez <germangb42@gmail.com>
2019-01-11 18:13:11 +01:00
Fernando Jiménez Moreno
9d5499bbfb Reftest for video poster frame 2019-01-11 17:11:12 +01:00
Fernando Jiménez Moreno
5c5b5aae0f Implement HTMLMediaElement poster attribute 2019-01-11 17:11:11 +01:00
Fernando Jiménez Moreno
9a18074b88 Split media fetch context and fetch listener to prevent deadlocks 2019-01-11 13:58:48 +01:00
Fernando Jiménez Moreno
da32c8488c Do not let fetch request drive generation id increments 2019-01-11 10:44:43 +01:00
Fernando Jiménez Moreno
9aced067aa Reset seeking flag if stream is not seekable 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
34c1f2587f Add fetch canceller to HTMLMediaElementFetchContext and clarify how we restart after a backoff 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
e7e390ee8e Backoff protocol for media fetch requests 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
f1d012d782 Make sure that we ignore responses from old requests 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
c8806767a0 Set media stream as seekable only if the server supports range requests 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
5112e0435c Update servo-media 2019-01-10 19:09:32 +01:00
Fernando Jiménez Moreno
f7eeb26f0a Force the usage of mp4 for media-element WPTs 2019-01-09 09:28:43 +01:00
Fernando Jiménez Moreno
6c2c3f75b9 Implement step 6 of media element 'time marches on' algoritm 2019-01-09 09:28:42 +01:00
Manish Goregaokar
4328fc23a7 Clean up HTMLMediaElement::Play 2019-01-04 15:05:07 -08:00
Manish Goregaokar
611dc4bc70 Remove now-unnecessary must_root and allow(unrooted_must_root) annotations 2019-01-04 15:05:07 -08:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
George Roman
deb02ab6d7 Implement HTMLMediaElement defaultPlaybackRate and playbackRate attributes 2018-12-26 22:20:51 +02:00
Dan Robertson
c46508e497
Update src/href attributes to be a USVString
The following IDLs have the src/href attributes typed as a DOMString
while in the spec the attribute has been updated to be a USVString:

 - HTMLIFrameElement
 - HTMLImageElement
 - HTMLInputElement
 - HTMLLinkElement
 - HTMLMediaElement
 - HTMLScriptElement
2018-12-17 15:28:42 +00:00