Feat: Comprehensive upgrade of Smart Speed to context-aware engine (#1463)#3628
Open
AryaXDG wants to merge 1 commit intocode-charity:masterfrom
Open
Feat: Comprehensive upgrade of Smart Speed to context-aware engine (#1463)#3628AryaXDG wants to merge 1 commit intocode-charity:masterfrom
AryaXDG wants to merge 1 commit intocode-charity:masterfrom
Conversation
This update transforms the basic Smart Speed toggle into a fully mature engine. Changes include: - LERP-based audio smoothing for seamless speed transitions - Target Duration Mode (Fractional Knapsack algorithm) - In-player UI controls for Next Peak, Target Duration, and Whitelist toggles - Dedicated Profile Manager in Satus settings for Category/Channel overrides - Safe DOM injection bypassing YouTube's TrustedHTML policy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request represents a significant evolution of the "Smart Speed" feature. It transitions the implementation from a basic heuristic toggle to a mature, context-aware engine. The core logic has been overhauled to prioritize mathematical smoothing, granular user customization, and resilient data extraction while adhering to strict security policies.
The upgraded engine incorporates the following technical enhancements:
playbackRate = baseSpeed * smartMultiplier).MARKER_TYPE_HEATMAPidentifiers, ensuring durability against YouTube's frequent internal metadata schema updates.Key Changes:
Logic Engine (
player.js):sessionDisabledtoggles andrawMarkersCacheto prevent redundant network requests.document.createElementNSandsetAttribute. This ensures 100% compliance with YouTube's strict TrustedHTML Content Security Policy (CSP), preventing execution blocks.User Interface (
menu/skeleton-parts/player.js):In-Player Controls:
.ytp-right-controls.T - 2.0s.Localization (
_locales/en/messages.json):Technical Implementation Details:
async/awaitfor Tier 3 background fetches to prevent main-thread blocking during JSON parsing.yt-navigate-finishandloadeddatafor reliable state resets during Single Page Application (SPA) transitions.Screenshots:
1. Satus Profile Manager & Configuration

2. Core Settings Dashboard

3. Native Player Control Integration

Testing Environment:
Related Issue:
Closes #1463