mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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 -->
This commit is contained in:
commit
17590fd48f
14 changed files with 390 additions and 47 deletions
|
@ -839,9 +839,13 @@ impl HTMLMediaElement {
|
|||
self.fetch_request(None);
|
||||
},
|
||||
SrcObject::MediaStream(ref stream) => {
|
||||
for stream in stream.get_tracks() {
|
||||
if let Err(_) =
|
||||
self.player.borrow().as_ref().unwrap().set_stream(&stream)
|
||||
for stream in &*stream.get_tracks() {
|
||||
if let Err(_) = self
|
||||
.player
|
||||
.borrow()
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.set_stream(&stream.id())
|
||||
{
|
||||
self.queue_dedicated_media_source_failure_steps();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue