Re: [webrtc-pc] specify legacy onaddstream?

We can shim onaddstream (I think) by:

pc.addEventListener(track, function(track, streams) {
   for (stream : streams) {
      if (!pc.__known_streams__.hasMember(stream)) {
          fire pc.stream event
          pc__.known_streams__.push_back(stream);
     }
  }
})

if it's possible to fire an event "as if it had come from the PC". Not sure about that part.


-- 
GitHub Notification of comment by alvestrand
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1705#issuecomment-356554213 using your GitHub account

Received on Wednesday, 10 January 2018 09:54:44 UTC