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

feat: accept preconfigured PeerConnection as polyfill arg #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

achingbrain
Copy link
Contributor

@achingbrain achingbrain commented Jun 12, 2024

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 polymorphic node/browser way.

Add an option to the polyfilled RTCPeerConnection to pass a preconfigured PeerConnection instance in, instead of always creating one.

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.
@murat-dogan
Copy link
Owner

Thanks for the PR.
But I can not see any reference from docs.
https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection

@achingbrain
Copy link
Contributor Author

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 lib.dom.d.ts it'll not be available.

@murat-dogan
Copy link
Owner

As I understood this is a special case for your app.
Since this part is polyfill I am not sure how to continue.

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

Successfully merging this pull request may close these issues.

None yet

2 participants