I wrote a simple chrome extension that should display an alert message whenever a html5 video starts playing on a website being visited.
It's not doing so.
Here is the content.JS code:
var vid = document.getElementsByTagName('video');
vid.addEventListener("playing", function() {
alert("A HTML5 Video is playing");
}
And here is the Manifest.JSON code:
{
"manifest_version": 2,
"name": "video playing alerter",
"version": "0.1.0",
"description": "video playing alert demo extension",
"content_scripts": [{
"js": ["content.js"],
"matches": ["*://*/*"]
}]
}