Why is playVideo() not in the code?

Dammit, the code is really tough to access via testing, which is an unfortunate side-effect of writing it without using tests.

One approach to dealing with that is to rewrite the code but use tests to define each new behaviour that is wanted. Another approach is to gradually add tests for more and more things, adjusting things while you go so that things are easier to test.

I think that I’ll go for the second approach there.

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.

1 Like