vue-lazy-youtube-video icon indicating copy to clipboard operation
vue-lazy-youtube-video copied to clipboard

How to add a custom icon to the player

Open csakiistvan opened this issue 4 years ago • 1 comments

I would like to add a custom player icon to my site, and the documentation and the vue dev tools does not said the same. In the dev tools I can not see the icon or button slot, but the documentation say I just need an icon slot like this

<lazyYoutubeVideo :src="video.frontmatter.url" :alt="video.frontmatter.title" > <icon> <img src="./logo.svg" /> </icon> </lazyYoutubeVideo>

But unfortunately it is not working. Do you have any snippet how should I use it?

csakiistvan avatar Nov 20 '20 12:11 csakiistvan

I haven't used this component myself, I was just looking for a Youtube Vue component, but I think I can answer your question. You have to use the Vue slots. You can find more information about name slots here.

<lazyYoutubeVideo :src="video.frontmatter.url" :alt="video.frontmatter.title">
  <slot name="logo">
    <img src="./logo.svg" />
  </slot>
</lazyYoutubeVideo>

RubenVanEldik avatar Jan 11 '21 18:01 RubenVanEldik