Skip to content

Fix media example plans and safe player wait selectors - #41

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/fix-media-plans-player-wait-ca02
Jul 28, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/fix-media-plans-player-wait-ca02

Conversation

@shehrii9

Copy link
Copy Markdown
Owner

Summary

Fixes the two real-site example plans that failed during manual acceptance testing: YouTube watch and media search.

  • Player wait: [class*='player'] matched hidden <script> tags on YouTube (e.g. miniplayer.js), so wait never saw a real player. Introduced src/browser/mediaPlayer.ts with a safe selector list and waitForPlayableMedia() (layout-based readiness). Plugin recovery and wait actions that target media players use this path.
  • Examples: media-watch-plan.json drops the broken CSS wait and uses settle + media commands. media-search-plan.json uses YouTube home + input[name=search_query] (Vimeo home no longer exposes a search field in the accessibility tree).

Type of change

  • Bug fix
  • Feature / site plugin
  • Documentation
  • Tests / CI
  • Other (describe)

Testing

  • npm run typecheck
  • npm test (53 tests)
  • npm run test:browser
  • npm run build
  • npm run dev -- run-plan examples/media-search-plan.json → ok: true
  • npm run dev -- run-plan examples/media-watch-plan.json → ok: true

Notes 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.

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 28, 2026 10:23
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>
@cursor
cursor Bot marked this pull request as ready for review July 28, 2026 10:33
@cursor
cursor Bot merged commit f9fdc34 into main Jul 28, 2026
1 of 2 checks passed
@cursor
cursor Bot deleted the cursor/fix-media-plans-player-wait-ca02 branch July 28, 2026 10:35
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.

2 participants