play RTSP stream dynamically
Posted: 24 Jul 2017 06:23
HTML CODE:
JAVASCRIPT CODE:
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
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>
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();
-----------------------------------------------------20170724 17:12--------------------------------------------------------------------------------------------
I've used win32 version of vlc