mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-23 02:26:35 +00:00
gstwebrtc-api: Patch webrtc-adapter to fix Safari behaviour
There's currently a Safari-side bug causing webrtc-adapter to be unable to correctly shim the empty-candidate scenario which we're using. This patch is very much a workaround and should be removed as soon as Safari and/or webrtc-adapter fixes this on their side. https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/439 https://github.com/webrtcHacks/adapter/issues/1140 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1377>
This commit is contained in:
parent
16c00ae3f5
commit
436b6d8efb
2 changed files with 16 additions and 1 deletions
|
@ -49,6 +49,7 @@
|
|||
"webpack-dev-server": "4.15.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"patch-package": "8.0.0",
|
||||
"webrtc-adapter": "8.2.3"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -59,6 +60,7 @@
|
|||
"make": "npm run check && npm run build && npm run docs",
|
||||
"test": "mocha --node-env=test --exit",
|
||||
"prepack": "npm run test && npm run make",
|
||||
"start": "webpack serve"
|
||||
"start": "webpack serve",
|
||||
"postinstall": "patch-package"
|
||||
}
|
||||
}
|
||||
|
|
13
net/webrtc/gstwebrtc-api/patches/webrtc-adapter+8.2.3.patch
Normal file
13
net/webrtc/gstwebrtc-api/patches/webrtc-adapter+8.2.3.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/node_modules/webrtc-adapter/src/js/common_shim.js b/node_modules/webrtc-adapter/src/js/common_shim.js
|
||||
index 96d7c8e..063ea64 100644
|
||||
--- a/node_modules/webrtc-adapter/src/js/common_shim.js
|
||||
+++ b/node_modules/webrtc-adapter/src/js/common_shim.js
|
||||
@@ -388,7 +388,7 @@ export function shimAddIceCandidateNullOrEmpty(window, browserDetails) {
|
||||
}
|
||||
const nativeAddIceCandidate =
|
||||
window.RTCPeerConnection.prototype.addIceCandidate;
|
||||
- if (!nativeAddIceCandidate || nativeAddIceCandidate.length === 0) {
|
||||
+ if (!nativeAddIceCandidate) {
|
||||
return;
|
||||
}
|
||||
window.RTCPeerConnection.prototype.addIceCandidate =
|
Loading…
Reference in a new issue