Flutter Just Audio background Package - flutter

When play any song then close the app with background playing after that start the app then recent playing song activity show, this good but i wanna that when start the app then app reload, how's possible?

Just audio dont work in background use this just audio background or audio_service is too much advanced or audio player ;
dont forget to add background mode in Xcode :
Hope it work for you ; Good luck

Related

play loop ringtone in background -Flutter iOS-

I want the audio service to play a custom ringtone that loops when I get a notification on iOS or Android. The sound worked flawlessly in both the background and foreground on Android, as well as in the foreground but not in the background on iOS.
I activated the background mode in iOS (background sound, fetch background notifications).
i tried using the plugins such as : audio_service , audio_manager( audio manager shows audio bar in notification drawer - i want to hide that audio bar - ).
So, any ideas or solutions for this problem?
thanks.

Keep video playing when app goes to the background and show player controller in the notification

Want this feature in flutter (android/IOS)
I want to keep the video playing when an app goes to the background and shows a player controller in the notification.
Is this possible?
You can try this library https://pub.dev/packages/just_audio with the latest version 0.9.21. It's quite easy to configure though some features are still experimental e.g Simultaneous downloading+caching, Background play which are here Experimental features. Overall it works for me.

How to get AirPlay from UIWebView to continue playback when app is backgrounded *without* setting AVAudioSession category to Playback?

I've been attempting to make this work for quite a while now:
My app has the potential to play videos of Youtube from within UIWebView. The user could want to use AirPlay for this. When AirPlay is on, the device could go to sleep and normally video stops playing moments after that happens. As advised in other posts, I set the AVAudioSession category to the Playback one and it works - AirPlay continues even when the device display goes to sleep.
However, this has a side-effect; if the user has activated the app while music playback is on in the background, setting the app's audio session category to Playback causes the playing music to stop and this is definitely annoying.
Ideally, I want to set the AVAudioSession category when playback of Video starts, not when my App is activated - but I've not seen any central or UIWebview notification / delegate method to determine this.
I've got a hackish workaround for iPhone where the UIWebview hosted video player always loads full screen modal and thus can be determined. But my app is Universal and on iPad the video starts inline; I can't figure out a way to know when Video playback is going to happen. This is exactly the point when the audio category should be switched to Playback - it will actually help users who want background music playing only until video starts up.
I don't want to fool around with adding Javascript events on to Video tags inside the UIWebView - that seems too fragile to me.
Is it possible to observe any AVFoundation notifications that trigger for the UIWebView video playback? Or anyone know of any other way to determine if video playback will start / has started?

Play audio in background

I want my app will play music when she is in the background too,
there is any way to do it? i try to use apple documentation but it didn't work.
it is possible that because i am now using the avplayer i cant play audio in background?
i play the music with
ExtAudioFileSeek(mExtAFRef, finalFrames);
I think playing audio in background is possible only for streaming audio. For normal audio we can only play when screen is locked.
You should look at documentation of using background tasks like:
http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html
and specially the:
http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH5-SW14

Play video's audio track when enter background?

I'm using mpmovieplayer to play video on ios 4, and I want to keep the audio playing when my app enter background, but it doesn't work. I thing it's because video player use GPU to render video on screen and this is not allowed by apple when app enter background.
So, is there any way to do that? There are some apps have this feature, and they seems just use the mpmovieplayer, is it work by detach the video layer of mpmovieplayer?
Thanks for your answer!
You'll need to have separate audio file and video file for this. Play both when you need to play video and just the audio when app gets into background.