Question

I am using AVFoundation and pressing the home button on my device stops it recording from the front camera. Is there a way for me to keep recording from the front camera even after the home button is pressed? Why does pressing the home button stop me from recording? Thanks

Était-ce utile?

La solution

No. You cannot record video while your app is in the background.

Allowed background tasks:

  • Apps that play audible content to the user while in the background, such as a music player app
  • Apps that record audio content while in the background.
  • Apps that keep users informed of their location at all times, such as a navigation app
  • Apps that support Voice over Internet Protocol (VoIP)
  • Apps that need to download and process new content regularly
  • Apps that receive regular updates from external accessories

Read Implementing Long-Running Background Tasks: https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html#//apple_ref/doc/uid/TP40007072-CH4-SW24

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top