Skip to content
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

[Bug]: stream gets stopped when app goes to background state #88

Open
1 of 2 tasks
talhatsk opened this issue Jul 2, 2024 · 7 comments
Open
1 of 2 tasks

[Bug]: stream gets stopped when app goes to background state #88

talhatsk opened this issue Jul 2, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@talhatsk
Copy link

talhatsk commented Jul 2, 2024

Version

v2.0.0

Which operating systems have you used?

  • Android
  • iOS

Environment that reproduces the issue

Oneplus 8T
android 13

Is it reproducible in the example application?

Yes

RTMP Server

Reproduction steps

  1. start the stream
  2. take the app to background
  3. stream gets stopped

Expected result

on going to background state, the stream should not stop

Actual result

the stream gets stopped as soon as user takes the app to background

Additional context

No response

Relevant logs output

No response

@talhatsk talhatsk added the bug Something isn't working label Jul 2, 2024
@ThibaultBee
Copy link
Member

Hi,
It is on purpose.
It is not clear if camera and microphone could be used in background in a foreground service. What is clear is that it is not possible for older Android version.

There are multiple topics on stackoverflow about this: https://stackoverflow.com/questions/67284842/camera2-cameramanager-opencamera-exception-from-time-to-time-on-some-devices

@talhatsk
Copy link
Author

talhatsk commented Jul 3, 2024

Hi, It is on purpose. It is not clear if camera and microphone could be used in background in a foreground service. What is clear is that it is not possible for older Android version.

There are multiple topics on stackoverflow about this: https://stackoverflow.com/questions/67284842/camera2-cameramanager-opencamera-exception-from-time-to-time-on-some-devices

I'm intended to make a Picture in Picture feature for android, for that i guess camera and microphone will work in background. Is there any way to do now?

@ThibaultBee
Copy link
Member

There is no background support for @api.video/react-native-livestream.

@talhatsk
Copy link
Author

talhatsk commented Jul 3, 2024

There is no background support for @api.video/react-native-livestream.

are you planning to do it in future?

@ThibaultBee
Copy link
Member

Maybe. Just not right now.
Are you 100% sure you need background for PiP?

@talhatsk
Copy link
Author

talhatsk commented Jul 3, 2024

Maybe. Just not right now. Are you 100% sure you need background for PiP?

yes when the app is put to background state a PiP should appear showing the stream, that's the requiremnet.

@ThibaultBee
Copy link
Member

Could you provide a sample so we can test this quickly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants