Comments (6)
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.
@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.
Related Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1812346
from adapter.
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:
- assignment to a read-only attribute, which is ignored and doesn't throw, vs.
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.
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.
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)
- 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 HOT 9
- Direction set properly? HOT 5
- Webrtc HOT 1
- Nice! That's a lot better!
- Firefox sendEncodings shim should support sendEncodings being undefined HOT 1
- Break classes that extend RTCPeerConnection HOT 2
- How to send constant resolution 640x480 HOT 1
- Firefox is missing getCapabilities() on RTCRtpSender/RTCRtpReceiver HOT 7
- Why delete package-lock.json? HOT 1
- problems making a video call HOT 1
- Add support for react-native HOT 5
- Consider puppeteers mochaRunner
- Re-add Firefox stable E2E tests HOT 1
- Remove legacy getStats polyfill
- Remove legacy getDisplayMedia polyfill
- shimAddIceCandidateNullOrEmpty fails on Safari 17.0 HOT 3
- No audio on receiver side after multiple calls to replaceTrack in RTCPeerConnection
- Is there an online testing website based on adapter.js ? HOT 2
- unable to set frame rate on safari HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adapter.