fix(player) Export provider classes#1425
Conversation
Removes type export and just exports the raw provider class so it can be used and extended in custom providers
|
Thanks for the PR! The providers are only type exports on purpose and tightly integrated into our own component system. They're not designed to be extended. Also providers are lazy loaded, if we export them then they will all be bundled which will unnecessarily increase bundle size for a lot of users as they don't use all providers. |
|
This makes total sense! But I think that it would still be useful to export the providers somehow using something like "import {} from "vidstack/providers/video" which wouldn't be included in anyone's bundle unless they directly import it. I believe that the provider model should be allowed to be extended because I don't see anything really specific that it's doing that shouldn't allow it to be extended. Especially the video provider. I would love to open another pr for this but your rollup config is confusing and I can't figure out how to export it that way (normally I just edit the package.json exports but that doesn't seem to do anything). If this could be implemented it would be a huge help to more advanced users that need custom video providers and want to integrate with the vidstack api. Hope to see some of this implemented! |
Related:
Description:
Removes type export and just exports the raw provider class so it can be used and extended in other custom providers
Ready?
yes
Anything Else?
Review Process: