I\'m writing a Chrome extension and I want to detect when a video starts/ends while a user is on youtube.com watching videos. The difference between my situation and other tutor
Shortly after I posted this question I found out an answer. Not using the youtube iframe api, but rather the html5 api. I modified the content script to the following to print a message when the video ends and it works fine.
var vid = $('video').get(0);
vid.addEventListener('ended', function(e) {
console.log('The video ended!');
});