Thank you for providing clear reproduction steps and utilizing the sample application, that makes our life so much easier!
I was able to reproduce what you are seeing. It looks like the root cause of this issue is that once the meeting is joined, the shared audio session will be set to playAndRecord. This will automatically drop the volume of other audio sources. If you check the audio category imediately after calling your code^ in the mainViewController you will see that it is soloAmbient.
NSString *soundFilePath = [NSString stringWithFormat:@"%@/test.m4a",[[NSBundle mainBundle] resourcePath]];
NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath];
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:nil];
player.numberOfLoops = -1;
AVAudioSessionCategory category = [[AVAudioSession sharedInstance] category];
I found this post on stack overflow of how to override the dropping of other audio’s volume while keeping the the category as playAndRecord:
So by adding this code:
NSError *setCategoryErr = nil;
NSError *activationErr = nil;
//Set the general audio session category
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord error: &setCategoryErr];
//Make the default sound route for the session be to use the speaker
UInt32 doChangeDefaultRoute = 1;
AudioSessionSetProperty (kAudioSessionProperty_OverrideCategoryDefaultToSpeaker, sizeof (doChangeDefaultRoute), &doChangeDefaultRoute);
//Activate the customized audio session
[[AVAudioSession sharedInstance] setActive: YES error: &activationErr];
after joining the meeting, I was able to still hear the audio at its original volume along with the audio of the meeting.
Can you give this a try and let me know what happens?