Skip to content

Commit

Permalink
fix: Handle invalidate for react-native 0.74+ (#10)
Browse files Browse the repository at this point in the history
* fix: Handle invalidate for react-native 0.74+

React-Native no longer calls onCatalystInstanceDestroy in 0.74+.

* Fix ci
  • Loading branch information
davidliu authored Jun 21, 2024
1 parent c8829cb commit b6f863a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ public String getName() {
return "WebRTCModule";
}

@Override
public void invalidate() {
onCatalystInstanceDestroy();
}

@Override
public void onCatalystInstanceDestroy() {
if (mAudioDeviceModule != null) {
Expand Down
2 changes: 1 addition & 1 deletion examples/GumTestApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"react": "18.2.0",
"react-native": "0.71.4",
"react-native-webrtc": "*"
"@livekit/react-native-webrtc": "*"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down

0 comments on commit b6f863a

Please sign in to comment.