<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7655.7">
<TITLE>VLC on Web page problem</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">Hello!</FONT></SPAN>
</P>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">We are trying to use VLC plugin on our web page to display RTSP stream. We embeded plugin in such way:</FONT></SPAN>
<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE"><OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"</FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE">codebase="<A HREF="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/ax">http://downloads.videolan.org/pub/videolan/vlc/latest/win32/ax</A></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE"><?php printScales()?></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE">id="vlc"</FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE">events="True"></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE"><param name="MRL" value="" /></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE"><param name="ShowDisplay" value="True" /></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE"><param name="AutoLoop" value="False" /></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE"><param name="AutoPlay" value="True" /></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE"><param name="StartTime" value="0" /></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE"><EMBED pluginspage="<A HREF="http://www.videolan.org">http://www.videolan.org</A>"</FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE">type="application/x-vlc-plugin"</FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE">progid="VideoLAN.VLCPlugin.2"</FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE"><?php printScales()?></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE">name="vlc"></FONT></SPAN>
<BR><SPAN LANG="pl"> <FONT SIZE=2 FACE="Arial CE"></EMBED></FONT></SPAN>
<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE"></OBJECT></FONT></SPAN>
</P>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE"><SCRIPT type="text/javascript">startPlay();</SCRIPT></FONT></SPAN>
</P>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">And javascript function "startPlay()" looks like that:</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">function startPlay() {</FONT></SPAN>
<BR><SPAN LANG="pl"> </SPAN><SPAN LANG="pl"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">var vlc = document.getElementById("vlc");</FONT></SPAN>
<BR><SPAN LANG="pl"> </SPAN><SPAN LANG="pl"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">var options = new Array(":aspect-ratio=4:3");</FONT></SPAN>
<BR><SPAN LANG="pl"> </SPAN><SPAN LANG="pl"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">var itemName = document.getElementById('mrldropdown').value;</FONT></SPAN>
<BR><SPAN LANG="pl"> </SPAN><SPAN LANG="pl"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">var itemId = vlc.playlist.add(itemName, null, options);</FONT></SPAN>
<BR><SPAN LANG="pl"> </SPAN><SPAN LANG="pl"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">if( itemId != -1 ) {</FONT></SPAN>
<BR><SPAN LANG="pl"> </SPAN><SPAN LANG="pl"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">vlc.playlist.playItem(itemId);</FONT></SPAN>
<BR><SPAN LANG="pl"> </SPAN><SPAN LANG="pl"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">}</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">}</FONT></SPAN>
</P>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">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?</FONT></SPAN></P>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">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.</FONT></SPAN></P>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">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.</FONT></SPAN></P>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">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?</FONT></SPAN></P>
<BR>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">Best regards</FONT></SPAN>
</P>
<P><SPAN LANG="pl"><B><FONT SIZE=2 FACE="Arial CE">Mariusz Kaliszan</FONT></B></SPAN>
<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">Software Engineer</FONT></SPAN>
<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">GE</FONT></SPAN>
<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">Security</FONT></SPAN>
</P>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">T +48 58 326 22 47</FONT></SPAN>
<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">F +48 58 305 35 63</FONT></SPAN>
<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">E mariusz.kaliszan@ge.com</FONT></SPAN>
</P>
<P><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">Sadowa 8</FONT></SPAN>
<BR><SPAN LANG="pl"><FONT SIZE=2 FACE="Arial CE">80-771 Gdańsk, Polska</FONT></SPAN>
<BR><SPAN LANG="pl"><FONT SIZE=1 FACE="Arial CE">GE Security Polska sp. z o.o.</FONT></SPAN>
</P>
<P><SPAN LANG="pl"><FONT COLOR="#0000FF" SIZE=2 FACE="Arial CE">GE imagination at work</FONT></SPAN>
</P>
<BR>
</BODY>
</HTML>