fix(web): set correctly initial volume & playback speed#222
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 recreatingvideoElementwill trigger the same effect inVideoVolumeAndSpeedEffects.Reproducing
Steps to reproduce in the sample (https://kdroidfilter.github.io/ComposeMediaPlayer/sample/):
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.