collective / wildcard.media

13 stars 12 forks source link

Feature request: a TinyMCE button to add an embedded video with <video> tag #71

Open Rudd-O opened 4 years ago

Rudd-O commented 4 years ago

Hello. I have a reasonable / considerable amount of funding available to finance the implementation of a feature in wildcard.media that adds a TinyMCE button to embed a video/audio file already existing in a Plone site (whether it be WildcardVideo/Audio or regular Plone File), wth support for resolveuid URIs to preserve link integrity. The feature should present a chooser with the same features as the image chooser that allows users to embed images.

This chooser would be preferable to the (currently non-functional, see https://github.com/collective/wildcard.media/issues/70) wmvideo span method to convert links into embedded videos) -- it is okay if the existing method of embedding videos via span remains in the codebase, but the central point of this feature is a video embed chooser dialog for content uploaded to Plone.

The existing media insert feature in TinyMCE does not appear to support either selecting media or transforming src= links to resolveuid links.

A stretch goal would be to allow the upload of videos to a folder of the site via the chooser, much like the image chooser allows uploads of images as well.

Funding is also contingent on fixing Plone 5.2 compatibility as per https://github.com/collective/wildcard.media/issues/70 (I experienced the same problem).

Please contact me through here or over e-mail (rudd-o+plone@rudd-o.com) to discuss any details. Thanks.

zombified commented 4 years ago

I left a reply in #70 but I'll respond here as well:

  1. Regular Plone File types in Plone 5 can be given the behavior 'Video' or 'Audio' and should be able to use the wildcard.media features, though there may be an extra upload field associated with the type... the primary/required field should be the one that takes priority there.
  2. The TinyMCE 4 integration in Plone 5 is currently not working (in fact, only integration with Plone 4/TinyMCE 3 is present in the code base currently) and would need to be added. Currently, a work around would be to place a <span> element around a link, and then give the span a class of 'wcvideo', 'wcvideo video-small', 'wcvideo video-large', or 'wcaudio', depending on the purpose.
  3. The resolveuid links, along with the span, are replaced after page load by a pattern that fetches the html from the @@wildcard_video_macro and enables the media player. After the page loads, assuming the <span> tag with the correct classes are present around an anchor tag, the url on the video should be a direct link to a streaming view of the video -- IE something like /@@view/++widget++form.widgets.IVideo.video_file/@@stream

I see the two potentially features to pursue here as: 1) getting TinyMCE 4 integration in place, 2) adding TinyMCE menu options for uploading files directly.

If you'd like to pursue these features, you should be able to reach our Business Development & Marketing Specialist Hannah Meinholdt at hannah.meinholdt@wildcardcorp.com

Rudd-O commented 4 years ago

Excellent. I will compose a note today or Monday so that we can hit the ground running.

Rudd-O commented 4 years ago

I've sent you a note. Thanks!

Rudd-O commented 2 years ago

https://github.com/plone/plone.staticresources/issues/179