Skip to content

YouTube players break on client-side navigation #597

Closed
unjs/unhead
#660

Description

@cernymatej

🐛 The bug

When navigating to a page with a <ScriptYouTubePlayer /> from a page with a <ScriptYouTubePlayer />, all the components break and the video can never be played.

The navigation must happen before loading a player (clicking on it).

🛠️ To reproduce

https://stackblitz.com/edit/github-5lurdrz8?file=app%2Fpages%2Findex.vue

🌈 Expected behavior

The video player will load the script and start playing after clicking on it.

ℹ️ Additional context

No response

Activity

  1. added
    bug
    on Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions