react-lite-youtube-embed icon indicating copy to clipboard operation
react-lite-youtube-embed copied to clipboard

If I parse LiteYouTubeEmbed as html on the server side, will it not work?

Open es-ki opened this issue 3 years ago • 0 comments

Thank you very much for developing this wonderful library.

In my app, it worked from displaying the video thumbnail and YouTube icon to the icon hover effect.
When I press the thumbnail, nothing happens and I can't play it.
I'm using Next.js to parse the article information retrieved from the CMS into html on the server side, is this the cause?

When I checked the html elements, it seemed that the following two types of link tags were missing when compared to demo.

  • <link rel="preconnect" href="https://www.youtube-nocookie.com">
  • <link rel="preconnect" href="https://www.google.com">

demo demo

myApp myApp

When I checked the behavior with CodeSandBox, the thumbnail display did not work, but the playback did, so I figured that the lack of playback might be due to server-side processing.

es-ki avatar Jan 30 '22 04:01 es-ki