public class VideoPlayerTest : MonoBehaviour {
public VideoPlayer player;
public VideoClip clip;
public AudioSource audioSource;
// Use this for initialization
void Start () {
player.audioOutputMode = VideoAudioOutputMode.AudioSource;
player.SetTargetAudioSource(0, audioSource);
player.source = VideoSource.VideoClip;
player.clip = clip;
player.Play();
}
}
Using a GameObject configured like this: Unity Editor Inspector With this MP4 file (download and drop into your Assets directory): https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4