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

Background Broadcasting #6

Open
brunosiqueira opened this issue Jan 30, 2015 · 1 comment
Open

Background Broadcasting #6

brunosiqueira opened this issue Jan 30, 2015 · 1 comment

Comments

@brunosiqueira
Copy link

Studying the Android Api, I saw that the way to start broadcasting is using an activity.
Is there a way to broadcast from Background? I wanted to broadcast from a service without the preview being showed on the screen.

@OnlyInAmerica
Copy link
Member

Kickflip's CameraEncoder is optimized for sharing resources with a display view, and so it avoids preparing resources until one is passed to setPreviewDisplay. That said, after a view is passed to CameraEncoder you can call onHostActivityPaused() and Kickflip will bypass the 'display frame' step.

You could manage an AVRecorder (or CameraEncoder if you only need video) from a Service, and allow an Activity to pass in a display view for the user to frame the shot, then call onHostActivityPaused() and allow the Activity to finish, while recording continues in the background.

For a quick proof of concept you can power off your screen or minimize the kickflip example app and witness the video stream continue (and display resume when you return to the app).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants