Last active
August 29, 2015 14:06
-
-
Save kylehowells/8ff379300eb2f088da24 to your computer and use it in GitHub Desktop.
Send video to XBMC in Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var string = "plugin://plugin.video.youtube/?action=play_video&videoid=WnlLQbAQSxQ" | |
var params = { | |
item : { | |
file : string | |
} | |
} | |
var data = { jsonrpc: "2.0", method: "Player.Open", id: 1 }; | |
data.params = params; | |
var strData = JSON.stringify(data); | |
var xhr = new XMLHttpRequest(); | |
xhr.open("POST", "http://xbmc@192.168.1.100:8080", true); | |
xhr.setRequestHeader("Content-type", "application/json"); | |
xhr.send(strData); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment