Promise syntax for RTCPeerConnection#createOffer
See original GitHub issueHi there,
I’ve been experimenting with Safari Technology Preview R34 and I’m getting an error:
Unhandled Promise Rejection: TypeError: Argument 1 ('options') to RTCPeerConnection.createOffer must be a dictionary
Looks like the currently used pc.createOffer(successCallback, failureCallback, [options])
is deprecated, and the pc.createOffer([options])
should be used instead:
In older code and documentation, you may see a callback-based version of this function. This has been deprecated and its use is strongly discouraged. You should update any existing code to use the Promise-based version of createOffer() instead.
What are the plans for supporting this new syntax? I could make a new pull request with the fix, but I’m worried it would cause issues with older browsers.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (4 by maintainers)
I suggest waiting for the actual Safari release, as technology previews are extremely likely to change.
Hopefully Safari implements callbacks, else many existing applications are going to break.
That’s right.