pranav-prakash / RokuCast

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

Difference between branches? #47

Closed osheu closed 5 years ago

osheu commented 5 years ago

Hey, thanks for making this available.

Im a little confused about the main differences between the 3 different branches - master, production, and PlayOnRoku. Could you briefly explain the differences?

Also, which branch would you recommend that I use? And if Ive already "installed" one branch, would it be easy to override with another branch?

Thanks

pranav-prakash commented 5 years ago

The production branch is not up to date and should not be used (if you were curious it was essentially the same as the master branch except the channel-id for ECP was switched from that of a sideloaded channel to one published as an unlisted roku app).

The PlayOnRoku branch is the one that should work for 99% of people. This version uses the native "play on roku" feature (the same one when you send a video via the official roku mobile app) as the endpoint to which mp4 urls are sent via the chrome extension. To the end user this means that only the chrome extension suffices to effectively cast videos.

The master branch switches out the native "play on roku" endpoint with a custom brightscript roku app (pretty much openly derived from mozilla's firefox casting implementation) that is seen as the "RokuCast Receiver" which must be sideloaded manually onto the roku. The benefit of doing this is that we can do certain things like spoofing user agents. I think at the moment that is all it does, but theoretically we could also implement things like forwarding CDN cookies, etc. Another advantage is that we avoid having to depend on the undocumented "play on roku" endpoint whose api behavior is not guaranteed and could theoretically be changed in some future OS revision.

So for most people playOnRoku branch should be fine. If you have already installed one, switching to another branch is just a matter of swapping out the chrome extension.

osheu commented 5 years ago

Excellent thanks.

And what is the benefit of spoofing user agents? And would you be able to provide a brief tutorial on how to use them after installing as a Chrome extension?

Very new to all this so would really appreciate your help

osheu commented 5 years ago

Also, it doesnt seem to work for sites like Openload - is this related to the user agent as well?

pranav-prakash commented 5 years ago

And what is the benefit of spoofing user agents?

Some websites will refuse to serve videos to a Roku useragent. The receiver app of the master branch spoofs the user agent as chrome when requesting the video. This is very rare, iirc only has happened once before.

And would you be able to provide a brief tutorial on how to use them after installing as a Chrome extension?

Spoofing as chrome UA is transparently done when by the receiver app in the master branch. I.e. you don't have to do anything explicit. I recommend using the playOnRoku branch if you are not comfortable with sideloading the receiver app to the roku. For 99% of cases it will be sufficient.

it doesnt seem to work for sites like Openload

No, probably not. It has worked with openload servers in the past for me. If you post a link I can take a quick look although I am sort of busy so cannot guarantee any solution.