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
fix: audio/video stream in Safari by coping attachmediastream
to source in ESM
format
#10912
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nickvergessen
requested review from
Antreesy,
nickvergessen and
SystemKeeper
November 16, 2023 10:10
nickvergessen
added
3. to review
feature: WebRTC 🚡
WebRTC connection between browsers and/or mobile clients
feature: call 📹
Voice and video calls
browser: Safari
bug
high
regression
labels
Nov 16, 2023
SystemKeeper
approved these changes
Nov 16, 2023
Antreesy
approved these changes
Nov 16, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise looks good, all required files are updated.
If it works for Safari, I'm up for it
ShGKme
force-pushed
the
fix/fork-attachmediastream
branch
3 times, most recently
from
November 16, 2023 11:26
3e76399
to
91589c3
Compare
ShGKme
requested review from
nickvergessen
and removed request for
nickvergessen
November 16, 2023 11:32
ShGKme
force-pushed
the
fix/fork-attachmediastream
branch
from
November 16, 2023 11:44
91589c3
to
37fa4d4
Compare
|
ShGKme
changed the title
Fix/fork attachmediastream
fix: audio/video stream in Safari by coping Nov 16, 2023
attachmediastream
to source in ESM
format
Original library provides CJS and AMD versions for Browserify. The CJS version has issue with imported inside webrtc-adapter with undefined `export default` behavior in ESM-CJS interop. AMD version seemed to work but for unknown reason breaks video audio stream in Safari. Signed-off-by: Grigorii K. Shartsev <me@shgk.me> Co-authored-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
ShGKme
force-pushed
the
fix/fork-attachmediastream
branch
from
November 16, 2023 11:47
37fa4d4
to
3c7a908
Compare
nickvergessen
approved these changes
Nov 16, 2023
4 tasks
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3. to review
browser: Safari
bug
feature: call 📹
Voice and video calls
feature: WebRTC 🚡
WebRTC connection between browsers and/or mobile clients
high
regression
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
☑️ Resolves
The original
attachMediaStream
provides CJS and AMD versions to use in RequireJS and Browserify.The CJS version has an issue with imported inside
webrtc-adapter
withexport default
behavior in ESM-CJS interop.webrtc-adapter
defines it as__esModule
: https://npmfs.com/package/webrtc-adapter/8.2.3/dist/adapter_core.js. This is a commonly used by bundlers approach, but it is not a standard (there is no standard, it is a known undefined behavior).But old CJS version
attachMediaStream
doesn't respect__esModule
and importswebrtc-adapter
wrong. We fixed it with a babel plugin in the past.The AMD version seemed to work. But for an unknown reason breaks the audio stream in Safari.
See also: f2b67fe
The solution: making an ESM version of a
attachMediaStream
that useswebrtc-adapter
with a native ESimport
.🏁 Checklist