andrewvasilchuk / vue-lazy-youtube-video

Vue.js component for lazyloading YouTube videos.
MIT License
103 stars 21 forks source link

vue 3 global api breaking changes #26

Open ahmedh01 opened 4 years ago

ahmedh01 commented 4 years ago

looks like the new way of how the vue app is created and mounted via the global api introduced some breaking changes, making this unusable in vue 3 at the moment. reference: https://v3.vuejs.org/guide/migration/global-api.html#a-new-global-api-createapp

andrewvasilchuk commented 4 years ago

@ahmedh01, Thanks for creating the issue, I'll try to investigate how to support both 3.x and 2.x soon.

NtchPlayer commented 2 years ago

Hi @andrewvasilchuk ! Do you have any plan for the support of Vue3 on this plugin ? He is really use full and simple to use 👍

agracia-foticos commented 7 months ago

Please support for this plugin for Vue 3!

arthabus commented 2 weeks ago

For anyone ended up here who is just looking to optimize youtube embed videos, have a look at a vanilla js option that works in vue out of the box:

https://github.com/paulirish/lite-youtube-embed

usage:

mycomponent.vue:

<template>
    ...
    <lite-youtube :videoid="youtubeUrlIdComputed"></lite-youtube>
    ...
</template>

<script>
    ...
    import 'lite-youtube-embed';
    import 'lite-youtube-embed/src/lite-yt-embed.css';
    ...

    export default {
          ...
    }
</script>

This library internally creates a custom HtmlElement and registers it in the window scope as a "lite-youtube" tag