Skip to content

Commit f6bc0a0

Browse files
author
Jay Kim
authored
fix: shim symbol api (#95)
1 parent 8fd60da commit f6bc0a0

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"fastestsmallesttextencoderdecoder": "^1.0.22",
4747
"livekit-client": "^1.8.0",
4848
"promise.allsettled": "^1.0.5",
49-
"react-native-url-polyfill": "^1.3.0"
49+
"react-native-url-polyfill": "^1.3.0",
50+
"well-known-symbols": "^4.0.0"
5051
},
5152
"devDependencies": {
5253
"@babel/core": "^7.20.0",

src/index.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export function registerGlobals() {
1818
fixWebrtcAdapter();
1919
shimPromiseAllSettled();
2020
shimArrayAt();
21+
shimAsyncIterator();
22+
shimIterator();
2123
}
2224
function livekitRegisterGlobals() {
2325
let lkGlobal: LiveKitReactNativeInfo = {
@@ -53,6 +55,16 @@ function shimArrayAt() {
5355
}
5456
}
5557

58+
function shimAsyncIterator() {
59+
var shim = require('well-known-symbols/Symbol.asyncIterator/shim');
60+
shim();
61+
}
62+
63+
function shimIterator() {
64+
var shim = require('well-known-symbols/Symbol.iterator/shim');
65+
shim();
66+
}
67+
5668
export * from './components/VideoView';
5769
export * from './useParticipant';
5870
export * from './useRoom';

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10761,6 +10761,14 @@ webrtc-adapter@^8.1.1:
1076110761
dependencies:
1076210762
sdp "^3.0.2"
1076310763

10764+
well-known-symbols@^4.0.0:
10765+
version "4.0.0"
10766+
resolved "https://registry.yarnpkg.com/well-known-symbols/-/well-known-symbols-4.0.0.tgz#1f880028e11def3d4552fa53fb3e4407405d758e"
10767+
integrity sha512-6HI+8r/vgSkQm5/XO6uY4oerpp6exZUtVQ4g9xg4H77eyY7uNxf5LZRTSGTktPfyI5cOm4O5Qy7Rm0qyMC/+Kw==
10768+
dependencies:
10769+
get-intrinsic "^1.2.0"
10770+
has-symbols "^1.0.3"
10771+
1076410772
whatwg-fetch@^3.0.0:
1076510773
version "3.6.2"
1076610774
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c"

0 commit comments

Comments
 (0)