使用YouTube JS API检索当前视频的TITLE

cop*_*ake 1 javascript youtube youtube-api youtube-javascript-api

我创建了一个带有YouTube Javascript API的YouTube播放器,用于加载我创建的播放列表.

由于视频无铬,因此不会显示控件或视频信息.我希望拉出当前播放视频的标题并将其显示在下面.我可以使用ytplayer.getDuration()和ytplayer.getCurrentTime()等信息来提取当前时间位置和当前视频持续时间等信息.

想知道像"ytplayer.getTitle()"这样的东西是否可能存在但是没有记录?

小智 5

It is possible, for everyone that are still looking for answer of this question there is a javascript function:

player.getVideoData().title
Run Code Online (Sandbox Code Playgroud)