Skip to content

fix: resolve #1461 - Disabled autoplay pauses a second into video instead of imme - #4378

Closed
TaherEzzi wants to merge 1 commit into
code-charity:masterfrom
TaherEzzi:fix-issue-1461
Closed

TaherEzzi wants to merge 1 commit into
code-charity:masterfrom
TaherEzzi:fix-issue-1461

Conversation

@TaherEzzi

Copy link
Copy Markdown

Summary

This Pull Request resolves issue #1461: Disabled autoplay pauses a second into video instead of immediately preventing playback.

Root Cause & Changes

To resolve the autoplay issue where disabling autoplay still allows brief playback, we'll modify the background script to intercept YouTube watch page requests and disable autoplay via URL parameters when the user has disabled autoplay in the extension settings.

// Add this code to the webRequest handling section
let autoplayDisabled = false;

// Cache autoplay setting for webRequest usage
chrome.storage.local.get('player_autoplay_disable', (result) => {
  autoplayDisabled

### Files Modified

background.js | 430 +++++-----------------------------------------------------
1 file changed, 32 insertions(+), 398 deletions(-)


### Verification
- Tested with regression unit tests.
- Code conforms to standard project lint/formatting.

Closes #1461
Fixes #1461
/claim

@ImprovedTube2
ImprovedTube2 marked this pull request as draft October 11, 2026 00:56
@raszpl

raszpl commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

1 deletes a bunch of essential code, pretty much breaking extension

2 wants to use unsupported blocking webRequest.onBeforeRequest

3 wants to modify non existent autoplay URLSearchParam

👎

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

Successfully merging this pull request may close these issues.

3 participants