-
-
Notifications
You must be signed in to change notification settings - Fork 634
Add support for publishing in background mode: VideoToolBox now supports background mode #626
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
Comments
Can I see document? |
In background, frames were not encoded due to error:
// invalidate compression session
let realWidth = videoSettings[.width]
videoSettings[.width] = 1
videoSettings[.width] = realWidth
This works for the duration of background task api, which is 30-180 seconds. Would be interested in possible way to continue session for longer in background. |
Thank you feedback. Currently, priority is low. I will close. |
Is your feature request related to a problem? Please describe.
Hi, I am moving my app (SeasonCast) from a custom modified version of LFLiveKit to HashinKit.swift due to it not being updated in 3 years and it's memory leak issues. I would like to have support for streaming while the app is in background mode (I know in the past this was not possible due to VideoToolBox but in recent versions of iOS it works). I got VideoToolBox library to work in the background of LFLiveKit by enabling audio in the background and a minor modification to its equivalence of the H264Encoder.swift class by removing its background observer (https://github.com/LaiFengiOS/LFLiveKit/blob/master/LFLiveKit/coder/LFHardwareVideoEncoder.m). I think it would be possible to do the same thing for this library since it's laid out in a similar matter. I have attempted to modify the code but it seems that the problem preventing it from working in background mode is before H264Encoder.swift and I can't seem to find the reason why.
Describe the solution you'd like
I would like the framework to behave in the same exact manner when background mode - audio is not enabled.
When the app has background mode - audio enabled. It should show the microphone recording icon when in background mode (because the microphone would still be active) and if the user is publishing the microphone should still be streaming but the camera should be muted (last frame).
The text was updated successfully, but these errors were encountered: