-
Notifications
You must be signed in to change notification settings - Fork 22
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
Video/audio tracks not properly closed when the stream is unmounted on iOS. #1236
Comments
I have found that I have success by using the |
Hey @fobos531, thanks for reporting the issue to us. We are looking into it, and we will get back to you soon. 😄 |
Thank you! I've also received reports from my users that even with the |
Hey @fobos531, for the viewer side of the livestream I believe you don't want the camera access at all, right? |
Yes, but I dont want the microphone either. I tried passing the prop for initial disabling of camera and mic to the stream video component - the camera was properly disabled right from the start, but the microphone was still being turned on even though the initial prop was set to off. But for me the bigger issue is when I do not pass the initial prop, and then stop/end/leave the call. Thats when the mic and camera remain being accessed. |
For a host, the Microphone is expected to be on(forever). From the Webrtc 118 version, when audio is muted, the track is not stopped/released every time on mute, but the For Viewer, you can disable the camera and microphone by passing:
to |
For this, please add after
|
Hey @khushal87 Thank you for the tip. While this mostly works, I discovered it doesn't work 100% of the time. For example, I cold-start the app, start the call, end the call and both the camera and microphone are properly stopped. Then I start the call again and end it, and the camera is disabled, but microphone still runs. See screenshot (camera, recently means the camera was properly stopped, while the microphone appears to be running): Then I do that again, and then both are disabled. So it seems to work most of the time, with ocassional deviation from the pattern. Is there anything in GetStream's implementation that would cause this behavior? |
Hey @fobos531, we will give it a look for possibilities that might cause this bug. Thanks for reporting 😄 |
## Goal Adds a parameter to device manager to enable automatically stopping streams when call is left fixes #1236
@santhoshvai I still encounter this on version 0.6.11, when the video call hangs up the green light (camera) stays on. Sometimes instead of the I believe there's a race condition somewhere or there's an error (thus exiting early) preventing the screen to unmount properly. |
this also happens on dogfood example @oliverlaz ^^ device: iPhone 15 Pro Max on iOS 17.4.1 |
video demo of dogfood: VID_20240425_145540_720.mp4 |
hi @efstathiosntonas, thanks for providing your input. We'll check this and get back to you. |
Hey @efstathiosntonas, do you see this issue everytime on our DF app or it occurs sometimes? |
steps:
repeated steps 2 and 3 but I answered the call on iOS, same thing happens. Did it the other way around, iOS called Android, same thing. edit: upon answering the call, the green light turns off for a fraction of the second and then turns on. |
Okay, so after some testing I see this problem for a call from android to iOS but not the other way around. |
@khushal87 I did not kill the apps before testing the other way around so I guess you're correct. |
@khushal87 you're right, tested it on my app and it's only Android -> iOS. When I hang up on Android though I saw an empty screen, for some reason it fails to unmount. In other words, the device being "called" does not unmount the screen on hang up. |
Not able to triage it on our DF app. |
@khushal87 hi, is there any progress in this? I just installed |
Hey @efstathiosntonas, this is already on our task list. We will try to get back on this soon. |
This will be fixed in #1345 |
…ronously (#1345) This PR focuses on removing the `mediaDevicesInitialState` prop from the `StreamCall` component to control the initial state of the camera and mic. Instead, to voluntarily apply the mute status on the camera and mic, you can simply call `call.camera.enable()/call.camera.disable()` for the camera and `call.microphone.enable()/call.microphone.disable()` for the mic. Eg: ``` initialAudioMuted={true} would change as call.microphone.disable(); initialCameraMuted={false) would change as call.camera.enable() ``` You can also apply the functions mentioned above on top of our backend settings. We apply our backend settings through the hook `useApplyDefaultMediaStreamSettings,` which you can override if you have a custom use case or use directly if you just want the default backend settings to be respected. ``` useEffect(() => { call?.camera.disable(); call?.microphone.disable(); }, [call]); ``` This PR fixes the issue pointed out in #1236 as well.
Which package/packages do you use?
@stream-io/video-react-sdk
@stream-io/video-react-native-sdk
@stream-io/video-client
Describe the bug
After a stream is ended/unmounted, the video/audio tracks are still active. This can be observed by seeing that the indicator for camera/microphone on the phone is active (yellow/green indicator light). It seems like for a split second the tracks are really stopped since the indicator turns off, but after a second it seems like they become active again.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After leaving the livestream, the camera/microphone active indicators should immediately stop.
Screenshots
N/A
Version
@stream-io/video-react-native-sdk 0.3.7
React Native
Additional context
This issue does NOT appear on Android. It seems to only affect iOS.
The text was updated successfully, but these errors were encountered: