Comments (16)
I didn't encounter that issue, but there seems generally either be a wrong version used.
The package.json says v5 but either the readme is wrong or the dist/ is wrong since in v4 it was stated that:
- Renamed main component from
<plyr>
to<vue-plyr>
.
But doing <vue-plyr>
just results in Vue telling me that vue-plyr
is indeed not a thing. Changing it to <plyr>
works indeed.
from vue-plyr.
I'll take a look as soon as I get home.
from vue-plyr.
Been gettin Unknown custom element
errors in Vue.
I renamed <vue-plyr>
to <plyr>
and the error suddenly went away.
from vue-plyr.
@redxtech Any updates?
from vue-plyr.
@iCrawl @qarthandgi Apparently it's compiling old version which is why we don't see vue-plyr
and instead plyr
which is only present in previous versions of the project.
from vue-plyr.
Hey sorry guys I'll take a look at this later today. I've had some personal stuff going on the past week or so and haven't been able to spend any time on this component.
from vue-plyr.
Ok I checked it out and published a new version (5.0.2) which should fix this error. Let me know if it doesn't work for you.
@irazasyed @iCrawl @qarthandgi
from vue-plyr.
@redxtech I can't make it work. You can check out my absolutely minimal nuxt project (which I published for you) here: https://github.com/akarelas/test-vue-plyr
Has just two commits - first is how next scaffolded it, and the second is how I modified it for vue-plyr.
Installation and running instructions are on the project repo's homepage.
You can test it if you like.
from vue-plyr.
@redxtech Thanks for looking into this issue. The new patch has everything except the export of VuePlyr
and it still is missing when I try to import it.
Ex:
import { VuePlyr } from 'vue-plyr'
I want to add this as a component inside a component. While the source file does export VuePlyr
, for some reason it's missing in the compiled version.
from vue-plyr.
Does the source file export it? I thought I removed that to bypass the named exports thing where the default export needed to be VuePlyr['default']
. Now you can just import VuePlyr from 'vue-plyr'
and then Vue.use(VuePlyr)
from vue-plyr.
@redxtech It was exporting earlier and I downloaded this repo and manually importing the index file into my project and it works good (With that export we had earlier).
I don't want to include it as a global component which is why I'm importing into just one component I have in my project as its usage is limited to one section of the project. Please consider adding it back.
from vue-plyr.
@akarelas that is an entirely different error altogether. That is currently open at #32 & sampotts/plyr#1220. Needs to be fixed upstream.
from vue-plyr.
@irazasyed I'll look into a nice way to have both default and named exports. Just a question though, is there any performance improvement to having the component installed locally or is is just preference to not globally install it? Also the reason that cloning the repo was probably because you were using the master branch which I hadn't merged the patch into yet.
from vue-plyr.
@irazasyed I added the named imports back and changed the install options to use the umd build so it wouldn't cause an error when importing via the <script>
tag. I'll close this some time tomorrow unless someone still has an issue by then.
from vue-plyr.
@redxtech I can confirm it's working good now. Thank you.
As for your question, it is for performance and preference both reasons. This would allow me to lazy load the entire component which relies on vue-plyr
when required instead of loading all globally which the component has no use anywhere else. Further, there would be no conflicts with component names in case any other components share the same name now or in future of my own or third-party package. Just keeps components organized and isolated.
from vue-plyr.
@irazasyed yeah ok that makes complete sense - I completely forgot about lazy loading in this case. Glad it worked out.
from vue-plyr.
Related Issues (20)
- Help me
- 'npm install vue-plyr' error? HOT 3
- sampotts/plyr.git develop Permission denied HOT 3
- Not working with HLS mp4s
- Add subtitles to a Youtube iframe
- default controls shown in the demo page its not coming
- Vue Plyr 7.0.0 causes npm ci in Docker fail with error 401 HOT 3
- Any maintenance status update for this (lovely) package? HOT 3
- Installation of dependency sampotts/plyr extremely slow
- Quality settings closes
- Cannot change vimeo source dynamically - error: Unknown player. Probably unloaded
- reload componentn when language changed
- `v-if` not working with plyr.
- Controls disappears in full screen HOT 1
- Fails to compile if importing css as in the example
- How can I use it Nuxt3 app HOT 3
- Customizing player
- Nuxt 3 SSR HOT 2
- Cannot load videos using Hls.js on Vite
- Vue3 update starting time
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-plyr.