diff --git a/.changeset/six-rats-dress.md b/.changeset/six-rats-dress.md new file mode 100644 index 0000000..6257b06 --- /dev/null +++ b/.changeset/six-rats-dress.md @@ -0,0 +1,5 @@ +--- +'@livekit/react-native': patch +--- + +Additional fix for DOMException polyfil diff --git a/src/index.tsx b/src/index.tsx index 65af20b..f7c42ef 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,7 +1,10 @@ +// Automatic polyfills, keep these at the top. import 'well-known-symbols/Symbol.asyncIterator/auto'; import 'well-known-symbols/Symbol.iterator/auto'; -import './polyfills/MediaRecorderShim'; import './polyfills/DOMException'; +// Caution: This has a transitive import of livekit-client, keep last. +import './polyfills/MediaRecorderShim'; + import { registerGlobals as webrtcRegisterGlobals } from '@livekit/react-native-webrtc'; import { setupURLPolyfill } from 'react-native-url-polyfill'; import './polyfills/EncoderDecoderTogether.min.js'; diff --git a/src/polyfills/MediaRecorderShim.ts b/src/polyfills/MediaRecorderShim.ts index 8dafb6b..0b0af7c 100644 --- a/src/polyfills/MediaRecorderShim.ts +++ b/src/polyfills/MediaRecorderShim.ts @@ -1,3 +1,6 @@ +/** + * Note: This shim has a transitive import of livekit-client. + */ import { MediaRecorder } from "../audio/MediaRecorder"; function shimMediaRecorder() {