Can this function be organized better?

Yes, it was only to move the defaults out of videoPlayer and into managePlayer instead, in order to achieve a beneficial restructuring. It took a bit of time to understand where you were going wrong, but by stepping back to a previous working stage, we were able to look at what you were next trying to achieve and we managed to resolve things in the end.

That is how troubleshooting tends to work. Step backwards until you get back to something that works, letting you look more closely at what’s going wrong with the next step.

1 Like