amitbl / blocktube

YouTube™ content blocker
GNU General Public License v3.0
911 stars 66 forks source link

Advanced Blocking Not Working on Embedded Videos Outside YouTube #320

Closed BlooDCrescent closed 1 year ago

BlooDCrescent commented 1 year ago

Description

I'm currently using the "Advanced Blocking" feature in the Blocktube Firefox extension to block videos using a custom JavaScript function. I've set the function to simply return true to block all videos. This works as expected on YouTube, but when I visit a webpage with an embedded YouTube video (i.e., not directly on YouTube), the Advanced Blocking doesn't seem to apply, and I can still play the video.

Steps to Reproduce

  1. Set the "Advanced Blocking" function to return true; in order to block all videos.
  2. Visit any site with embedded video (in my case, https://boardgamegeek.com/video/120877/kingdom-death-monster/shut-sit-down-reviews-kingdom-death-monster )
  3. Notice that the embedded video still plays despite the Advanced Blocking being set.

Additional Information

When I used the custom JavaScript function to console log the types of objects passed as a parameter, I observed that the objects were 'videoDetails' and 'endScreenVideoRenderer'. This might provide some insights into why the blocking isn't working as expected for embedded videos.

Expected Behavior

The video should be blocked on all sites, including those with embedded YouTube videos, when using the Advanced Blocking function.

Actual Behavior

The video plays without any restrictions on websites with embedded YouTube videos.

Environment

Please let me know if any additional information is required or if there's a workaround available. Thank you for looking into this issue!

BlooDCrescent commented 1 year ago

Sorry, I haven't realize I had 'Disable direct access blocking' feature enabled, closing