Voltra / vue-player

A Vue port of react-player: components for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia, Mixcloud, DailyMotion and Kaltura.
MIT License
4 stars 1 forks source link

Error on import #1

Open atif0075 opened 7 months ago

atif0075 commented 7 months ago

Uncaught TypeError: Cannot read properties of undefined (reading 'name')

import VuePlayer from "@voltra/vue-player"
Voltra commented 7 months ago

From what I read in the source code, the import should be:

import { VuePlayer } from "@voltra/vue-player"
atif0075 commented 7 months ago

Still same error

Screenshot 2024-02-03 at 9 13 24 PM
Voltra commented 7 months ago

Does upgrading to v0.0.3 fix the issue?

atif0075 commented 7 months ago

No, it's still the same issue.

atif0075 commented 7 months ago

I think the problem is due to webpack, it is not compatible with Vite.

Voltra commented 7 months ago

So it would seem. It's gonna be tricky to both keep the browser support the exact same, and migrate to vite for compatibility

atif0075 commented 7 months ago

Maybe, For now, I am using the same react-player in my vue project with the help of a package vuaury. It is working well in my vue vite project.

However, I prefer a Vue-only solution since there is currently no other video player that is as powerful for Vue available.

Voltra commented 7 months ago

I'll try making a vite-compatible bundle asap

Voltra commented 7 months ago

It should be vite-compatible now

atif0075 commented 7 months ago

It is compatible now, but it is not showing any output. If you are trying to make it compatible with both vue2 and vue3, have a look at Vue Demi.

Fresh Project

https://github.com/Voltra/vue-player/assets/64689549/498899d2-4f58-4c69-95f9-944ade6b5947

Voltra commented 7 months ago

Strange, I'm not using anything Vue 2 or Vue 3 specific :c

I might need to make a full rewrite for v1

atif0075 commented 7 months ago

That would be better.

atif0075 commented 2 months ago

Hi @Voltra, Is there any new information available regarding this issue?

Voltra commented 2 months ago

Hi, I haven't worked on this for now. I'll take a look at how I could integrate Vue-Demi or switch to a new webpack build system I cooked up for better imports and that should make it compatible with everything