Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency on deprecated APIs #12

Open
buu700 opened this issue Apr 3, 2017 · 4 comments
Open

Dependency on deprecated APIs #12

buu700 opened this issue Apr 3, 2017 · 4 comments

Comments

@buu700
Copy link

buu700 commented Apr 3, 2017

In Firefox 52, I'm getting the console warnings RTCIceServer.url is deprecated! Use urls instead. for line 35 and onaddstream is deprecated! Use peerConnection.ontrack instead. for line 53.

@fippo
Copy link
Member

fippo commented Apr 3, 2017

The url issue is something that you can fix yourself. Simply don't use something like

var pc = new TraceablePeerConnection({iceServers: [{url: 'stun:something']})

and instead use urls:

var pc = new TraceablePeerConnection({iceServers: [{urls: 'stun:something']})

until chrome implements ontrack one has to use onaddstream.

@buu700
Copy link
Author

buu700 commented Apr 3, 2017

Got it, thanks! Would it be possible to conditionally use ontrack where available and otherwise fall back to onaddstream?

@fippo
Copy link
Member

fippo commented Apr 4, 2017

https://github.com/webrtc/adapter lets you use ontrack even but that doesn't apply to the usage in this module.

@buu700
Copy link
Author

buu700 commented Apr 5, 2017

Well, just to clarify, I'm not actually using this package directly; my project includes SimpleWebRTC (as well as webrtc-adapter for the Edge polyfill), which in turn depends on RTCPeerConnection which depends on this.

Would one of those packages be a better place to report this, or are they and traceablepeerconnection already handling this the best way possible until Chrome adds ontrack support? (Even after that happens, it seems to me that some conditional logic would be needed in at least one of these libraries to avoid breaking compatibility with older versions of Chrome.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants