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

Unable to play app trailers on Steam with no-large-media #3325

Open
9 tasks done
przemo20 opened this issue Aug 5, 2024 · 12 comments
Open
9 tasks done

Unable to play app trailers on Steam with no-large-media #3325

przemo20 opened this issue Aug 5, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@przemo20
Copy link

przemo20 commented Aug 5, 2024

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.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • 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.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

With the no-large-media rule added for store.steampowered.com, the videos in the screenshot carousel on the Steam store app pages get blocked, and there's no way to unblock them (without removing the added no-large-media rule) – if you click on the video, then on the black box (to unlock it), nothing happens.

Screenshot

obraz

A specific URL where the issue occurs.

https://store.steampowered.com/app/238960/Path_of_Exile/

Steps to Reproduce

  1. Open uBlock Origin Dashboard, switch to the “My rules” tab, add the following temporary rule:
    no-large-media: store.steampowered.com true, then click on the “Save” button and then the “Commit” button
  2. Go back to the uBO “Settings” tab, and make sure that the value next to “Block media elements larger than” is, let's say, not bigger than 2500 KB (you don't need to check the box next to that option)
  3. Restart the browser (just to make sure that the new settings get applied correctly)
  4. Go to https://store.steampowered.com/app/238960/Path_of_Exile/
  5. Wait for the page to load, then click on the black box (below the game name)

Video recording

https://www.youtube.com/watch?v=MI-cpxkHTF0

Expected behavior

The video (and the video player) should load when you click on it.

Actual behavior

See Description.

On Firefox, I see the following error in the browser console when trying to view the trailer – “DOMException: The media resource indicated by the src attribute or assigned media provider object was not suitable.” and on Chrome – “DOMException: Failed to load because no supported source was found.”

But if you – after the step 3 – select a screenshot from the screenshot carousel, then click on it [the black box] – the image loads fine.

uBO version

1.59.0

Browser name and version

Mozilla Firefox 128.0.3 (64-bit)

Operating System and version

Windows 10 Pro 22H2 (build 19045.4651)

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Aug 5, 2024

Those are large media links so no-large-media: * true is blocking them as expected?

image

I don't understand what you mean much.

@przemo20
Copy link
Author

przemo20 commented Aug 5, 2024

Yeah, blocking them works as intended, though there should still be a way to unblock/load them, just like you can unblock/load large images by clicking on their placeholders (without disabling no-large-media).

@stephenhawk8054
Copy link
Member

Hmm... The images element can be wrapped by using website's <img> tag, hence able to have click events. Videos might be able to wrapped by using website's <video> tag.

A simpler example would be this: https://interactive-examples.mdn.mozilla.net/pages/tabbed/video.html

However, that won't help in steampowered.com case either. The media are lazyloaded and there's no media tags (img, video...) to be wrapped around

image

@ChaseKnowlden
Copy link

Can't reproduce the issue.

@przemo20
Copy link
Author

Can't reproduce the issue.

I slightly revised the “Steps to Reproduce” section (I edited the Step 1 to say that you need to click on the “Save” button first after adding the no-large-media: store.steampowered.com true entry before you can hit “Commit” and added step 2 and 3), and added a video recording of the issue as well. I hope this will make it easier to reproduce.

@ChaseKnowlden
Copy link

ChaseKnowlden commented Dec 20, 2024

image

It now reproduces the issue after following the modified steps.

@gwarser

This comment was marked as resolved.

@gwarser gwarser added the bug Something isn't working label Dec 20, 2024
@gorhill
Copy link
Member

gorhill commented Dec 22, 2024

The video element is added programmatically when clicking the thumbnail, and the code adding it fails because of the no-large-media-elements switch, which causes the video element to not be seen by uBO's click handler. Not sure this can be addressed.

The workaround is to toggle off no-large-media-elements from the popup panel and force a reload.


This code shows the video element is added programmatically (line 386), and on failure is immediately removed (line 376), so in the end it's not possible to click on it, hence uBO can't detect it was clicked so as to let it go through.

image

uBlock-user added a commit to uBlockOrigin/uAssets that referenced this issue Dec 22, 2024
@przemo20
Copy link
Author

przemo20 commented Dec 22, 2024

Could you maybe instead make/add an option where you can select what kind of media elements (that exceed the specified size) we want to block? So for example, I'm fine with videos on the Steam store (since there's an option in their video player to stop videos from autoplaying) – I just don't want for big GIF images to load automatically (that some developers overuse in the descriptions of their games).

Not sure where you would put this new option:
– would it be a sub-option under “Block media elements larger than” (with options like “Videos (*.mp4; *.webm etc.)”, “Images (*.gif; *.png etc.)”, “Music”)?
– or maybe you would have an option to specify that in the rule on the “My rules” page, like no-large-media: store.steampowered.com true (would mean block all media), but e.g. no-large-media (*.png, *.gif): store.steampowered.com true (or something like that; would block only the big PNG and GIF images on store.steampowered.com)?
– or maybe you could change that somewhere on the advanced-settings.html extension page?

It's just a suggestion.

@gwarser

This comment was marked as resolved.

@gorhill

This comment was marked as resolved.

@gwarser

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants