Skip to content

Instantly share code, notes, and snippets.

@Taik
Created December 26, 2016 22:51
Show Gist options
  • Save Taik/016e87021408a7c8efbf2a54bdf11477 to your computer and use it in GitHub Desktop.
Save Taik/016e87021408a7c8efbf2a54bdf11477 to your computer and use it in GitHub Desktop.
javascript: (function () {
var video = document.querySelector("video.jw-video");
if (video === null) {
alert("Could not find video object");
return;
}
var src = encodeURIComponent(video.src);
if (src.indexOf("redirector.googlevideo.com") === -1) {
alert("Could not find video source");
return;
}
fetch("http://192.168.192.170:8080/stream?url=" + src).then(function (resp) {
if (resp.status === 200) {
video.remove();
alert("Streaming video");
} else {
alert("Error streaming video");
}
})
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment