background-music

Game music does not resume when the player returns to the game after turning off iPhone/iPod music

我们两清 提交于 2020-01-15 14:49:19
问题 I want to be able to allow players to listen to their iPod/iPhone music while playing the game. I use use the following to enable that: -(void)applicationWillResignActive:(UIApplication *)application { [[CCDirector sharedDirector] pause]; [[CDAudioManager sharedManager] setResignBehavior:kAMRBStopPlay autoHandle:YES]; } This pauses the background music and allows the sound effects to play. So far works perfectly. But the problem is, when the user goes out of the game, stops the iPod/iPhone

duckOthers Audio Session Interrupted by Remote Push Notification

半世苍凉 提交于 2020-01-15 10:28:18
问题 I have a workout app that plays short clips of sound every couple of seconds. I have background music enabled so that music from other apps can be played while working out. The problem arises when I get a remote push notification (in my case, Slack) that has a sound, which somehow cancels out my duckingOther audio session and the music from other apps becomes loud again. Question - How do I reset my duckingOthers audiosession when the user gets this type of interruption? I set the audio

How can I control Background Music of other Apps in Swift?

十年热恋 提交于 2020-01-15 10:25:08
问题 First sorry for my English because I'm French. I work on a connected object which send data to my app to start, pause, start the next music or the precedent and to augment the volume. My application has to execute these actions on any music emitted by the iPhone. For example, if I listen to music in Spotify or Deezer, the app has to control it. I don't know how I can do this in Swift. Just I really think that work with AVAudioSession . 回答1: I'm not sure what you're asking about, but I think

Playing BG Music Across Activities in Android

左心房为你撑大大i 提交于 2020-01-08 16:56:47
问题 Hello! First time to ask a question here at stackoverflow. Exciting! Haha. We're developing an Android game and we play some background music for our intro (we have an Intro Activity) but we want it to continue playing to the next Activity, and perhaps be able to stop or play the music again from anywhere within the application. What we're doing at the moment is play the bgm using MediaPlayer at our Intro Activity. However, we stop the music as soon as the user leaves that Activity. Do we

Playing BG Music Across Activities in Android

你说的曾经没有我的故事 提交于 2020-01-08 16:56:29
问题 Hello! First time to ask a question here at stackoverflow. Exciting! Haha. We're developing an Android game and we play some background music for our intro (we have an Intro Activity) but we want it to continue playing to the next Activity, and perhaps be able to stop or play the music again from anywhere within the application. What we're doing at the moment is play the bgm using MediaPlayer at our Intro Activity. However, we stop the music as soon as the user leaves that Activity. Do we

background device music gets stopped as app starts ios

 ̄綄美尐妖づ 提交于 2020-01-03 16:49:29
问题 I am playing music in iphone and when I run my application it should not stop background device music and should stop its own music instead background music is getting stop. I want to do same as candy crush app. What should I do to resolve this? Please help me var isOtherAudioPlaying = AVAudioSession.sharedInstance().otherAudioPlaying println("isOtherAudioPlaying>>> \(isOtherAudioPlaying)") if(isOtherAudioPlaying == false) { audioPlayer1!.play() } 回答1: Since the default is

How to set the title when playing music with remove control on iPhone?

无人久伴 提交于 2019-12-31 04:12:32
问题 I'm working on a radio app, which supports playing music in background. But i get stuck in how to set the title of music to remove control. The difference between my app and "Music" is as following: What i should do to make my app display the title of a music like "Music" do? Thanks! 回答1: You can change the text of the now playing label by calling the MPNowPlayingInfoCenter, this will also allow you to modify the song name, album, artist, and album artwork on the lock screen. #import

MPMoviePlayerViewController, playing video's sound in background

余生长醉 提交于 2019-12-23 06:13:05
问题 I'm playing the video stream with MPMoviePlayerViewController . In my app's info.plist I have set UIBackgroundModes to audio . When I press home button while playing video playback is paused, after going back to application playback continues again. It works out of the box without having to change something. But in some applications (e.g. Jasmine) when I press Home button video's sound playing is continued in background. So I have 2 questions: 1) What's the magic? How to play video's sound in

MPMoviePlayerViewController, playing video's sound in background

独自空忆成欢 提交于 2019-12-23 06:12:50
问题 I'm playing the video stream with MPMoviePlayerViewController . In my app's info.plist I have set UIBackgroundModes to audio . When I press home button while playing video playback is paused, after going back to application playback continues again. It works out of the box without having to change something. But in some applications (e.g. Jasmine) when I press Home button video's sound playing is continued in background. So I have 2 questions: 1) What's the magic? How to play video's sound in

How to get music to play in Delphi 7?

心不动则不痛 提交于 2019-12-22 08:36:28
问题 I need to get music to play in the background in the start of the program in the OnFormActivate event for my program. I have the song I want to use but I dont know what command Delphi needs to use in order to start playing that song. Thanks for you help guys :) 回答1: Use the TMediaPlayer component, it's on the System tab of the component palette. procedure TForm1.FormActivate(Sender: TObject); begin MediaPlayer1.FileName := '<fill in>.mp3'; MediaPlayer1.Open; MediaPlayer1.Play; end; Set the