Here is the working code with the array at the bottom: https://jsfiddle.net/bwadtsg4/
(function initCover() {
function coverClickHandler() {
videoPlayer.play();
}
const cover = document.querySelector(".play");
cover.addEventListener("click", coverClickHandler);
}());
videoPlayer.init([
"0dgNc5S8cLI",
"mnfmQe8Mv1g",
"CHahce95B1g",
"2VwsvrPFr9w"
]);
Here is the working code where I am trying to place the array at the bottom: https://jsfiddle.net/89Leo0dq/
videoPlayer.init({
afterPlayerReady: function initCover() {
manageCover.init(function playVideo() {
videoPlayer.play();
});
}
});
How do I place the array at the bottom in that code?
And here was as far as I got in my attempt: https://jsfiddle.net/3s2p0bxm/
Where I was able to get up to this part, which is where I got stuck in trying to figure out what to do next in the code.
videoPlayer.init({
afterPlayerReady: function initCover() {
manageCover.init(function playVideo() {
videoPlayer.play();
});
}
});
Is this what you want?
videoPlayer.init({
afterPlayerReady: function initCover() {
manageCover.init(function playVideo() {
videoPlayer.play();
});
}
}, [
"0dgNc5S8cLI",
"mnfmQe8Mv1g",
"CHahce95B1g",
"2VwsvrPFr9w"
]);