W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > January 2018

Re: [webrtc-pc] specify legacy onaddstream?

From: Harald Alvestrand via GitHub <sysbot+gh@w3.org>
Date: Wed, 10 Jan 2018 09:52:17 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-356554213-1515577926-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:43 UTC