Page 1 of 1

play RTSP stream dynamically

Posted: 24 Jul 2017 06:23
by wanyangyang
HTML CODE:

Code: Select all

<object type='application/x-vlc-plugin' id='vlc' events='True' width="720" height="540" pluginspage="http://www.videolan.org" codebase="http://downloads.videolan.org/pub/videolan/vlc-webplugins/2.0.6/npapi-vlc-2.0.6.tar.xz"> <param name='volume' value='50' /> <param name='autoplay' value='true' /> <param name='loop' value='false' /> <param name='fullscreen' value='true' /> </object>
JAVASCRIPT CODE:

Code: Select all

var options = new Array(":aspect-ratio=4:3", "--rtsp-tcp"); var id = vlc.playlist.add(rtsp, "fancy name", options); vlc.playlist.playItem(id); //vlc.playlist.play(); //vlc.playlist.next(); //vlc.fullscreen();
I use IE11 and vlc 2.2.6, the code above didn't work. I dont know whether I used the wrong code or VLC2.2.6 has different APIs.
-----------------------------------------------------20170724 17:12--------------------------------------------------------------------------------------------
I've used win32 version of vlc

Re: play RTSP stream dynamically

Posted: 24 Jul 2017 09:00
by da2424
Will it play, but without applied options?
Then, please try this:

Code: Select all

var options = ":aspect-ratio=4:3 --rtsp-tcp";
If it will not play, please check if you use the 32bits version of VLC.

Re: play RTSP stream dynamically

Posted: 24 Jul 2017 11:01
by wanyangyang
Will it play, but without applied options?
Then, please try this:

Code: Select all

var options = ":aspect-ratio=4:3 --rtsp-tcp";
If it will not play, please check if you use the 32bits version of VLC.
still doesn't work

Re: play RTSP stream dynamically

Posted: 24 Jul 2017 11:06
by wanyangyang
Will it play, but without applied options?
Then, please try this:

Code: Select all

var options = ":aspect-ratio=4:3 --rtsp-tcp";
If it will not play, please check if you use the 32bits version of VLC.
The

Code: Select all

vlc.playlist.add(rtsp);
method works, I can get an increasing Id from this method.

Re: play RTSP stream dynamically

Posted: 25 Jul 2017 04:57
by wanyangyang
It's solved. I used the wrong port in rtsp mrl. :(

Re: play RTSP stream dynamically

Posted: 28 Nov 2017 09:44
by Jean-Baptiste Kempf
Easy fix then :D