I play audio from a webpage using SFSafariViewController and when the app goes to background, the audio stops.
It happens when user blocks the screen as well.
Any ideas how to keep audio playing?
Related
We have functionality for background recording in app. It is working fine when app in background mode but it is stop when we open other app and play video file in other app then audio recording stop to recording sound in it.How can we continue recording even without stop recording when other app play video file.
Thanks
In my app i have UIWebView in which i had give option to user for watch video from video hosting sites(i.e. Youtube, Vimeo, DailyMotion). When I click Home button the app goes to background mode, the video is paused.
I wants to Play sound of that video while app in background mode.
I had implemented same while play local video in AVPlayer. But till now having no luck to achieve this.
I already refereed below stuff:
--> UIWebView: HTML5 audio pauses in iOS 6 when app enters background
--> Is it possible to play video using Avplayer in Background?
If you guys have any solution with this it will be great help.
Is it possible to start audio play when app is in the background?
When my app is in the background , it calls the method to play the sound but AvAudioPlayer doesnt play.
Ive gone through various links on the web regarding this but all I could find is how to continue playing audio when app goes in the background. So does this mean we can't start the audio play in the background?
Thanks in advance :)
I am using AVAudioRecorder for recording while I am recording I press home button and comes to fore ground and checked the status of the AVAudioRecorder (isRecording) is still YES. But when i play the audio it plays only what i recorded before goes to background.
Note: This problem comes only in ios7. It works well in ios6
Have you set the app to allow background recording? Under the Project Capabilities, turn on Background Modes and select Audio and AirPlay.
Be warned, in iOS7, when background recording through AVAudioRecorder is interrupted, the recorded file is closed instead of paused. If a user get a phone call while recording in the background, the audio file will stop recording and cannot be resumed. You will need to start a new audio file and merge them, or use Audio Queues and manage the interruptions yourself.
See this answer for more info: Audio interruption when iOS application is recording in background
So I´ve don all the preliminary steps of setting the audioSession sharedInstance category, and activated playing audio in the background in the info.plist file
However I am using an UIWebView to display YouTube, and even thought background playing is
supported, pressing the home button the audio stops. Is this cause YouTube uses some built in player? cause when I play an video my tab bar controller disappears.
Is there a way of having it continue playing the youtube videos in background?