I embedded vlcplayer in html and wanted to play ,pause the video .So I created a javascript file and coded some functions
<head>
<script type="text/javascript" src="jquery-1.7.1.min.js" ></script>
<script type="text/javascript" src="vctrl.js" ></script>
</head>
<body>
<embed id="vlcp" type="application/x-vlc-plugin" name="VLC" autoplay="no" loop="no" volume="100" width="640" height="480" target="test.flv">
</embed>
<a href="#" onclick='play()'>Play</a>
<a href="#" onclick='pause()'>Pause</a>
</body>
The javascript file has
$(document).ready(function(){
var player = document.getElementById("vlcp");
var play = function(){
if(player){
alert("play");
}
};
var pause = function(){
if(player){
alert("pause");
}
};
}
);
When I click on the play link ,the alert box doesn't appear..Is the way I have given the onclick
value wrong?