vue-lazy-youtube-video
vue-lazy-youtube-video copied to clipboard
How to add a custom icon to the player
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?
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>