[vlc] VLC on Web page problem
Jean-Paul Saman
jpsaman at gmail.com
Fri Nov 13 09:32:08 CET 2009
2009/11/12 Kaliszan, Mariusz (GE EntSol, Security) <mariusz.kaliszan at ge.com>
> 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?
>
Answer 1) That is because you set the property "AutoPlay" to true inside the
<object> declaration
<param name="AutoPlay" value="True" />
Please read this page for a thorough understanding of your options:
http://wiki.videolan.org/Documentation:WebPlugin
> 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.
>
Which vlc version do you use?
> 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.
>
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.
> 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?
>
Internally vlc.playlist.add() works the same as giving rtsp://.... as
"network input" through the GUI or commandline.
Gtz
Jean-Paul Saman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20091113/0e0cdba1/attachment.html>
More information about the vlc
mailing list