I have created a YouTube player with the YouTube Javascript API that loads up a playlist I have created.
Because the video is chromeless, it does not display controls or video info.
I was hoping to pull the title of the currently playing video and display it underneath. I can pull information such as current time position, and current video duration with things like ytplayer.getDuration() and ytplayer.getCurrentTime().
Wondering if something like “ytplayer.getTitle()” might exist but be undocumented?
You can’t get the title from the ytplayer object, as that’s really just an interface to the player controls. But you could add in a quick call to the video feed (perhaps as a part of the onPlayerReady function, but it could really be anywhere). For example, with jQuery this would only require: