Comments (8)
I will migrate to version 3 soon.
from vue-youtube.
same here
from vue-youtube.
I think migrating this to Vue3 is pretty easy:
beforeDestroy
->beforeUnmount
- Use
render() { return Vue.h('div'); }
instead ofrender(h) { return h('div'); }
- Maybe something minor in the library setup
from vue-youtube.
Any ETA for migrating to vue 3 ?
from vue-youtube.
Also looking forward to getting Vue 3 support. Did anyone found a workaround in the meantime?
from vue-youtube.
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.
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.
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)
- iframe is unable to load video
- event methods suddenly stopped working HOT 3
- Hide related videos HOT 1
- Modestbranding is not working
- If video is unavailable trigger the error function
- youtube 401 code error
- Add a prop for disabling controls on iframe HOT 1
- Missing @types/vue-youtube
- Youtube Api Key
- is there any way to remove ytp-pause-overlay ? HOT 1
- Add onApiChange event
- how to change height HOT 1
- Doesnt work with Vue 3.0 HOT 8
- Incorrect duration returned
- Trying to install it, I get the error: ERESOLVE unable to resolve dependency tree HOT 1
- Loading mixed (insecure) display content
- How to use YouTube video as the background?
- Missed Opportunity
- Failed to construct 'PresentationRequest': The document is sandboxed and lacks the 'allow-presentation' flag. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-youtube.