Integrating new video platforms

I intentionally placed this in development as it is not a feature request exactly.
Right now, the embed video button only supports YouTube and Vimeo.
I am working for a German company operating the multilingual video platform and we’d like to implement support for our videos in Zammad. Adding it directly to Zammad is quite an easy task (about 5 or 6 lines in total).

I have seen that you are hesitant to add any new features to the core product and would prefer people to use the (currently undocumented) Zammad packages to develop their own extensions. The main issue with this is that adding another video platform to the embed video functionality requires changing the config at which I suppose is not possible from within an extension.

My main question is therefore whether you are up to adding other video platforms besides YouTube and Vimeo in the core functionality or if you would prefer each video platform to be a separate extension with (I suppose) its own button and implementation. If you prefer the latter case, do you have any hints on how the content security policy could be altered?

1 Like

Hey @niklaskorz - you nailed it :hammer: We’d prefer an addon for now which provides the required functionality you described (button, template tag etc.). You should be able to add a Rails Initializer as (e.g. the folks at digital resilience are doing it for their Zammad fork Link) and access the Rails.application.config.content_security_policy object and alter the frame_src as you need it.

Let me know if this works for you! Happy hacking :nerd_face:

I was trying to do something similar and noticed this post also wanting to change content policy.

The code I have so far is

Rails.application.config.after_initialize do
  Rails.application.config.content_security_policy.directives['frame-src'] |= ['']

However, I was only able to get it to take effect by restarting Zammad. Is this expected?

1 Like

Hey @neil - welcome to the community! It is expected. Zammad is build with the Rails framework from which the initializer functionality comes from. Adding a new or changing an existing initializer requires the restart of the whole Rails / Zammad application to take place.

1 Like