frankhale/toby

No need to patch libchromiumcontent to allow overriding the referrer

Closed this issue · 4 comments

Backstory is that some videos are blocked if the HTTP referrer is not set (eg. videos from VEVO). I think is because in most cases you'll open your app using the file protocol and the referrer will not be set.

I just did a quick test using express to serve a page using the YouTube API or even an embedded iframe and videos from VEVO play fine. Patching libchromiumcontent is moot at this point and I am so happy about this!

This issue coincides with the restructuring of the project that I need to do in order to make Figwheel work. If I serve the assets using express then I won't need to patch libchromiumcontent and/or provide my own binaries for Electron on each release. This is fantastic news!

Another addition to this is that once this is done then we can just require electron prebuilt as a node module and do everything very nicely and cleanly. This can even be a npm module and we can just use npm install && npm start to get the dependencies, run the app.

More to come on this later.

For a demonstration of this see the following repo that will play a VEVO video from YouTube without overriding the HTTP referrer:

https://github.com/frankhale/electron-with-express

There is nothing truly ground breaking here but it's just a case of an issue you find leads you down crazy paths and this particular solution was the easiest but finding it was a year in the making. LOL!

I plan on moving Toby to an architecture like this as soon as possible. This will also facilitate the use of Figwheel for a better development experience.

This is resolved in the rewrite. I know it's a long time coming but here is some proof. This particular gif doesn't demonstrate playing a blocked video but they do work now without any libchromiumcontent patches.:

toby

This is complete and will be reflected in the next commit.

Closed via a3871f8