I am trying to use two different AVQueuePlayer in my application. The first player plays a series of short videos broadcast over the network. The second object plays only one video, but it is much longer. It is also broadcast. I checked that all clips have the correct audio / video synchronization.
I noticed that if I create one AVPlayer object after another one is created, the audio / video synchronization of the second player will be lost. Sound plays between 800 ms - 1500 ms too early.
I tried several things, including adding a delay between clearing the first player and distributing the second player, removing all calls to the AudioSession code, etc. None of this helps. Very often, the sound will be synchronized, but in fact it happens about 1 time in 30 times.
Has anyone else seen the same behavior? Does anyone know how to fix this?
Thanks to everyone who can help!
source share