mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-03 02:03:48 +00:00
gstwebrtc-api: Patch 'sdp' to ESM instead of CommonJS
Using non-ESM libs in some environments (e.g. Angular) can prevent some optimizations from taking place. Doesn't hurt to change, considering ESM seems like the current 'correct' way of building things. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2049>
This commit is contained in:
parent
35a238b66f
commit
f22e1f26ca
2 changed files with 19 additions and 4 deletions
|
@ -49,12 +49,12 @@
|
|||
"typescript": "5.7.3",
|
||||
"webpack": "5.88.2",
|
||||
"webpack-cli": "5.1.4",
|
||||
"webpack-dev-server": "4.15.1"
|
||||
"webpack-dev-server": "4.15.1",
|
||||
"jsdoc-tsimport-plugin": "1.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsdoc-tsimport-plugin": "1.0.5",
|
||||
"patch-package": "8.0.0",
|
||||
"webrtc-adapter": "8.2.3"
|
||||
"webrtc-adapter": "8.2.3",
|
||||
"patch-package": "8.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"check": "eslint src",
|
||||
|
|
15
net/webrtc/gstwebrtc-api/patches/sdp+3.2.0.patch
Normal file
15
net/webrtc/gstwebrtc-api/patches/sdp+3.2.0.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
diff --git a/node_modules/sdp/sdp.js b/node_modules/sdp/sdp.js
|
||||
index d0e6488..007570f 100644
|
||||
--- a/node_modules/sdp/sdp.js
|
||||
+++ b/node_modules/sdp/sdp.js
|
||||
@@ -796,7 +796,6 @@ SDPUtils.isValidSDP = function(blob) {
|
||||
return true;
|
||||
};
|
||||
|
||||
-// Expose public methods.
|
||||
-if (typeof module === 'object') {
|
||||
- module.exports = SDPUtils;
|
||||
-}
|
||||
+// Expose public methods (patched for ESM)
|
||||
+export default SDPUtils;
|
||||
+export { SDPUtils };
|
Loading…
Reference in a new issue