Search Unity

Audio Audio Mixer to control Video Player's audio

Discussion in 'Audio & Video' started by lostinsidevr, Jan 27, 2019.

  1. lostinsidevr

    lostinsidevr

    Joined:
    Dec 2, 2018
    Posts:
    2
    HI,

    Does anyone know how to connect the video player's audio to the audio mixer? I've created a video player with play, pause and a video scrubber. I just can't figure out how to add a volume slider to the video player. thanks.
     
  2. Docaroo

    Docaroo

    Joined:
    Nov 7, 2017
    Posts:
    82
    In the Video Player object set the "Audio Output Mode" to be an Audiosource object in the scene. The audio source shouldn't have a clip attached - but the audio source itself can be sent to a Mixer Group and you can control the audio there too.

    upload_2019-1-30_17-31-2.png
     
    Marc-Saubion and AlexTheOutsider like this.
  3. true_warlock

    true_warlock

    Joined:
    Aug 2, 2019
    Posts:
    60
    This would be fine if a video clip didn't have embedded audio as is often the case with such as MP4 files. If I understand the question, its similar to mine. Where in the video player script do we edit it so we can access its volume slider? For example, if one create an empty game object and places the Video player on that, and then creates a button for pause or play, you can drag the Empty with the VideoPlayer into the open slot and then use the dropdown, Videoplayer and then find Pause(), or Play(). However, there isn't anything in there that simply says Volume().