Reputation: 3584
I am working on a video player project and I want to add a slider for volume I could not be able to find volume control for video player but audioSource component has for now I did not find the need to use audiosource the audio comes with the video player can I change volume with video player or do I have to link it with an audiosource?
Upvotes: 1
Views: 5442
Reputation: 479
Did you try using SetDirectAudioVolume
? See:https://docs.unity3d.com/ScriptReference/Video.VideoPlayer.SetDirectAudioVolume.html for reference:
SetDirectAudioVolume(ushort trackIndex, float volume)
Upvotes: 3