have tried following script that works in IE but give following error in ff
Error: player.playlist has no properties
Code: Select all
<HTML>
<script>
function createvlc()
{
var player_object;
if(document.all)
{
player_object = document.createElement("OBJECT");
player_object.classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921";
player_object.codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0";
}
else
{
player_object = document.createElement("embed")
player_object.type="application/x-vlc-plugin";
player_object.progid="VideoLAN.VLCPlugin.2";
player_object.name = "vlc";
}
player_object.id="vlc"
document.getElementById("body").appendChild(player_object);
}
function play()
{
var url = "rtsp://www.optimalstream.net/vlcpl/subscriber/Kaare_A_Larsen-1168471117/cnbc"
var player = document.getElementById("vlc");
var item_id = player.playlist.add(url);
player.playlist.playItem(item_id);
}
</script>
<BODY id="body" onload="createvlc()" onclick="play()" >
</BODY>
</HTML>