polybiusproxy / hxCodec

Haxe library for native video playback on HaxeFlixel and OpenFL.
https://lib.haxe.org/p/hxCodec
Mozilla Public License 2.0
108 stars 70 forks source link

Setting Volume isn't working for me #238

Closed KirbyKid256 closed 1 year ago

KirbyKid256 commented 1 year ago

I'm trying to set the volume of a video playing, but it's always at 100 or 0 if it can't use sound. I don't know if this is an issue with hxCodec or if I'm missing something, but the volume isn't working.

KirbyKid256 commented 1 year ago

So I checked the code, and it's definitally this line of code that's causing it: volume = Std.int(#if FLX_SOUND_SYSTEM ((FlxG.sound.muted || !canUseSound) ? 0 : 1) * #end FlxG.sound.volume * 100); You could add another volume multiplier to change the volume of a specific video where it would be a float.

MAJigsaw77 commented 1 year ago

canUseSound if is false makes the video to not have sound at all duh