As a preface: I have very little prior experience in programming of any type and I've only started doing this since a couple days ago, but i'm learning a little on the way. Also, I'm only using this for personal use/userscipt stuff.



Goal:

I want to embed a VLC player through the Firefox plugin onto an image page (the page where you right click on an image and 'view image' so that the address end with .jpg or something and you see the image in the middle of the browser). I also want to call this player with a button on the image page.



This is my button that has a onclick that calls the openvideo function. So this button is on the right side of the image page.

Code:
var input=document.createElement("input");
input.type="button";
input.value="Button";
input.onclick = openvideo;
input.setAttribute("style", "font-size:18px;position:absolute;top:120px;right:40px;");
document.body.appendChild(input);
But my problem is that i am unable to embed VLC plugin on this image page



I tried with this snippet:

Code:
<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"
version="VideoLAN.VLCPlugin.2"
width="640"
height="480"
id="vlc"
</embed>

var vlc = document.getElementById("vlc");
vlc.playlist.add('example video file path here', "live",
":network-caching=150");
vlc.playlist.play();
So this defines some things about the player and then embeds it and it works in the normal page but not in the image page.



I was wondering if there was anyway to make it work.



Thanks