Setting up single-player tests before adding spinner

There’s nothing wrong with the code working, it’s working as it is supposed to as I understand it.

Because I was not able to see your jsitor examples, I had to follow the instructions to put together the code.

I looked for a code where this was done to a single video code, and those were the instructions I followed here.

This one: post #175

Which I used to make this: https://jsfiddle.net/o17mzajg/

Where the autoplay feature / or player.playVideo();

That I test in here: https://jsitor.com/A2BSNvuBw

But, if I am using that, I now need to provide a link from both the jsfiddle, and jsitor.

So that, the jsfiddle link is used as a backup for when the jsitor code becomes no-longer visible.

In the code there I made the left curtain panel transparent so that we can see the video appear after the button is clicked.

The only difference between that code in the instructions and the one in this post is that, an array is not being used here.

After I did that, I had seen this comment from you.

In the meantime my earlier concerns about the i.j from player.i.j.playerVars in post #78 being a problem occurred. Youtube changed it to i.h instead. I now have a different approach that is more stable and works no matter whether it is j or h or anything else.

In the code I put together player.h is used.

const iframe = player.h;
    iframe.dispatchEvent(events.afterPlayerReady);

    const iframe = player.h;
    const eventHandler = eventHandlers.afterPlayerReady;
    iframe.addEventListener("afterPlayerReady", eventHandler);
  }

I wanted to see if there was a different approach to that.

After that I wanted to add a spinner to it.

Which I found instructions for here: post #96

But those would need to be changed a little because a single video code was not being used there.

1 Like