I wrote a script that allows me to start a video when an image is clicked. It works fine for html5 video but not embedded video (VLC+Webm). How do i make my script recognize the embedded video?
Testing this in FF3.6 and FF4b9.
Testing this in FF3.6 and FF4b9.
Code:
<head>
<style>
#movie {}
#img {}
</style>
</head>
<body>
<embed type="application/x-vlc-plugin" name="VLC" target="mymovie.webm" id="movie" > </embed>
<img src=myimage.jpg" id="img" />
<script>
var v = document.getElementById("movie");
var i = document.getElementById("img");
i.onclick = function() {
v.play();
};
</script>
</body>