<br><br><div class="gmail_quote">2009/11/12 Kaliszan, Mariusz (GE EntSol, Security) <span dir="ltr"><<a href="mailto:mariusz.kaliszan@ge.com">mariusz.kaliszan@ge.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><span lang="pl"><font face="Arial CE" size="2">Hello!</font></span>
</p>
<p><span lang="pl"><font face="Arial CE" size="2">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 face="Arial CE" size="2"><OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"</font></span>
<br><span lang="pl"> <font face="Arial CE" size="2">codebase="<a href="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/ax" target="_blank">http://downloads.videolan.org/pub/videolan/vlc/latest/win32/ax</a></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2"><?php printScales()?></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2">id="vlc"</font></span>
<br><span lang="pl"> <font face="Arial CE" size="2">events="True"></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2"><param name="MRL" value="" /></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2"><param name="ShowDisplay" value="True" /></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2"><param name="AutoLoop" value="False" /></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2"><param name="AutoPlay" value="True" /></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2"><param name="StartTime" value="0" /></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2"><EMBED pluginspage="<a href="http://www.videolan.org" target="_blank">http://www.videolan.org</a>"</font></span>
<br><span lang="pl"> <font face="Arial CE" size="2">type="application/x-vlc-plugin"</font></span>
<br><span lang="pl"> <font face="Arial CE" size="2">progid="VideoLAN.VLCPlugin.2"</font></span>
<br><span lang="pl"> <font face="Arial CE" size="2"><?php printScales()?></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2">name="vlc"></font></span>
<br><span lang="pl"> <font face="Arial CE" size="2"></EMBED></font></span>
<br><span lang="pl"><font face="Arial CE" size="2"></OBJECT></font></span>
</p>
<p><span lang="pl"><font face="Arial CE" size="2"><SCRIPT type="text/javascript">startPlay();</SCRIPT></font></span>
</p>
<p><span lang="pl"><font face="Arial CE" size="2">And javascript function "startPlay()" looks like that:</font></span>
<br><span lang="en-us"><font face="Arial" size="2">function startPlay() {</font></span>
<br><span lang="pl"> </span><span lang="pl"></span><span lang="en-us"> <font face="Arial" size="2">var vlc = document.getElementById("vlc");</font></span>
<br><span lang="pl"> </span><span lang="pl"></span><span lang="en-us"> <font face="Arial" size="2">var options = new Array(":aspect-ratio=4:3");</font></span>
<br><span lang="pl"> </span><span lang="pl"></span><span lang="en-us"> <font face="Arial" size="2">var itemName = document.getElementById('mrldropdown').value;</font></span>
<br><span lang="pl"> </span><span lang="pl"></span><span lang="en-us"> <font face="Arial" size="2">var itemId = vlc.playlist.add(itemName, null, options);</font></span>
<br><span lang="pl"> </span><span lang="pl"></span><span lang="en-us"> <font face="Arial" size="2">if( itemId != -1 ) {</font></span>
<br><span lang="pl"> </span><span lang="pl"></span><span lang="en-us"> <font face="Arial" size="2">vlc.playlist.playItem(itemId);</font></span>
<br><span lang="pl"> </span><span lang="pl"></span><span lang="en-us"> <font face="Arial" size="2">}</font></span>
<br><span lang="en-us"><font face="Arial" size="2">}</font></span>
</p>
<p><span lang="pl"><font face="Arial CE" size="2">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>
</div></blockquote><div><span lang="pl"><font face="Arial CE" size="2">Answer 1) That is because you set the property "AutoPlay" to true inside the <object> declaration<br> <param name="AutoPlay" value="True" /></font></span><br>
<br>Please read this page for a thorough understanding of your options: <a href="http://wiki.videolan.org/Documentation:WebPlugin">http://wiki.videolan.org/Documentation:WebPlugin</a> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><span lang="pl"><font face="Arial CE" size="2">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>
</div></blockquote><div><br>Which vlc version do you use?<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
<p><span lang="pl"><font face="Arial CE" size="2">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></div></blockquote><div>
<br>Could you try the same rtsp link in a standalone VLC and turn up the verbosity of messages (See menu Tools|Messages).? And sent the resulting data to this list. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><span lang="pl"><font face="Arial CE" size="2">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></div></blockquote>
<div><br>Internally vlc.playlist.add() works the same as giving rtsp://.... as "network input" through the GUI or commandline.<br> <br>Gtz<br>Jean-Paul Saman<br></div></div>