Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Handheld.PlayFullScreenMovie and volume control

Discussion in 'Android' started by e_v, Mar 24, 2017.

  1. e_v

    e_v

    Joined:
    Jul 14, 2016
    Posts:
    28
    When the player has solved my puzzle, I play a video using Handheld.PlayFullScreenMovie, which pauses Unity during playback and offers no control over the volume of the video. My game itself has separate volume controls for sound effects and music. If my player has turned the volume down or off in the game, the video's music will be an abrupt blast of sound, waking the baby, upsetting the librarian, making the cat jump 7 feet.

    I don't want to put up a dialog, "Play video? Its volume is out of my control. Yes/Cancel" because it would ruin the moment.

    I could play an alternate version of the video without sound, but it will add a few more MB to my project, which I'm trying to avoid.

    I could just not play the video if the volume is turned down, but it makes for a more abrupt and less satisfying ending.

    I'm thinking of doing a compromise--have a small, heavily compressed version of the video with no sound, and play that when the volume is turned down.

    Any other ideas?
     
  2. Lukanitos

    Lukanitos

    Joined:
    Dec 5, 2013
    Posts:
    1
    Hi,

    Did you figure out a solution or got your hand on the volume controls for the video ?

    Im looking into this also and i haven't yet figured out which sound channel unity uses when playing over PlayFullScreenMovie
     
  3. e_v

    e_v

    Joined:
    Jul 14, 2016
    Posts:
    28
    My understanding is that the only control you have over the video is in the three parameters for how it displays, that once you've "launched" it, it's out of Unity's control. You can display controls including a volume slider, but I chose FullScreenMovieControlMode.CancelOnInput because showing playback controls would disrupt the immersive quality of my game. I went with the solution I had proposed (pass a path to a silent version of the movie if the player has all volume turned down).

    But if you find in your research that we do have access to the sound channel for PlayFullScreenMovie, please post it here!