Edit: This was a known bug, and was fixed in Unity 2018.1, details can be found here.
I have a .mp4 video, with H264 video encoding and AAC audio encoding.
I'm loading this video using a Video Player node to load it onto a texture, with a seperate audio source for playing the audio.
I initialise my video like so:
_videoPlayer.source = VideoSource.VideoClip;
_videoPlayer.clip = introVideo;
//Set Audio Output to AudioSource
_videoPlayer.audioOutputMode = VideoAudioOutputMode.AudioSource;
//Assign the Audio from Video to AudioSource to be played
_videoPlayer.EnableAudioTrack(0, true);
_videoPlayer.SetTargetAudioSource(0,_audio);
_audio.volume = 1f;
_videoPlayer.Prepare();
while (!_videoPlayer.isPrepared)
{
yield return null;
}
_videoPlayer.Play();
This method works fine when running on a Mac. However, when I create a build and deploy it to my iPad, the audio is jumpy, and will finish significantly ahead of the video.
Is there something I can do to stop the audio from skipping?