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

Prevent videos from playing automatically #3394

Open
7 tasks done
mehdifirefox opened this issue Sep 30, 2024 · 12 comments
Open
7 tasks done

Prevent videos from playing automatically #3394

mehdifirefox opened this issue Sep 30, 2024 · 12 comments

Comments

@mehdifirefox
Copy link

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • using a new, unmodified browser profile.

Description

I don't know if this is a bug or a request for a new feature
Because I think you should have added this important item by now

Advertising videos are played automatically
Like the site theregister.com

A specific URL where the issue occurs.

n/a

Steps to Reproduce

n/a

Expected behavior

n/a

Actual behavior

n/a

Configuration

n/a

@MasterKia
Copy link
Member

Duplicate of #1421

@MasterKia MasterKia closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
@MasterKia MasterKia added the duplicate This issue or pull request already exists label Sep 30, 2024
@garry-ut99
Copy link

Also duplicate of:

@gorhill
Copy link
Member

gorhill commented Oct 1, 2024

Advertising videos are played automatically
Like the site theregister.com

I don't see videos at https://www.theregister.com/, so let alone autoplaying videos.

A specific URL where the issue occurs.
n/a

I will mark the issue as invalid, no case of an issue was really made.

@gorhill gorhill added invalid not a uBlock issue and removed duplicate This issue or pull request already exists labels Oct 1, 2024
@garry-ut99
Copy link

garry-ut99 commented Oct 1, 2024

I don't see videos at

There are videos on that site, and some of them autoplay, example videos:

  • A) https://www.theregister.com/2024/08/01/a_fresh_approach_for_container/ (embed vimeo, autoplay) or
    https://www.theregister.com/2024/07/30/ai_era_datacenters_need_aiready/ (embed vimeo, autoplay)
  • B) https://www.theregister.com/2024/08/28/google_doom_ai/ (embed youtube, no autoplay)

autoplay might also depend on user's side settings.


Advertising videos

However I can't reproduce any video ads in the above links as a guest (means I'm not logged in neither into the register.com, nor into youtube / vimeo), maybe the video ads might appear for logged users only or depend on GEO location.


A specific URL where the issue occurs: n/a

Lack of a link by OP, makes it hard to determine whether what OP reported is really a feature request or a filter issue:

  • if OP gets video ads, then maybe it belongs to filter issues and should be reported and fixed in uAssets tracker,
    (in case of video ads in embed youtube, then to be reported on uAssets: 🟥 ALL YouTube issues: D-O-N-'T COMMENT without reading the 1st post🟥 uAssets#20586)
  • but given OP excluded it to be a filter issue by ticking two first template checkboxes, and not filling any additional informations, the default assumption is to be made that OP meant a new feature, until he provide a link to a video which will turn out to be a filter issue

In any case, insufficient info from OP makes it hard to determine what the real issue is about, in such a case, it can be labeled by one of many labels:

  • "duplicate" (if assumption is that it's to be a feature request)
  • "filterlist (if assumption is that it's to be a filter issue)
  • "invalid" (if no assumption is to be made)
  • "feedback needed" or "information needed" (if no assumption is to be made)

@gorhill gorhill removed the invalid not a uBlock issue label Oct 1, 2024
@gorhill gorhill reopened this Oct 1, 2024
@uBlock-user
Copy link
Contributor

Permissions Policy support was added, but it doesn't work when it comes to autoplay, does it ?

@iam-py-test
Copy link
Contributor

According to MDN, permissions policy is supported by Chromium but not Firefox: https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy#browser_compatibility

@uBlock-user
Copy link
Contributor

So is autoplay blocked on Chromium through permissions policy ?

@iam-py-test
Copy link
Contributor

According to MDN, yes. I can't get it to work when testing, but that's probably user error.

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Oct 2, 2024

For vimeo iframe, maybe this:

||player.vimeo.com/*autoplay=1^$frame,removeparam=autoplay

@krystian3w
Copy link

krystian3w commented Oct 2, 2024

Permission Polices may need disable load unsized media like detected in the past @garry-ut99:

||dailymotion.com^$permissions=autoplay=()|unsized-media=()

So far, no one has complained that the site is broken or that the embedded video is not playable at all.

Maybe dimisa-ruadlist have scriptlet idea for other players than Vimeo.

@garry-ut99
Copy link

For vimeo iframe, maybe this:

Yes, removeparam does work.


Besides, two more solutions from uBlockOrigin/uAssets#25007 (comment) work as well:

  • ||vimeo.com$3p,frame,redirect=click2load.html,domain=theregister.com
  • AutoplayStopper extension

As for permissions (on Chromium), it didn't work in the previous case (uBlockOrigin/uAssets#25007 (comment)) and still doesn't work in the current case as well, none of the following work:

||vimeo.com^$frame,domain=theregister.com,permissions=autoplay=()|unsized-media=()
||vimeo.com^$domain=theregister.com,permissions=autoplay=()|unsized-media=()

@MasterKia
Copy link
Member

Permissions to disable autoplay on Chromium hasn't worked in a long time.

gorhill added a commit to gorhill/uBlock that referenced this issue Oct 2, 2024
Related issue:
uBlockOrigin/uBlock-issues#3394

When the "No large media elements" per-site switch is toggled on,
it will also act to prevent autoplay of video/audio media, regardless
of their size. This also works for xhr-based media streaming.

If blocking by size is not desirable while blocking autoplay is
desired, one can toggle on "No large media elements" switch while
setting "Block media elements larger than ..." to a very high value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants