Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom iframe provider by EmbedProvider #1530

Open
JimmyLv opened this issue Dec 8, 2024 · 0 comments
Open

Support custom iframe provider by EmbedProvider #1530

JimmyLv opened this issue Dec 8, 2024 · 0 comments
Labels
feature New feature or request

Comments

@JimmyLv
Copy link

JimmyLv commented Dec 8, 2024

Related Problem:

Currently, Vidstack player only supports built-in iframe providers like YouTube, Vimeo etc. There's no way to add custom iframe video providers by extending the EmbedProvider class, which limits the extensibility of the player.

Describe:

Add support for custom iframe providers by allowing users to extend the EmbedProvider class. This would work similar to how the built-in YouTube provider is implemented.
This would enable users to:

  • Add support for any iframe-based video platform
  • Define custom URL patterns and embed URL formats
  • Implement custom logic for extracting video IDs
  • Register custom providers with the player

Alternatives:

  1. Use <iframe> element directly - This works but loses the benefits of Vidstack's provider system like unified API and events.

  2. Fork and modify the core player - Not sustainable as it requires maintaining a separate codebase.

Anything Else?

This would greatly enhance Vidstack's extensibility and make it more appealing for projects that need to support custom video platforms.

Technical Notes:

  • Should follow similar patterns as existing providers (YouTube, Vimeo)
  • Need to consider security implications of custom iframe sources
  • Should document the provider interface thoroughly
@JimmyLv JimmyLv added the feature New feature or request label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant