Hi,
I’m a beginner with Unity, and I’m trying to create a AR experience using Vuforia. I put in the scene a video with audio. When I test it on the Unity Editor all works well, but there is only one important problem: I can’t ear the audio of the video file.
I try to set the “Audio output mode” setting of the “Video Player” component on “Audio source” before and on “direct” after, always with the “Track 0 [2 ch]” box checked, but it doesn’t work.
How can I do?
Thanks
Mara
To play the Audio on Windows 10, it works with having a audio source. Doesn’t work on Direct mode.
Here are the steps:
- Create an audio source component as global variable:
private AudioSource audioSource;
- Copy the below code in the Start function
audioSource = gameObject.AddComponent<AudioSource>();
video.audioOutputMode = VideoAudioOutputMode.AudioSource;
video.EnableAudioTrack(0, true);
video.SetTargetAudioSource(0, audioSource);
- Then prepare the video. Never prepare the video before setting the audio source.
This should work.