Skip to content

feat: move audio route manager inside SDK #1840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6cb9ced
feat: ios audio switch
santhoshvai Jun 18, 2025
caf3e7c
move the main thread stuff to utils method
santhoshvai Jun 23, 2025
a7edeac
add android device listing method
santhoshvai Jun 25, 2025
b3e0987
init android module
santhoshvai Jun 27, 2025
fc7b3f8
remove existing in call manager
santhoshvai Jun 27, 2025
845fdc8
remove testing code
santhoshvai Jun 30, 2025
e48084c
add android switching
santhoshvai Jun 30, 2025
2e3f356
fix: do not show all bt devices on android 11 and below
santhoshvai Jul 2, 2025
5993f27
reformatting of files
santhoshvai Jul 3, 2025
0995cba
wip: mute and unmute android
santhoshvai Jul 8, 2025
37cc418
Merge branch 'main' into audio-sdk-impl
santhoshvai Jul 24, 2025
2ba7caf
wip audio modes
santhoshvai Jul 25, 2025
c3c0cb5
Merge branch 'main' into audio-sdk-impl
santhoshvai Jul 28, 2025
fabe824
minor: removal of unused refs
santhoshvai Jul 28, 2025
0deb81e
android v1
santhoshvai Jul 31, 2025
f327a8b
Merge branch 'main' into audio-sdk-impl
santhoshvai Aug 4, 2025
278c5a4
fix compilatior error
santhoshvai Aug 4, 2025
e4012d7
Merge branch 'main' into audio-sdk-impl
santhoshvai Aug 6, 2025
141a9df
fix: listener creation before js bridge being ready
santhoshvai Aug 6, 2025
26773fd
chore: best to not create listener before js bridge being ready
santhoshvai Aug 6, 2025
51f13cb
Merge branch 'main' into audio-sdk-impl
santhoshvai Aug 7, 2025
9837612
feat: add iOS support
santhoshvai Aug 7, 2025
5764fec
fix: viewer livestream issues
santhoshvai Aug 8, 2025
c8fcd6b
add incallmanager to livestream
santhoshvai Aug 8, 2025
8736323
wip ios
santhoshvai Aug 8, 2025
c8e35d8
fix: dimensions in live stream
santhoshvai Aug 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,19 @@ import android.util.Base64
import android.util.Log
import com.facebook.react.bridge.Promise
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactContext
import com.facebook.react.bridge.ReactContextBaseJavaModule
import com.facebook.react.bridge.ReactMethod
import com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter
import com.oney.WebRTCModule.WebRTCModule
import com.oney.WebRTCModule.WebRTCView
import com.streamvideo.reactnative.callmanager.InCallManagerModule
import com.streamvideo.reactnative.audio.AudioDeviceManager
import com.streamvideo.reactnative.util.CallAlivePermissionsHelper
import com.streamvideo.reactnative.util.CallAliveServiceChecker
import com.streamvideo.reactnative.util.PiPHelper
import com.streamvideo.reactnative.util.RingtoneUtil
import com.streamvideo.reactnative.util.YuvFrame
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import org.webrtc.VideoSink
import org.webrtc.VideoTrack
Expand All @@ -41,6 +40,7 @@ class StreamVideoReactNativeModule(reactContext: ReactApplicationContext) :

private var thermalStatusListener: PowerManager.OnThermalStatusChangedListener? = null


override fun initialize() {
super.initialize()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Expand All @@ -52,6 +52,7 @@ class StreamVideoReactNativeModule(reactContext: ReactApplicationContext) :
reactApplicationContext.registerReceiver(powerReceiver, filter)
}


@ReactMethod
fun getDefaultRingtoneUrl(promise: Promise) {
val defaultRingtoneUri: Uri? =
Expand Down Expand Up @@ -101,6 +102,15 @@ class StreamVideoReactNativeModule(reactContext: ReactApplicationContext) :
fun removeListeners(count: Int) {
}

// This method was removed upstream in react-native 0.74+, replaced with invalidate
// We will leave this stub here for older react-native versions compatibility
// ...but it will just delegate to the new invalidate method
@Deprecated("Deprecated in Java", ReplaceWith("invalidate()"))
@Suppress("removal")
override fun onCatalystInstanceDestroy() {
invalidate()
}

override fun invalidate() {
StreamVideoReactNative.clearPipListeners()
reactApplicationContext.unregisterReceiver(powerReceiver)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import com.facebook.react.ReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ViewManager
import com.streamvideo.reactnative.callmanager.InCallManagerModule


class StreamVideoReactNativePackage : ReactPackage {
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
return listOf(StreamVideoReactNativeModule(reactContext))
return listOf(StreamVideoReactNativeModule(reactContext), InCallManagerModule(reactContext))
}

override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
Expand Down
Loading
Loading