block all videos

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
chilsaoui
Posts: 4
Joined: Thu Jun 11, 2015 1:11 am

block all videos

Post by chilsaoui »

hi
i want to block all types of videos from being played either autoplayed or non autoplayed
thanks
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: block all videos

Post by lewisje »

I made a UserScript called "Disable Audio/Video Autoplay" that might help, but all that ABP can do is block the videos outright, meaning you won't be able to play them at all because they won't load.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
chilsaoui
Posts: 4
Joined: Thu Jun 11, 2015 1:11 am

Re: block all videos

Post by chilsaoui »

lewisje wrote:I made a UserScript called "Disable Audio/Video Autoplay" that might help, but all that ABP can do is block the videos outright, meaning you won't be able to play them at all because they won't load.
yes that is what i want block the videos outright
can you tell me how to do that
thanks
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: block all videos

Post by mapx »

install this lewisje script in greasemonkey (firefox) or tampermonkey (chrome)
https://greasyfork.org/en/scripts/8022- ... o-autoplay
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: block all videos

Post by lewisje »

To block videos outright, I wish there were a media-type rule like $media (which actually is a type recognized by Firefox's IContentPolicy API, but not Chromium's webRequest), but the best way is probably to do it by file extension:

Code: Select all

/\w\.(?:webm|mov|divx|avi|mp(?:4|e?g)|og(?:v|m)|wm(?:v|x)|rm(?:vb)?|(?:m2)(?:t|p)s|(?:m(?:k|4)|d|f(?:l|4))v|as(?:f|x))\b/$object,object-subrequest,other
I can't think of a good way to do this with simple filters without massive false positives, so I did it as a regex (maybe I went overboard with the non-capturing groups...).

I just tested it on the "Video for Everybody" test page, but that rule doesn't work generally enough; for example it does not work on YouTube, for which you'd need to craft your own rule: http://camendesign.com/code/video_for_e ... /test.html

Actually I think this should get rid of embedded YouTube videos, without blocking the YouTube site itself:

Code: Select all

||youtube.com^$script,object,object-subrequest,other,subdocument,third-party
||youtube-nocookie.com^$script,object,object-subrequest,other,subdocument,third-party
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Locked