Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vlc
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
<form>
<input type="text" id="url"/> <button id="send">play</button>
</form>
<script type="text/javascript">
$(function(){
$('#send').click(function(){
var url = $('#url').val();
$.ajax({
url: 'http://:password@127.0.0.1:8080/requests/status.xml?command=in_play&input=' + encodeURIComponent(url),
beforeSend: function(xhr) {
// xhr.setRequestHeader("Authorization", "Basic " + btoa(":password"));
xhr.setRequestHeader("Authorization", "Basic OnBhc3N3b3Jk";
}
});
})
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment