Replicating how video loads to code that uses 3 videos

Do you see how the video loads in this code?

https://jsitor.com/hSe8ENAJG

It starts right away?

You click on it and it starts right away?

It’s not using autoplay in the code, it’s turned off.

autoplay: 0,

How would I implement that same exact thing with this code?

Either this one: https://jsitor.com/LH8A3zpZxC

const videoPlayer = (function makeVideoPlayer() {
  "use strict";
  const players = [];
  let playerVars = {};

or this one: https://jsitor.com/CAB8i0kq6t

const videoPlayer = (function makeVideoPlayer() {
  "use strict";
  const players = [];
  let playerVars = {};
  let player = null;

I don’t know how to implement that same thing in the code that uses more than 1 player.

I guess I’m confused about what you are trying to do, here.

Do you see how the video loads in this code?

Untitled - JSitor

It starts right away?

You click on it and it starts right away?

It’s not using autoplay in the code, it’s turned off.

I don’t understand. Is this your code or someone else’s? Are you saying that that is the behavior you want or is it behavior that you don’t want.

And if you want your 3 player version to start on click, why not:

opts.autoplay = 1;
1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.