Coder Social home page Coder Social logo

Comments (6)

fippo avatar fippo commented on May 29, 2024 1

Thank you for backing this out @jan-ivar! I agree with the plan to reland we lets still try to get #1123 out

from adapter.

fippo avatar fippo commented on May 29, 2024

@jan-ivar Firefox breaking like this doesn't sound good? Past attempts by Chromium to enforce read-onlyness of attributes (in particular RTCSessionDescription's sdp) turned out to break too much for no gain.

from adapter.

fippo avatar fippo commented on May 29, 2024

Related Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1812346

from adapter.

jan-ivar avatar jan-ivar commented on May 29, 2024

The bug is in adapter.js here:

  const nativeCandidate = new NativeRTCIceCandidate(args);
  const parsedCandidate = SDPUtils.parseCandidate(args.candidate);
 const augmentedCandidate = Object.assign(nativeCandidate, parsedCandidate); // TypeError

TIL the difference between:

  1. assignment to a read-only attribute, which is ignored and doesn't throw, vs.
  2. Object.assign which does: "In case of an error, for example if a property is non-writable, a TypeError is raised".

This fiddle shows the latter throwing in all browsers including Firefox 111+, so unfortunately this shim, which was specific to Firefox, was relying on non-standard behavior of Firefox 110 and earlier.

We'll back out the fix that broke adapter in Firefox 111 beta for now, to give adapter time to fix this, and for all users of adapter to update (which may be a while).

from adapter.

fippo avatar fippo commented on May 29, 2024

The fix is going to say

const nativeCandidate = new NativeRTCIceCandidate(args);
const parsedCandidate = SDPUtils.parseCandidate(args.candidate);
const augmentedCandidate = Object.assign({}, nativeCandidate, parsedCandidate);

right?

Adoption is going to be a problem, there is still a lot of usage on version 7 and not even 8.
You might consider not doing this until you implement attribute parsing, in particular foundation which is what prevents this from happening in Chrome.

from adapter.

jan-ivar avatar jan-ivar commented on May 29, 2024

That would return the wrong type I fear. [Deleted: pilot error since I forgot RTCIceCandidate has a custom toJSON]

Agreed about adoption.

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.