Hi everyone, I'm a newbie to HTML, PHP, javascript, etc...
I'm using an embedded VLC plug-in to play movies on an internal site.
I am trying to post the filename of a movie and pass it into javascript.
My url looks like this:
http://192.168.1.1/film/movies/playme.php?Play=moviename.mp4
The controls to play the movies look like this:
<script language="javascript" src="VLCobject.js"> </script>
<script language="javascript" src="VLCcontrols.js"> </script>
<script language="javascript">
var vlc_controls = null;
function init() {
// load plugin
myvlc = new VLCObject("mymovie", "400", "300");
myvlc.write("vlccontent");
// load controls
vlc_controls = new VLCcontrols(myvlc);
vlc_controls.onready = function () {
vlc_controls.play("http://192.168.1.1/film/movies/moviename.mp4");
}
}
</script>
My problem is that I can't pass the moviename into the line vlc_controls.play(...). I have tried the following with PHP:
vlc_controls.play(<?php echo "http://192.168.1.1/film/movies/$_GET[Play] "; ?> );
It just doesn't work :-(
The only way I have been able to make this work is by hard-coding the URL, including the moviename.
Any suggestions would be most welcome.
Thanks!
The Plebe