Open Joostan opened 8 years ago
Did you find an answer to your question? We are trying to find a way to pass a Video Name vs. the Video URL into the event label. using the API might be a workaround.
@janker67, try the getVideoData
method, it returns the author
, title
and video_id
:
window.onYouTubeIframeAPIReady = function() {
var player = new YT.Player('player', {
...
'events': {
'onStateChange': function(event) {
var data = event.target.getVideoData();
console.log(data.title);
}
}
})
};
Does this mean i can use the: YouTube IFrame Player API?
i.e.
Thanks