I'm trying to make my first firefox addon, but it is so painful to acheive what i want, because I cannot find the way to make it work. I want to play all html5 videos from this page: http://www.html5rocks.com/en/tutorials/video/basics/
I'm using Add-on Sdk. In main.js I'm adding below code to attach a background script the active tab page:
var pageMod = require("page-mod");
pageMod.PageMod({
include: "*",
contentScriptWhen: 'ready',
contentScript: "var players = content.document.getElementsByTagName('video'); for(var i=0; i<players.length; i++)players[i].play();"
});
when page load complete then only videos from parent page start playing. How to make all videos from all windows, iframes, parent to play when page load complete? The page is http://www.html5rocks.com/en/tutorials/video/basics/
must setup pagemod to load on all frames and save workers in array to access later.