eomer
eomer

Reputation: 3584

how change volume in unity video player

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

Answers (1)

Kokosbrood
Kokosbrood

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

Related Questions