Giter VIP home page Giter VIP logo

Comments (8)

anteriovieira avatar anteriovieira commented on August 19, 2024 1

I will migrate to version 3 soon.

from vue-youtube.

jameshwc avatar jameshwc commented on August 19, 2024

same here

from vue-youtube.

sampullman avatar sampullman commented on August 19, 2024

I think migrating this to Vue3 is pretty easy:

  • beforeDestroy -> beforeUnmount
  • Use render() { return Vue.h('div'); } instead of render(h) { return h('div'); }
  • Maybe something minor in the library setup

from vue-youtube.

olemarius avatar olemarius commented on August 19, 2024

Any ETA for migrating to vue 3 ?

from vue-youtube.

ggraca avatar ggraca commented on August 19, 2024

Also looking forward to getting Vue 3 support. Did anyone found a workaround in the meantime?

from vue-youtube.

jameshwc avatar jameshwc commented on August 19, 2024

I just injected the api js as a workaround.

  setup(props, context) {    
    var tag = document.createElement('script')    
    tag.src = 'http://www.youtube.com/iframe_api'
    const firstScriptTag = document.getElementsByTagName('script')[0]    
    firstScriptTag.parentNode?.insertBefore(tag, firstScriptTag)
}

Then you can assign player= new YT.player and use its api.
details at my repo: https://github.com/jameshwc/Million-Singer-Vue-Frontend/blob/main/src/views/Song.vue

from vue-youtube.

ainarend avatar ainarend commented on August 19, 2024

I created a PR with the changes necessary to get it working with Vue3:
#82

I did not have time to fully dive into to the rollup setup, so ignore the changes i made in the PR to the /dist folder, i made those only to get the component working for my own project.

from vue-youtube.

wobsoriano avatar wobsoriano commented on August 19, 2024

Published a lightweight component that works with both Vue 2/3

https://github.com/wobsoriano/vue-lite-youtube-embed

from vue-youtube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.