Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
activex test
<!DOCTYPE html>
<html>
<head>
<script src='js/vendor/jquery-3.3.1.min.js'></script>
</head>
<body>
<object codeBase="/VDControl.CAB?2,0,0,100#version=2,0,0,100" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" width="640" height="360" id="vlc" events="True">
<param name="MRL" value="rtsp://admin:someone@10.8.0.251:3554/live1.sdp" />
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="True" />
<param name="AutoPlay" value="False" />
<param name="Volume" value="50" />
<param name="toolbar" value="True" />
<embed pluginspage="http://www.videolan.org"
type="application/x-vlc-plugin"
width="640"
height="360"
toolbar="true"
loop="true"
text="Waiting for video"
name="vlc"
target="rtsp://admin:someone@10.8.0.251:3554/live1.sdp"
/>
</object>
<div id='play'>play</div>
<div id='fullscreen'>fullscreen</div>
<script type='text/javascript'>
$(document).ready(function() {
$('#play').click(function() {
console.log('play')
vlc.playlist.next();
})
$('#fullscreen').click(function() {
vlc.video.toggleFullscreen();
})
var vlc = document.getElementById("vlc");
var url = 'rtsp://10.8.0.251:3554/live1.sdp';
// var url = 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov'
// var options = new Array("--network-caching 3000 --rtsp-user admin", "--rtsp-pwd someone", "--rtsp-tcp");
var options2 = '--rtsp-user=admin --rtsp-pwd=someone --rtsp-tcp';
var id = vlc.playlist.add(url,"video", options2);
vlc.playlist.add('rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov');
setInterval(function() { console.log('playing item '+vlc.playlist.currentItem+' ('+vlc.mediaDescription.title+'): state='+vlc.input.state+' hasvideo='+vlc.input.hasVout+' isplaying='+vlc.playlist.isPlaying) }, 2000);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment