Repository navigation
Fix media example plans and safe player wait selectors - #41
Merged
Merged
Conversation
Replace brittle [class*=player] waits that matched hidden script tags on YouTube. Add waitForPlayableMedia for layout-based player readiness, switch media-search example to YouTube with a stable search input selector, and simplify media-watch to settle plus media commands. Co-authored-by: Shaharyar Ahmad <shehrii9@users.noreply.github.com>
Co-authored-by: Shaharyar Ahmad <shehrii9@users.noreply.github.com>
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.
Summary
Fixes the two real-site example plans that failed during manual acceptance testing: YouTube watch and media search.
[class*='player']matched hidden<script>tags on YouTube (e.g.miniplayer.js), sowaitnever saw a real player. Introducedsrc/browser/mediaPlayer.tswith a safe selector list andwaitForPlayableMedia()(layout-based readiness). Plugin recovery andwaitactions that target media players use this path.media-watch-plan.jsondrops the broken CSS wait and uses settle +mediacommands.media-search-plan.jsonuses YouTube home +input[name=search_query](Vimeo home no longer exposes a search field in the accessibility tree).Type of change
Testing
npm run typechecknpm test(53 tests)npm run test:browsernpm run buildnpm run dev -- run-plan examples/media-search-plan.json→ok: truenpm run dev -- run-plan examples/media-watch-plan.json→ok: trueNotes for reviewers
Live YouTube/Vimeo DOMs drift; examples are best-effort smoke tests, not CI gates. Agent integration (Cursor driving
browser_*via daemon) is unchanged.