I wrote this to trigger a video when an image is clicked, but its not working. Any help?

<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>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.