I'm new to front-end development so maybe this is a stupid question. I'm trying to write a program to control YouTube videos embedded using vanilla JavaScript. I found an example in this Control YouTube video with vanilla javascript link. I noticed the author uses contentWindow.postMessage() to send the command to the iframe.
For example, to play the YouTube video, the code is something like
div.getElementsByTagName("iframe")[0].contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
Where can I find a complete list of "func" (e.g. "playVideo")? I googled using keywords like "postMessage", "iframe", "playVideo", etc but couldn't find any documentation that answers my question.
I want to be able to control the YouTube video more precisely. In addition to playing/pausing the video, I want to be able to skip to a certain timestamp, control the volume, or even output only the left or right sound channel.