SimonBrazell / privacy-redirect

A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.
GNU General Public License v3.0
1.98k stars 114 forks source link

Open embedded YouTube video in FreeTube #139

Open sith-on-mars opened 3 years ago

sith-on-mars commented 3 years ago

It would be very nice if Privacy Redirect can open embedded YouTube video in the FreeTube app. In my experience, most of the YouTube videos are now embedded, but right now the FreeTube redirect function only works for opening YouTube video links directly and doesn't work for embedded videos. Other than that, I think FreeTube has a brighter future than Invidious, since the development of Invidious has already stopped and the various Invidious instances don't work very well from time to time. Cheers!

SimonBrazell commented 3 years ago

Yeah such a shame about Invidious... Only problem with this is if you navigate to a site with loads of embedded videos, like in a feed or something, you'd be spammed by browser requests to open the link in FreeTube.

seniorm0ment commented 3 years ago

Invidious is buggy and needs some work, but development has not stopped.

sith-on-mars commented 3 years ago

Yeah such a shame about Invidious... Only problem with this is if you navigate to a site with loads of embedded videos, like in a feed or something, you'd be spammed by browser requests to open the link in FreeTube.

I think there are two ways for redirecting to FreeTube when there are multiple embedded videos.

One way is to have a pop-up windows which asks you which video you want to play in FreeTube. A lot of download managers work in the similar way to deal with the situation in which there are multiple download links.

Another way is to redirect videos to Invidious first, then redirect Invidious videos to FreeTube. FreeTube supports opening Invidious links.

sith-on-mars commented 3 years ago

I think you could also to add a "Play in FreeTube" context button in the right-click menu, like ff2mpv does.

PrestonN commented 3 years ago

Just want to add that this is an issue on the FreeTube side and I have made a fix. When the new release is available, update FreeTube and embed URLs should be working. If you're still having issues, please make an issue over on the FreeTube repo and I'll take a look at it again.

SimonBrazell commented 3 years ago

Just want to add that this is an issue on the FreeTube side and I have made a fix. When the new release is available, update FreeTube and embed URLs should be working

@PrestonN not exactly, I've deliberately stopped the extension redirecting embedded (those in an iframe) requests from going to FreeTube because of the issue I mentioned above (sites with many embeds). So it wouldn't work regardless atm.

sith-on-mars commented 3 years ago

Hey I found a workaround to open embedded YouTube videos. One need to install Ublock Origin and then enable "click-to-load" for YouTube videos. To do this you need to add the followings in "My filters" in the Ublock Origin settings:

||youtube.com^$3p,frame,redirect=click2load.html
||youtube-nocookie.com^$3p,frame,redirect=click2load.html

More details about "click-to-load" function can be found in the Ublock Origin 1.31.0 release notes. And as usual, enable "Use FreeTube over Invidious when possible" in the Privacy-Redirect settings.

Then embedded YouTube frames will be replaced with click-to-load widgets, and open the link in the widget will trigger FreeTube redirect. This is how a click-to-load widget looks like:

image

Could you maybe add this to the readme and maybe notify users after the installation so that people are aware of this workaround?