Skip to content

fix(web): set correctly initial volume & playback speed#222

Merged
kdroidFilter merged 1 commit into
kdroidFilter:masterfrom
vitalir2:master
May 3, 2026
Merged

fix(web): set correctly initial volume & playback speed#222
kdroidFilter merged 1 commit into
kdroidFilter:masterfrom
vitalir2:master

Conversation

@vitalir2
Copy link
Copy Markdown
Contributor

@vitalir2 vitalir2 commented May 2, 2026

Summary

Hello, thank you for the library, it makes things much easier!
While using it in my Kotlin Wasm project I found a bug that a video can't be started as muted, the sound is always there. I digged it up a little and found out that volume (before video file opened) set only on seeking a slider ignoring the case when the video is loaded.
Then I found the same problem with playback speed so I decided to fix them both.

After the changes it's not the case because we're listening to the 'canplay' event inside VideoVolumeAndSpeedEffects. I also removed the change of playback speed inside CORS because recreating videoElement will trigger the same effect in VideoVolumeAndSpeedEffects.

Reproducing

Steps to reproduce in the sample (https://kdroidfilter.github.io/ComposeMediaPlayer/sample/):

  1. Mute audio
  2. Set custom playback speed to 2
  3. Open any file/url

Expected: no sound is playing, the video is playing x2 speed
Actual: sound is playing though volume set to 0, the video is playing in the original speed

Example of use case in a real app — saving video settings between pages like in YouTube: you set muted/speed and for next videos the settings should be applied immediately.

@kdroidFilter kdroidFilter merged commit 64c5c8d into kdroidFilter:master May 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants