pranav-prakash / RokuCast

Cast videos from chrome to roku
180 stars 39 forks source link

Non-minified/Full source? #34

Closed youngrrrr closed 6 years ago

youngrrrr commented 6 years ago

Hi,

Thanks for the great work producing this extension. It has improved my quality of life by at least 5000%.

I wanted to dig into the source to see how it all works but it appears that the code in the repo is all minified? (Why) Is this the case? If so, is it possible to get a look at the non-minified version?

Thanks again!

pranav-prakash commented 6 years ago

Hi!

The minified code which I believe you're referring to is the libvget js file taken from the vget extension, and is responsible for parsing the webpage DOM to extract out the video urls. The only part which I added on top of that is just the interfacing with the roku.

The vget js source was minified by that author, for reasons I'm not sure. You could probably contact them, but it seems to be abandoned. Anyhow essentially all it does it use regex to look for relevant video tags, along with some special cases to deal with jwplayer and flash.

I've been planning to switch from this to a method of extracting video urls that relies on chrome dev tool's network introspection capability which should work in a larger number of cases but for now libvget seems to do the job for 99% of the videos I come across.

nitrocode commented 6 years ago

@pranav-prakash I was also looking into hacking the code base because I keep running into pages that have an html5 or mp4 video but cannot send it to the Roku.

Anyway, on top of libvget.js, it looks like contentScript.js and fullapp.js are also minified. Are those also part of vget?

pranav-prakash commented 6 years ago

Yea both of those were too. It'd probably be easier to throw away the libvget base and start afresh instead of trying to hack on the minified version.

https://developer.chrome.com/extensions/devtools_network

Would probably be relevant, probably filtering to video urls or something.