Created
August 14, 2015 19:13
-
-
Save wyattearp/8d540ce597494112258f to your computer and use it in GitHub Desktop.
Ugly Hack to generate a QR Code from the YouTube live RTMP server & key page
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
// get the server URL | |
var server_url = $("[value^=rtmp]").value; | |
// get the current key | |
var stream_key = $(".stream-name-text").value; | |
// assemble the QR code, thanks http://stackoverflow.com/a/9447876 | |
var div = $("#yt-masthead-content"); | |
var qrIMG = 'https://chart.googleapis.com/chart?chl=' + server_url + '/' + stream_key + '&chld=M%7C0&cht=qr&chs=125x125'; | |
var img = document.createElement('img'); | |
img.src=qrIMG; | |
img.width=125; | |
img.height=125; | |
div.appendChild(img); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment