When setting the volume control in the controls array on Plyr initialization, the volume control should be visible in the Plyr controls bar.
When setting the volume control in the controls array on Plyr initialization, the control disappears after a fraction of a second.
Here's a codepen that reproduces. If you comment out the code with custom initialization options and uncomment the default Plyr initialization, you'll see the volume control works fine. In the initial codepen state, the volume control doesn't persist even though it's designated to in the controls array.
https://codepen.io/mg0stisha/pen/VqeaqE
None
https://codepen.io/mg0stisha/pen/VqeaqE
This looks to be similar to #1208, though it says that was fixed in 3.4.5. Wondering if this might be a regression. Thanks for your work!
Update: the volume bar persists _after_ you use the seek bar for the first time. This issue also seems to be on Chrome only, I cannot reproduce on Firefox or Safari on macOS.
This bug also happens on mobile version of Chrome. Setting plyrInstance.currentTime = 0; before starting playback seems to be a temporary workaround.
Although this is a temporary fix, try the following code.
player.on('loadeddata', event => {
player.currentTime = 0;
});
The issue still appears in plyr 3.5.6, chrome 76.0.3809.100.
Although this is a temporary fix, try the following code.
player.on('loadeddata', event => { player.currentTime = 0; });
I love you 1000 times!!
This is still a problem. If anyone find the reasons please tell me so that I can create a pull request.
Chrome Version 78.0.3895.5 (Official Build) dev (64-bit)
We are also experiencing this issue on Windows 10, Ubuntu with Chrome 77.0.3865.90.
The hack fix suggested by @wdl works. Thanks.
Although this is a temporary fix, try the following code.
player.on('loadeddata', event => { player.currentTime = 0; });
This works but changing the quality (or adjusting sources) will seek the video to the beginning.
Strangely, changing quality during playback will fix the volume slider, and modifying the above solution to set currentTime to itself will force a UI refresh without seeking to the beginning.
player.on("loadeddata", _event => { player.currentTime = player.currentTime; });
Plyr 3.5.6, Chrome 77.0.3865.90 on Windows 10
Most helpful comment
Although this is a temporary fix, try the following code.
player.on('loadeddata', event => { player.currentTime = 0; });