-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat: accept preconfigured PeerConnection as polyfill arg #260
feat: accept preconfigured PeerConnection as polyfill arg #260
Conversation
There are cases where we need to use methods on `PeerConnection` that are not available on `RTCPeerConnection`, but then we wish to pass the `RTCPeerConnection` on to other code for it to use in a polmorphic node/browser way. Add an option to the polyfilled `RTCPeerConnection` to pass a preconfigured `PeerConnection` instance in, instead of always creating one.
Thanks for the PR. |
It's a non standard option, true. It'll only appear as a valid option if you import the polyfill and use it directly. If you use the bundled types from |
As I understood this is a special case for your app. |
The problem is that the If you won't accept an init param, what about returning the The only alternative to have the polyfill here behave the same that browsers do is to copy the whole |
Hello, I thought you didn't need this PR anymore. Could you please create a PR for this? |
Will do! Though do you want to land #324 first as it'll likely cause conflicts.
No problem, I had gone a bit quiet. It's mostly because this PR, #256 and the various linked libdatachannel/libjuice PRs are needed for me to ship the webrtc-direct listener in node.js so it's a bit all-or-nothing. |
No, please don't wait for #324 |
Adds a protected method that can be overidden by extending classes to supply a `PeerConnection` with different configuration. Refs: murat-dogan#260 (comment)
There are cases where we need to use methods on
PeerConnection
that are not available onRTCPeerConnection
, but then we wish to pass theRTCPeerConnection
on to other code for it to use in a polymorphic node/browser way.Add an option to the polyfilled
RTCPeerConnection
to pass a preconfiguredPeerConnection
instance in, instead of always creating one.