Closed bman46 closed 2 years ago
Here is a video recording of the issue: Youtube Video
I have the same issue. i tried with this versions:
and not worked.
I'm also having this issue.
Thank you for your help in documenting this issue. It seems to be occurring when the video player is initialized twice.
Try removing the data-setup=“{}”
property from your video component and initalizing the video player with:
videojs("video_1", {}, function() {
var player = this;
player.controlBar.addChild('QualitySelector');
});
@izkmdz Is there an alternative option instead of removing data-setup
? I use that for other settings as well and cant remove it.
Hello @bman46, the issue seems to happen when using both data-setup
and videojs('my-player')
to initialize the video player twice. You should still be able to pass in properties to the videojs()
function as you would do with data-setup
.
For example,
data-setup='{"fluid": true, "controls": true}'
will accomplish the same as
var options = {
fluid: true,
controls: true
};
videojs("video_1", options, function() {
var player = this;
player.controlBar.addChild('QualitySelector');
});
Alternatively, you can still use the data-setup
attribute without the side effects of calling videojs()
. Please see the videoJS documentation for ways to access the reference to the initialized video player which you can then use to call player.controlBar.addChild('QualitySelector');
.
https://docs.videojs.com/tutorial-setup.html
Thanks!
Ok, thanks for your help @izkmdz. That resolves the issue!
Description
When attempting to switch qualities, the selector will occasionally refuse to change the video source to the new quality. The quality selected by the user remains selected in the menu however the player never switches to the new quality. No errors are thrown in the console when this happens. I have tried this on my windows 10 desktop PC and my Mac in chrome both have this issue.
Steps to reproduce
This issue appears to happen 'randomly' although it occurs more often than not.
Results
Expected: The video will change qualities as indicated by the player buffering and the network stream showing the traffic from a new source. Actual: The video player may or may not change the video quality. Errors: No errors are shown in the console.
Additional Information
The codepen above uses VideoJS version 6.1.0 but I have tested it in my own application with VideoJS version 7.10.2. Chrome version: 88.0.4324.182