I saw a note that this address http://developer.apple.com/library/ios/#qa/qa1668/_index.html
Note: If you disable the video tracks in the movie, or detach the AVPlayerLayer from its associated AVPlayer it will allow the movie audio to continue playing in the background. However, these changes must be in effect before the application is actually switched to the background.
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
[self becomeFirstResponder];
[[AVAudioSession sharedInstance] setDelegate: self];
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance] setActive: YES error: nil];
AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:[NSURL fileURLWithPath:AnUrl]];
AVPlayer *avPlayer = [AVPlayer playerWithPlayerItem:playerItem];
AVPlayerLayer *avPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:avPlayer];
avPlayerLayer.frame = self.view.layer.bounds;
UIView *newView = [[UIView alloc] initWithFrame:self.view.bounds];
[newView.layer addSublayer:avPlayerLayer];
[self.view addSubview:newView];
[avPlayer play];
This program works. But in the background, the sound is cut off. I want to continue to play the background only sound. How I detach between AVPlayerLayer from AVPlayer?