I wrote a FireFox addon that has a toolbar button. In the click event, I try to find the EMBED element and try to call pauseVideo () on it, but it does not work.
I am sure that the object I receive is EMBED, so don't doubt it, because I show 'src'
var p1 = content.document.getElementById("movie_player");
window.alert(p1.src);
The pauseVideo () problem does not work:
try
{
p1.pauseVideo();
}
catch(e)
{
window.alert(e); // this gives 'pauseVideo() is not a function'
}
In addition, the attribute 'allowcriptaccess' is set to 'always'. Any idea why this is not working? I have no ideas.
Thank!
source
share