To reproduce: https://jsfiddle.net/95oLbw3h/1/
First click inside html, css, or javascript.
Next:
hold ctrl down then press enter
then click play button very fast:
Keep repeating until you are able to reproduce.
Does that help you reproduce?
Keep doing that until it doesnât open when clicking on the play button.
Maybe, before moving onto the tests, we should have understood this, how it works more clearly?
For context from a different post of yours:
Fist instance where initCover
appeared, or was used in the code.
post #60:
or, maybe this post is better?
post #30
or, maybe just being able to reproduce it is better.
It originally looked like this:
videoPlayer.init({
afterPlayerReady: function initCover() {
manageCover.init(function playVideo() {
videoPlayer.play();
});
}
Then this:
function initCover() {
manageCover.init(function playVideo() {
videoPlayer.play();
});
}
videoPlayer.afterPlayerReady = initCover;
videoPlayer.init();
Then improved to this:
function initCover() {
manageCover.init(function playVideo() {
videoPlayer.play();
});
}
videoPlayer.afterPlayerReady = initCover;
In our tests, would it be good to go back to when the javascript looked like this?
Removing changes that werenât needed, or not necessary for what needed to be done.
function init(callback) {
const cover = document.querySelector(".play");
cover.addEventListener("click", coverClickHandler);
cover.addEventListener("afterClick", callback);
}
return {
init
};
}());
Doing that would bring us back to the last working test before working on this:
https://jsfiddle.net/ga1v0mjr/2/
post #2316