Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocking Youtube ads by "sharing" video to our app #2994

Closed
ameshkov opened this issue Aug 7, 2019 · 14 comments
Closed

Blocking Youtube ads by "sharing" video to our app #2994

ameshkov opened this issue Aug 7, 2019 · 14 comments

Comments

@ameshkov
Copy link
Member

ameshkov commented Aug 7, 2019

Problem Description

There is no normal solution to adblocking on Youtube besides watching it in the browser (or rooting your device). Well, and besides purchasing YT Premium, but it's not available in a lot of countries.

Proposed Solution

Allow watching Youtube videos right inside AdGuard (without ads, obviously).

  1. Add a sharing provider for YT videos URLs. Let's call it "Watch without ads".
  2. The video is opened in AdGuard (just like you could open it in Telegram or NewPipe).
  3. The player should support:
    • Standard video controls
    • Tap to pause/play
    • Double-tap to seek
    • Slide up/down to control the volume
    • Setting menu with the following options:
      • Change orientation (portrait/album)
      • Changing quality
      • Picture-in-picture mode
      • Enable/disable captions
      • Share option (with timecode)
  4. Add an additional screen to the app's onboarding explaining how to use this feature
  5. Add "Youtube settings" under the "Content Blocking" settings with the following options there:
    • ON/OFF the sharing provider
    • The same explanation the as on the onboarding screen

Please note, that we cannot and do not want to replace the YT app. There are some awesome solutions for that already (see NewPipe).

Alternatives Considered

  1. We cannot and do not want to replace the YT app. There are some awesome solutions for that already (see NewPipe).
  2. Automatic ad-skipping. Ridiculously hard to maintain. All the examples I've seen are quite unstable.
  3. Virtualization (see Use app cloning to circumvent SSL pinning issues #2889). Feasible, but much harder to implement, and worthy of a separate product.
@lancelot-moon
Copy link

lancelot-moon commented Aug 7, 2019

For the 2nd point in Alternatives Considered:
#2427

This is valid. It also has a free version.
https://play.google.com/store/apps/details?id=com.agooday.skipadspro

But I don't know if it's safe to use.

Great ideas!
Just it looks like essentially watching YouTube with a browser, right?
I remember the upper resolution of YouTube video by mobile browsers is limited in 720p.
(YT app can use 1080p.)

@snhv
Copy link

snhv commented Aug 8, 2019

How about just sending it to the browser?

@lancelot-moon
Copy link

May you give the options of playing speed if possible?
I mean 0.5x, 0.75x, normal, 1.25x and 1.5x speed.
Thanks.

@ameshkov
Copy link
Member Author

How about just sending it to the browser?

It won't provide picture-in-picture

@ministr91
Copy link

Это костыль. Перемотка 15 секунд, но куда подевались мои 10? Неизвестно в каком качестве видео запускается

@zero77
Copy link

zero77 commented Dec 23, 2020

Instead of developing and maintaining a video player would it not be easier to just recommend an existing one like, NewPipe.

@TPS
Copy link
Contributor

TPS commented Jun 6, 2021

I tried to determine what AG had done (blocked, modified, &c) with the YT link I shared, but didn't find any entries in the log. Not implemented?

@Chinaski1
Copy link
Member

Yes at this stage this info not implemented in the filtering log.

@TPS
Copy link
Contributor

TPS commented Jun 9, 2021

Yes at this stage this info not implemented in the filtering log.

Planned? ETA?

@Chinaski1
Copy link
Member

Tentatively by version 4.0.

@artemiv4nov
Copy link
Contributor

@TPS Hi! I guess the YouTube traffic can't be shown in the Filtering log because the AdGuard app makes requests to YouTube. The AdGuard traffic is not taken into account by ourselves.

@TPS
Copy link
Contributor

TPS commented Jun 19, 2021

That's a problem, isn't it? How does 1 debug, &c?

@artemiv4nov
Copy link
Contributor

No, that's not a problem

@ameshkov
Copy link
Member Author

@TPS blocking YT ads in this case is not achieved via declarative rules, rather by using YT Iframe API with additional parameters to disable ads. Debugging it is only possible if you're an AdGuard dev, you need access to the code to change anything.

@artemiv4nov artemiv4nov removed the High label Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests