Skip to main content
Y
17d ago

How to change volume on artboard on Flutter

Hi.

We are playing an animation with audio in flutter. I tried adjusting the audio volume, but I don't know how to change it.

For android, https://github.com/rive-app/rive-android/blob/98379f13816dfe5bcd2d6a87a9c92dbb64baa61f/kotlin/src/main/java/app/rive/runtime/kotlin/RiveAnimationView.kt#L684-L688,

https://github.com/rive-app/rive-ios/blob/d01fbca3b6b82caaf54f1222b5872233df8930a9/Source/RiveModel.swift#L36-L50 for iOS,

https://github.com/rive-app/rive-wasm/blob/b074534e72df0f7982ea8df46df61c8c093600ec/js/src/rive.ts#L2882-L2894 for js, but we can't find a similar API for flutter. How can we change audio volume in Flutter?

Thanks in advance for your help! Any tips or examples would be greatly appreciated.

2 replies
Y
16d ago

Unfortunately, setting the volume at runtime isn't currently supported in Flutter. An alternative solution would be to fire a General event from Rive and manage the audio playback in Flutter.

Y
16d ago

Thank you for your replying.

We would like to try handling the audio event.