[vlc] VLC on Web page problem
Kaliszan, Mariusz (GE EntSol, Security)
mariusz.kaliszan at ge.com
Thu Nov 12 13:42:44 CET 2009
Hello!
We are trying to use VLC plugin on our web page to display RTSP stream. We embeded plugin in such way:
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/ax
<?php printScales()?>
id="vlc"
events="True">
<param name="MRL" value="" />
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="True" />
<param name="StartTime" value="0" />
<EMBED pluginspage="http://www.videolan.org"
type="application/x-vlc-plugin"
progid="VideoLAN.VLCPlugin.2"
<?php printScales()?>
name="vlc">
</EMBED>
</OBJECT>
<SCRIPT type="text/javascript">startPlay();</SCRIPT>
And javascript function "startPlay()" looks like that:
function startPlay() {
var vlc = document.getElementById("vlc");
var options = new Array(":aspect-ratio=4:3");
var itemName = document.getElementById('mrldropdown').value;
var itemId = vlc.playlist.add(itemName, null, options);
if( itemId != -1 ) {
vlc.playlist.playItem(itemId);
}
}
1) The first question (not so important and not the main reason of this email) is why VLC starts playing even if there is no vlc.playlist.playItem(itemId) in the code?
However the real problem we have when we open page that tries to play RTSP stream from device where there is no video source - camera cable is unplugged from device that generates RTSP stream so device is available under specified address, but video does not exist. When the page is opened it's ok until we try to do anything eg. click button or click link. Then web browse hangs up (Internet Explorer, Mozilla Firefox) - becomes not responding and we need to kill web browser process or... connect video source - then web browser becomes operational again.
It seems that vlc.playlist.add method is the reason of this behaviour - only when it is called in the code we have such situation.
2) Can you explain how vlc.playlist.add works internally or point what we can do to avoid such situation with web browser not responding?
Best regards
Mariusz Kaliszan
Software Engineer
GE
Security
T +48 58 326 22 47
F +48 58 305 35 63
E mariusz.kaliszan at ge.com
Sadowa 8
80-771 Gdańsk, Polska
GE Security Polska sp. z o.o.
GE imagination at work
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20091112/fa77fdd5/attachment.html>
More information about the vlc
mailing list