react-client icon indicating copy to clipboard operation
react-client copied to clipboard

Including videos from Nextcloud/Owncloud [or any other public source]

Open elearningdienst opened this issue 4 years ago • 7 comments

Is your feature request related to a problem? Please describe.

When you like to share videos you can use vimeo or youtube function:

#### YouTube

{%youtube aqz-KE-bpKQ %}

#### Vimeo

{%vimeo 124148255 %}

I would like to share videos out of nextcloud/ owncloud in the same manner.

Describe the solution you'd like

I would like to have something like that (with a public share):

{%video https://server.domain.de/link-to-shared-video %}

Describe alternatives you've considered

I have a workaround for that. I create a public link within owncloud/nextcloud an use that code snipped within the Makdown Code. That's ok, but for beginners somewhat strange.

<video poster="/apps/files_videoplayer/img/poster.png" src="https://cloud.elearningdienst.de/index.php/s/5aF2fLB3T3FXNZH/download" width="720" controls><source src="https://cloud.elearningdienst.de/index.php/s/5aF2fLB3T3FXNZH/download" type="video/mp4"></video>

The mime type can be changed to your needs e.g. audio/mp3 or video/mkv.

Or, alternatively

<video poster="/apps/files_videoplayer/img/poster.png" src="https://cloud.elearningdienst.de/index.php/s/5aF2fLB3T3FXNZH/download?.mp4" width="720" controls><source src="https://cloud.elearningdienst.de/index.php/s/5aF2fLB3T3FXNZH/download?.mp4"></video>

Here is a sample Pad: https://eldshort.de/xpzsf6

Additional context

I saw, that there are discussions about the integration of hedgedoc with nextcloud, maybe that feature can be considered combined with that topic.

If that small code snippet (optionally including a MIME/Type detection) will be behind a {%video <publiclink> %} that would be great ;-)

elearningdienst avatar Oct 18 '21 18:10 elearningdienst

I think this an interesting idea, but something we should tackle after 2.0.

Some things that came to mind:

  • I think it would be best if this was implemented as an generic video embedding instead of NextCloud specific. (Any hints on how to use NextCloud with this could be put into our documentation)
  • We should think about the syntax, currently we support these strange Vimeo and YouTube links, but we've deprecated them for 2.0. Instead we know detect plain YouTube / Vimeo links and show the embedding. We probably could also detect urls ending with some common file extensions for video. As we already Support quite a few of those for the upload feature this seems doable. This syntax suggestions is quite nice to be same-y to all the other video embeddings, but makes it rather difficult to include any thumbnail as those are typically extra files (I'm not 100% certain, wo maybe further research is necessary). Also it seems problematic with NextCloud Share URLs as those do not include any file extension to regex then by…

DerMolly avatar Oct 18 '21 21:10 DerMolly

I agree, a general video enhanchment would be best.

But remember: Nextcloud/Owncloud shares are very common in educational context. There is a trick to share videos out of Nextcloud/Owncloud with almost any webapp even there is the problem of the non existing extension

You just have to add /download?.extension to the external link.

Example for a mp4 video: https://cloud.elearningdienst.de/index.php/s/jya3yLR3oBS98Ac/download?.mp4

and - as you shorten the link including the /download - this works even with shortlinks

https://eldshort.de/feyl2l?.mp4

I tried that with BigBlueButton, H5P and Rocket.Chat

So the user can be hinted to "set" the type as "parameter" with a call of the function.

Works even with webm and m4v (and as well mp3) that are the common extensions I tried out.

elearningdienst avatar Oct 18 '21 21:10 elearningdienst

Good to know about the extension trick.

DerMolly avatar Oct 18 '21 22:10 DerMolly

Query vs. Fragment Parameter

It is better to use the # (fragment) instead the ? (query) parameter as said before. Details here but both worked.

https://eldshort.de/feyl2l#.mp4

elearningdienst avatar Oct 19 '21 11:10 elearningdienst

We probably could also detect urls ending with some common file extensions for video.

Veto. Never rely on url patterns for mime types. That's why we still have the PDF short code.

mrdrogdrog avatar Oct 19 '21 12:10 mrdrogdrog

So you'd want to persuit

{%video $url%}

?

DerMolly avatar Oct 19 '21 18:10 DerMolly

Yes

mrdrogdrog avatar Oct 19 '21 18:10 mrdrogdrog