Skip to content

Instantly share code, notes, and snippets.

@pavelpower
Created October 29, 2014 09:45
Show Gist options
  • Save pavelpower/99f50c26ee54c7970f53 to your computer and use it in GitHub Desktop.
Save pavelpower/99f50c26ee54c7970f53 to your computer and use it in GitHub Desktop.
TEST VCL plugin in html page
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"
width="640"
height="480"
id="vlcplayer">
</embed>
<script language="Javascript">
<!--
var vlc = document.getElementById("vlcplayer");
function player(vid) {
try {
var options = [];
var id = vlc.playlist.add(vid,'Video',options);
vlc.playlist.playItem(id);
vlc.video.fullscreen = true;
}
catch (ex) {
// alert(ex);
}
}
function mute(){
vlc.audio.toggleMute();
}
function play(){
vlc.playlist.play();
}
function stop(){
vlc.playlist.stop();
}
function pause(){
vlc.playlist.togglePause();
}
function fullscreen(){
vlc.video.toggleFullscreen();
}
player('http://212.1.244.118/hls/1tvsd.m3u8');
//!-->
</script>
</body>
</html>
@adithsc
Copy link

adithsc commented Jun 27, 2018

I tried this but not running in my browser.

can you please help.

<title></title>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment