MV Control Movie Volume

Hello! I recently noticed that the movies in my game summoned by the "Play Movie" commant stay at the same volume regardless of what sound settings I have set and would like to take care of that easily without having to re-export all of my cutscenes used.

I unsurprisingly can't find any plugins that support MV because playing movies in these games is really niche anyway, but I think there are plenty of people who would also appreciate having a plugin like this for the MV engine. <3
Felt cute, may delete later 😉


Pretty easy to use, you can set the default video volume in the plugin parameters to be lower for all videos played.

You can also use a plugin command

Code:
 X_VideoVolume Set 50 // Will set volume to 50%

 X_VideoVolume Set 0 // Will mute any video played

When using the plugin command the video volume will revert back to the default video volume as set in the plugin parameters once the video has finished playing.

[Snipped old code]

I'ts now available for MV and MZ, instead of a plugin parameter or being restricted to plugin commands I now added an option to the options window. Uploaded to itch for easier access for everyone!

Yo, I just downloaded the MV plugin for this and I'm not sure if it's working properly. I'm not seeing anything new for it in the options and the plugin commands aren't changing the volume either. Not sure if it's because there's other plugins (which there are plenty of in my game) I have that are conflicting with this or what, but I'd appreciate some help cuz this is exactly what I'd want to add.

Felt cute, may delete later 😉


Pretty easy to use, you can set the default video volume in the plugin parameters to be lower for all videos played.

You can also use a plugin command

Code:
 X_VideoVolume Set 50 // Will set volume to 50%

 X_VideoVolume Set 0 // Will mute any video played

When using the plugin command the video volume will revert back to the default video volume as set in the plugin parameters once the video has finished playing.

[Snipped old code]

I'ts now available for MV and MZ, instead of a plugin parameter or being restricted to plugin commands I now added an option to the options window. Uploaded to itch for easier access for everyone!


imagesd.png
hmm I can't be sure what the issue is, you will have to go through each of your plugins that change the options menu and see if you can find the culprit. You may even have to slowly disable every plugin if that doesen't work.

Let me know if you find which plugin it is and If it's not obfusucated I can work on a patch asap.
I test it to be sure in a test project and clean, neither of them is showing.
also there is this.video.Volume that is set once instead of this._videoVolume
that is used more often.

changing all of them still wont show, not sure either too.
(I tested it in 1.6.1 and 1.6.2 as both don't work) not exactly sure.
Yea you're right, there is something wrong with the version uploaded to itch. My process for uploading to itch is automated and it's omitting one of my utility libraries when it builds my plugin.

Sorry about that guys I'll have a fix up here shortly.

Edit: Which means the MZ version is probably broken too. I really need to add some tests to ensure things build right and fail to upload if they don't pass

Edit Edit: A new Beta build is uploaded, let me know if that one is working for you, it appears to be working for me.
I test it to be sure in a test project and clean, neither of them is showing.
also there is this.video.Volume that is set once instead of this._videoVolume
that is used more often.

changing all of them still wont show, not sure either too.
(I tested it in 1.6.1 and 1.6.2 as both don't work) not exactly sure.
some other plugins might be broken too, you might want to check that too.
just to be sure everything is working, as X_Labels didn't work too for booleans.
as one had it with X_Chapter crashes, so I don't know about the autoed things.
but just a small feedback 🙂

Edit:
on quick test, it does show, but I don't get the "this._video.volume"
but as I don't use video's, I cannot test if it works, but the options does show 🙂

nice job fixing it ^^
Yea I've been slowly going over most of the plugins and they "appear" to be fine, they do include the neccesary utilities and methods. I have been working on adding a warning system to my automated tool that ensures the correct packages are installed before building them, that way it fails and does not upload if they're not there.

As for the this._video.volume, that is specifically a default MV property in Graphics, it's the video element, it's the only time I use it because its the only time I actually adjust the volume (when the video is played). AudioManager.videoVolume is what I change through plugin commands and the options window, then when a video is played it gets set to the AudioManager.videoVolume.
thank you for the explanation 🙂
I hope it does work for the OP as well for his needs, and for others to use.
Hello! I recently noticed that the movies in my game summoned by the "Play Movie" commant stay at the same volume regardless of what sound settings I have set and would like to take care of that easily without having to re-export all of my cutscenes used.

I unsurprisingly can't find any plugins that support MV because playing movies in these games is really niche anyway, but I think there are plenty of people who would also appreciate having a plugin like this for the MV engine. <3
Assuming you just want to deal directly with a video and dont need the plugin, there is a function to set the volume for videos in MV's corescripts:
JavaScript:
/**
 * Sets volume of a video.
 *
 * @static
 * @method setVideoVolume
 * @param {Number} value
 */
Graphics.setVideoVolume = function(value) {
    this._videoVolume = value;
    if (this._video) {
        this._video.volume = this._videoVolume;
    }
};

The value is a percentage so use decimals to get the volume you want: 1 is 100% and .2 is 20%.

Use the script call BEFORE you use the "Play Movie" event command:
JavaScript:
Graphics.setVideoVolume(0.2)

It might look something like this in your event:
Code:
◇Script : Graphics.setVideoVolume(0.2)
◇Play Movie : MovieName
Unfortunetly that won't work, it's actually a bug on MV's part. Whenever a video elements src is changed the volume is set back to 1 (100%), and when MV calls the _playVideo method, it changes source on the video element but forgets to change the volume, so unless you can call the method while the video is playing it will have no effect.
Unfortunetly that won't work, it's actually a bug on MV's part. Whenever a video elements src is changed the volume is set back to 1 (100%), and when MV calls the _playVideo method, it changes source on the video element but forgets to change the volume, so unless you can call the method while the video is playing it will have no effect.
Interesting, it works fine on my end, currently, but that doesn't mean that it will be the same or consistent with the user so I wouldn't count on it as you stated.

You could load the video first and then alter the volume from there I suppose, but at that point, the plugin will work better than a mess of scripts and checks.
Interesting, it works fine on my end, currently,
hmm, now I'm wondering if I'm mis-remembering, I swear changing src changed volume, now this problem wasn't in MV it was just general HTML development, curious. Well, if it works for you then I must be wrong.
Yea you're right, there is something wrong with the version uploaded to itch. My process for uploading to itch is automated and it's omitting one of my utility libraries when it builds my plugin.

Sorry about that guys I'll have a fix up here shortly.

Edit: Which means the MZ version is probably broken too. I really need to add some tests to ensure things build right and fail to upload if they don't pass

Edit Edit: A new Beta build is uploaded, let me know if that one is working for you, it appears to be working for me.
Just downloaded the beta, plugin commands are working! Thanks a lot for getting all that cleared up! Also, for anybody who uses an ungodly amount of plugins for your options menu, you'll want to scroll all the way down because you might not initially see the new options until doing so. RPGM devs really should have added a bar or some indicator for that to save me the headache and confusion.

Also for anyone here my pronouns are she/her now (yippiee)

Original thread: https://forums.rpgmakerweb.com/threads/control-movie-volume.170808/