Camera freeze during phone call - ios

I am build a camera module and I noticed a problem during phone calls, my camera is frozen.
I know there are the two notifications AVCaptureSessionWasInterrupted and AVCaptureSessionInterruptionEnded but I'm not quite sure to handle them so the user can still record or take photos even in a phone call.
So far what has worked for me is to remove the audio device when AVCaptureSessionWasInterrupted is called but then the recorded video is frozen when playing it back.
Any tip would be much appreciated.

Related

WebRTC audio is not working in lock screen using CallKit

I have tried many solutions from here but no one is working. WebRTC is working fine and I get connected status when accepting the call while the device is locked and after the unlock the audio opens and video starts. How could I get only audio when the screen remains locked?
I have enabled RTCAudioSession and disabled it when the call stops.
It's working fine when the device is unlocked the first time and when I lock it back I'm getting the audio. But the first time, when I answer the call from CallKit, it is not working. It only starts working after the device is unlocked.
I don't know the cause of your specific problem, but what I learnt from similar issue while integrating CallKit with WebRTC, you must acquire camera and microphone access only inside the DidActivateAudioSession method of your implementation of the CXProviderDelegate class. Otherwise, you will get weird issues.

Record video inside of iOS app, immediately play and loop

I'm looking for a way for my users to take a video (defaulting to front facing camera, but with the ability to switch) lasting 2 seconds, display that video immediately and have it loop indefinitely (no controls displayed). Essentially mimicking a 2 second gif. I would like to do this in app so they can see the video before posting, and potentially retake. Any ideas? I've found some functionality here: https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/index.html#//apple_ref/c/tdef/MPMovieControlStyle but it doesn't seem to address the entire problem set.
Checkout this guide from Apple:
Using Video

Trying to create an Xcode Objective-C function that records a video capture of my UIView contents and saves to phone

I'm trying to create an Xcode Objective-C function that can be called from a button tap, that will record the contents of a UIView and its subviews (or a fixed section of the screen e.g. 320x320 in the center) and then allow the user to save the video to their iPhone camera roll. I also want to include the audio that is being played by the app at the time of the recording e.g background music and sound effects.
I'm having trouble finding any info on this as their seems to be a lot of people trying to record their running app for external purposes like the app store video preview. I need my video captured within the app, to be used as an app feature.
Does anyone know if this can be done or know a website or tutorial where I can learn what's needed? Thanks
I know this post is two years old, but for anybody who comes along who might need to record their iOS app's screens and save them to the phone's camera roll or even a specific URL, take a look at https://github.com/alskipp/ASScreenRecorder
I've tried it and it works! The frames per second aren't 60 so I don't know how well it would work if you were trying to record an action game, but it's still pretty awesome.
You can't do that with just one function, check that project:
https://github.com/coolstar/RecordMyScreen

How to send information to the Remote-Control (lock screen) in iOS

i'm currently having issues changing track information at the lock screen. I have managed to get playing/pausing from the lock screen, and everything works fine and dandy, but I'm completely lost on how to send the "currently playing" information over to it.
I am using an AVPlayer to play streaming audio from the internet. Does anyone know how to set the artist/track name at the lock screen? Perhaps by sending over the AVPlayerItem? Any help is greatly appreciated!
Thanks!
New in iOS 5, MPNowPlayingInfoCenter.. Let's you send information to the lock screen such as artist info, song info, etc.
Here is the documentation on it

application is crashing while user exits from fullscreen mode in mpmovieplayer

hi folks we do have a video file in our application,every thing is going fine except one,i.e the application crashes when user exits from fullscreen mode while the movie is playing and also when we pause the movie in fullscreen mode and minimize it,the video starts from the beginning i tried searching whether there is any notification available to notify but of no use plz help me out.thx in advance.
atlast after studying a lot about mpmovieplayer class refernece i could find the answer for my question which i had posted yesterday.The reason for that was i was not able to provide all the available notifications i need, now i had mentioned each and every notification for entering into full screen,exit the fullscfreen and also playbackfinished now its working fine.The only problem is when i press the toggle screen it maximizes perfectly and plays from the current playbacktime but that not the case when i minimize the screen the video plays from the begining.

Resources