Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ahmedrangel opened this issue Oct 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ahmedrangel
Copy link

ahmedrangel commented Oct 12, 2024

🐛 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>

@ahmedrangel ahmedrangel added the bug Something isn't working label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant