Created
January 11, 2020 18:28
-
-
Save mattkanwisher/62ae049cd770fc5d86cb24c9077d4eff to your computer and use it in GitHub Desktop.
Launch Youtube on LG TV to a specific video
This file contains hidden or 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
// To run | |
// npm install lgtv2 | |
// node YouTube_LG_WebTV.js | |
var lgtv = require("lgtv2")({ | |
url: 'ws://192.168.1.XX:3000' //Change XX to whatever the ip of your television is | |
}); | |
lgtv.on('error', function (err) { | |
console.log(err); | |
}); | |
lgtv.on('connect', function () { | |
console.log('connected'); | |
lgtv.request('ssap://system.launcher/launch', {id: 'youtube.leanback.v4', "contentId": "w7M72xKk6mk" }, function (err, res) { | |
console.log('launch points', res); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment