question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.addStream removed

See original GitHub issue

Just admittedly blindly updated react-native-webrtc to

"react-native-webrtc": "^106.0.0-beta.3",

Noticed a bunch of API changes. addStream, getLocalStreams removed.

As the repo stands, if a new user installs this lib and follows the Guides, they will be in for many surprises 😄

Any migration/updated docs planned?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
saghulcommented, Oct 10, 2022

@saghul

In 106 there doesn’t seem to even be a stream in the ontrack event .

There is a list of streams in event.streams, if you set the stream IDs on the other side when you add the transceiver.

Is this expected? Or is there a signaling issue?

Stream-less tracks are possible but rate, that’s why we have that limitation for now.

How are you supposed to use remote tracks if not to add them to streams?

If you set stream IDs when creating your transceiver, or pass the stream when calling addTrack the remote will receive a track that is attached to a stream.

I got something working somehow with:


      PeerConnection.ontrack = (event: any) => {

        PeerConnection?.addTransceiver(event.transceiver, myRemoteStream);

        myRemoteStream.addTrack(event.track);

      };

That’s completely broken. I suggest you read bout the transceivers API on MDN.


Not even sure why or how this works. Investigating further, any help appreciated




1reaction
8BallBomBomcommented, Oct 10, 2022

There will eventually be some decent example apps that should help a lot more but most of what is documented currently is pretty straight forward to some extent 👍🏻

Read more comments on GitHub >

github_iconTop Results From Across the Web

RTCPeerConnection.addStream() - Web APIs - MDN Web Docs
addStream (). Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed ......
Read more >
Deprecate and remove RTCPeerConnection#addStream ...
Issue 697059: Deprecate and remove RTCPeerConnection#addStream/removeStream and related events ; Comment 1 · Tue, Feb 28, 2017, 8:48 AM PST · Components: -Blink> ......
Read more >
addTrack instead of deprecated addStream #339 - GitHub
As a webRTC user, I would like to use addTrack (as addStream is deprecated, ... SAFARI has removed (completely) addstream and onaddstream ....
Read more >
removeStream and then re- addStream after negotiation: Safe?
If I call removeStream, it does indeed stop sending data. If I then call addStream (with the previously removed stream), it resumes. Great!...
Read more >
Addstream - DOM Events - W3cubDocs
DeprecatedThis feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found