Skip to content

Instantly share code, notes, and snippets.

@revolunet
Last active December 4, 2020 01:13
Show Gist options
  • Save revolunet/bcea0649935b33eaec31 to your computer and use it in GitHub Desktop.
Save revolunet/bcea0649935b33eaec31 to your computer and use it in GitHub Desktop.
Control a VLC playlist with HTTP
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
var host = 'http://:test@192.168.0.99:8080';
function send(cmd) {
$('#target').attr('src', host + '/requests/status.xml?command=pl_play&id=' + cmd + '&r=' + Math.random());
}
</script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<button onclick="send('play1')">play1</button>
<button onclick="send('play2')">play2</button>
<button onclick="send('play3')">play3</button>
<img id="target" width="1" height="1"/>
</body>
</html>
#EXTM3U
#EXTVLCOPT:input-repeat=-1
./play1.mp4
#EXTVLCOPT:input-repeat=-1
./play2.mp4
#EXTVLCOPT:input-repeat=-1
./play3.mp4
#!/bin/sh
#
# Lances VLC avec une playlist et une interface HTTP pour pouvoir être contrôlé à distance
# Le mdp est obligatoire ? https://wiki.videolan.org/VLC_command-line_help/
#
#
cd ~/Desktop/videos
vlc -I dummy --extraintf=http --http-password=test --align=0 --no-video-title-show --loop --fullscreen --no-autoscale playlist.m3u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment