Coder Social home page Coder Social logo

RTCPeerConnection.setLocalDescription() without arguments fails on Safari 13.1 (macOS Catalina 10.15.4) with TypeError: Argument 1 ('description') to RTCPeerConnection.setLocalDescription must be an instance of RTCSessionDescription about adapter HOT 9 CLOSED

rhansen avatar rhansen commented on September 28, 2024
RTCPeerConnection.setLocalDescription() without arguments fails on Safari 13.1 (macOS Catalina 10.15.4) with TypeError: Argument 1 ('description') to RTCPeerConnection.setLocalDescription must be an instance of RTCSessionDescription

from adapter.

Comments (9)

jan-ivar avatar jan-ivar commented on September 28, 2024 2

I take it there is no way to reach into the internals and push an arbitrary function onto the operations chain?

@rhansen Unfortunately there isn't.

Would polyfilling it the simple-but-technically-incorrect way be worse than not polyfilling at all? I'm guessing that an imperfect polyfill written by subject matter experts would be better than what amateurs like myself would do.

I've mocked up a PR, if someone wants to volunteer to test it and carry it over the finish line.

from adapter.

jan-ivar avatar jan-ivar commented on September 28, 2024 1

But speaking more narrowly to this issue, pc.setLocalDescription() (without arguments) appears to start working with Safari Tech Preview 14.2 for me.

from adapter.

fippo avatar fippo commented on September 28, 2024 1

published as 8.1.0 on npm. Both gh-pages repos have been updated.

from adapter.

fippo avatar fippo commented on September 28, 2024

tagging @youennf who might know which Safari version this is supported in.
@jan-ivar might have an opinion on polyfilling it (checking RTCPeerConnection.prototype.setLocalDescription.length might work).

i'd not recommend using the parameterless stuff in production.

from adapter.

jan-ivar avatar jan-ivar commented on September 28, 2024

From bug 174656 it doesn't look like Safari supports perfect negotiation yet.

The perfect negotiation pattern aims to solve intermittent failures caused by glare (inherent timing races between two parties) seen in most other WebRTC negotiation patterns. Such failures are typically in the <5% range.

A polyfill would allow sites to write negotiation code with 0% glare on browsers that support perfect negotiation.

A polyfill might marginally improve, but not guarantee 0% glare, on browsers that don't support perfect negotiation natively.

from adapter.

jan-ivar avatar jan-ivar commented on September 28, 2024

It turns out this is pretty hard to polyfill correctly when the operations chain is not empty, since the implicit calls to createOffer/Answer are supposed to happen when SLD comes off the chain, not when it goes on it.

from adapter.

rhansen avatar rhansen commented on September 28, 2024

Looks like support for parameterless setLocalDescription() was added to WebKit in WebKit/WebKit@07a6779, which is in WebKit 610.1.8 (Safari tech preview 104) and later.

from adapter.

rhansen avatar rhansen commented on September 28, 2024

the implicit calls to createOffer/Answer are supposed to happen when SLD comes off the chain, not when it goes on it.

I take it there is no way to reach into the internals and push an arbitrary function onto the operations chain?

Would polyfilling it the simple-but-technically-incorrect way be worse than not polyfilling at all? I'm guessing that an imperfect polyfill written by subject matter experts would be better than what amateurs like myself would do.

from adapter.

kohenkatz avatar kohenkatz commented on September 28, 2024

Looks like support for parameterless setLocalDescription() was added to WebKit in WebKit/WebKit@07a6779, which is in WebKit 610.1.8 (Safari tech preview 104) and later.

As far as I can tell, support for parameterless setLocalDescription() was actually added in WebKit/WebKit@4aacc63 (5 months after the one you linked to). which is in WebKit 611.1.1 and was released in Safari 14.1.

From the commit message there:

Also update setLocalDescription to take no parameters.

from adapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.