[4.18] How to change volume of MediaPlayer playback?
I'm trying to implement multiple video playback on my VR application. I don't know how to change the volume for specific separate MediaPlayer in C++. I'm working in UE 4.18.
User can dynamically import certain video from folder and display it as video player in 3D with controls panel: play/ pause/ volume slider. MediaPlayer creation is handled in C++ by wrapping it in my custom UObject-derived class. Previous version of Media Framework allows me to control each video volume by changing it in UMediaSoundWave. Since UMediaSoundWave was replaced/integrated into UMediaSoundComponent i have no idea how to implement volme change properly.
I tried to create my own USoundClass and USoundMix and registering them in FAudioDevice:
then setting MediaPlayer and SoundClass in MediaSoundComponent:
so finally volume change is done like this:
This code seems to not work, I can't hear any volume change as an effect. How is the correct way to make this in new MediaFramework ?
I found out my approach overcomplicated. Instead of using dynamically created
If somone would wonder how to dynamically create
answered Nov 13 '17 at 10:31 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here