Commit graph

290 commits

Author SHA1 Message Date
Josh Matthews
564c16d754 Use non-IPC webrender API over explicit IPC channels. 2019-11-27 20:47:53 -05:00
Fernando Jiménez Moreno
35c4c35416 Fix metadata update 2019-11-20 13:34:31 +01:00
Fernando Jiménez Moreno
d33c96b31e Fallback to current url as metadata title 2019-11-20 13:34:30 +01:00
Fernando Jiménez Moreno
9da1dd3592 Default media session actions 2019-11-20 13:34:29 +01:00
Fernando Jiménez Moreno
08f9f17ed3 Send MediaSessionAction from Android 2019-11-20 13:33:51 +01:00
Fernando Jiménez Moreno
dd63ba425f MediaSession show media controls on Android 2019-11-20 13:33:15 +01:00
Fernando Jiménez Moreno
761f21fc8b Send MediaSessionEvent::PlaybackStateChange when needed 2019-11-20 13:33:15 +01:00
Fernando Jiménez Moreno
89d9e3ad78 Introduce embedder MediaSessionEvent and move active session to Servo 2019-11-20 13:33:15 +01:00
Fernando Jiménez Moreno
4d147d2c56 Register media instance with session and prepare communication with embedder 2019-11-20 13:33:14 +01:00
Fernando Jiménez Moreno
a72e46f9c8 MediaElementAudioSourceNode: set audio renderer 2019-11-18 17:14:51 +01:00
Fernando Jiménez Moreno
ea054871bf Rename frame_renderer to video_renderer 2019-11-18 17:14:51 +01:00
Fernando Jiménez Moreno
518ec87cdd Update servo-media with MediaElementAudioSourceNode engine 2019-11-18 17:14:50 +01:00
Simon Sapin
bea73951db Use #![register_tool] instead of #![register_attr]
CC https://github.com/rust-lang/rust/issues/66079
2019-11-15 17:24:42 +01:00
bors-servo
75548f40c6
Auto merge of #24340 - jdm:image-cache-cors, r=Manishearth
Allow using CORS filtered image responses as WebGL textures

More specifically, this makes the "is this image same origin?" check consider the CORS status of the original response, rather than relying on an overly-strict "is this image's response's URL same-origin with a particular global?" check. To do this, we make the image cache double keyed based on the requested URL as well as the requesting origin, and store the CORS status of the eventual response with the final image that eventually gets sent to the HTMLImageElement consumer.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24330 and fix #24368
- [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/24340)
<!-- Reviewable:end -->
2019-10-07 18:39:36 -04:00
Josh Matthews
1df8d57dc6 Support CORS attributes for image elements. 2019-10-04 15:08:40 -04:00
Víctor Manuel Jáquez Leal
b75d454162 implement get_image_pixels() for video element 2019-10-04 18:08:06 +02:00
Víctor Manuel Jáquez Leal
bc07154e05 Always hold current frame
Regardless if it contains raw data or a gl texture.

It is required to hold current frame because it can be used for
webgl's get_image_pixels
2019-10-04 18:08:06 +02:00
sreeise
5ea79c64f9 Integrates media track selection 2019-09-22 10:39:41 -04:00
Fernando Jiménez Moreno
51ed44c77d Register pipeline instead of browsing contexts for media instances 2019-09-19 17:48:54 +02:00
Víctor Manuel Jáquez Leal
c6df00343b Enable video frames as OES textures
This patch parametrizes WR to handle OES textures if the incoming
frame wraps one.

It requires the update of servo-media package and the according
WR parametrization.
2019-09-10 13:15:39 +02:00
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