primocms / primo

Primo is a visual CMS with a built-in code editor, Svelte blocks, and static site generator.
https://primocms.org
MIT License
1.91k stars 468 forks source link

Svelte Video Component #377

Open MashdorDev opened 4 months ago

MashdorDev commented 4 months ago

Is your feature request related to a problem? Please describe. Yes, integrating video content is currently cumbersome.

Describe the solution you'd like Implement a Svelte-based video component for Primo, enabling easy video integration with customizable options like source URLs, autoplay, loop, and control visibility.

Describe alternatives you've considered Using custom HTML blocks, which is less efficient.

Additional context A video component would enrich site content and user engagement, seamlessly integrating with Svelte for dynamic and efficient video handling.

rallisf1 commented 2 months ago

Primo's component library and templates are more of a Proof of Concept, rather than a toolkit to build your websites. If you are not in a position to write your own components then I'm afraid Primo is not for you (yet).

Keep in mind that you can use most svelte and vanilla libraries, like plyr or mux-video, to help you build your component, although the less dependendies the better.

P.S. I haven't used any libraries for video playback as Youtube's iframe and standard HTML5 video suffice for my needs.

P.S.2. Primo uses the TipTap editor, which has a Youtube extension. The problem is that the editor's configuration is global for all websites you build with Primo. This is not ideal; as you cannot change the Youtube's player configuration, in this instance, per website. That's the reason Primo uses so few TipTap extensions.

MashdorDev commented 2 months ago

Hey @rallisf1, I appreciate your response. I have added a video as an iframe to my project. Would you mind if I made a proof of concept for the video component?