@@ -18,6 +18,9 @@ import com.oney.WebRTCModule.WebRTCModuleOptions
18
18
import org.webrtc.audio.WebRtcAudioTrackHelper
19
19
import kotlin.time.Duration.Companion.milliseconds
20
20
21
+ // NOTE: As of 0.80 react-native new architecture requires all
22
+ // @ReactMethod(isBlockingSynchronousMethod = true)
23
+ // annotated methods to be non-void.
21
24
22
25
class LivekitReactNativeModule (reactContext : ReactApplicationContext ) : ReactContextBaseJavaModule(reactContext) {
23
26
@@ -142,9 +145,10 @@ class LivekitReactNativeModule(reactContext: ReactApplicationContext) : ReactCon
142
145
}
143
146
144
147
@ReactMethod(isBlockingSynchronousMethod = true )
145
- fun deleteVolumeProcessor (reactTag : String , pcId : Int , trackId : String ) {
148
+ fun deleteVolumeProcessor (reactTag : String , pcId : Int , trackId : String ): Boolean {
146
149
audioSinkManager.detachSinkFromTrack(reactTag, pcId, trackId)
147
150
audioSinkManager.unregisterSink(reactTag)
151
+ return true
148
152
}
149
153
150
154
@ReactMethod(isBlockingSynchronousMethod = true )
@@ -171,7 +175,7 @@ class LivekitReactNativeModule(reactContext: ReactApplicationContext) : ReactCon
171
175
}
172
176
173
177
@ReactMethod(isBlockingSynchronousMethod = true )
174
- fun deleteMultibandVolumeProcessor (reactTag : String , pcId : Int , trackId : String ) {
178
+ fun deleteMultibandVolumeProcessor (reactTag : String , pcId : Int , trackId : String ): Boolean {
175
179
val volumeProcessor =
176
180
audioSinkManager.getSink(reactTag) ? : throw IllegalArgumentException (" Can't find volume processor for $reactTag " )
177
181
audioSinkManager.detachSinkFromTrack(volumeProcessor, pcId, trackId)
@@ -182,7 +186,10 @@ class LivekitReactNativeModule(reactContext: ReactApplicationContext) : ReactCon
182
186
multibandVolumeProcessor.release()
183
187
} else {
184
188
Log .w(name, " deleteMultibandVolumeProcessor called, but non-MultibandVolumeProcessor found?!" )
189
+ return false
185
190
}
191
+
192
+ return true
186
193
}
187
194
188
195
@ReactMethod
0 commit comments