Skip to content

ScriptYouTubePlayer: Weird specific bug related to layouts, transitions and useFetch #297

Description

@ahmedrangel

🐛 The bug

Hi, I found this specific bug that occurs using layouts and having pageTransition and layoutTransition enabled in nuxt config. Then, you navigate between layouts and the last page has a video and is fetching something with useFetch, then, you try to play the video. The script loads, but the video doesn't play.

Image

  • Steps to reproduce: (It is recommended to open the preview in a new tab)
  1. Start the reproduction
  2. You must be on the index page /
  3. Click Go to Layout
  4. Try to play the video
  5. The script loads, but the video doesn't play
  6. Inspect the console and you must see the error

🛠️ To reproduce

https://stackblitz.com/edit/nuxt-starter-aqvq3n

🌈 Expected behavior

The video in /video should be played after clicking it

ℹ️ Additional context

nuxt: 3.13.2
@nuxt/scripts: 0.9.4

Btw: this error doesn't occur if you enclose the script with <ClientOnly>

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions