volume problem with AVPlayer while using AVAudioSessionPlayAndRecord

When we using AVPlayer to play some audio file,we found the audio volume changes if we using AVAudioSessionPlayAndRecord to start a video or audio live.Is there any extra param need to be set?