cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

Add video support

Open MoBOatGVA opened this issue 5 years ago • 9 comments

It would be wonderful if you can add video support on your app. I prefer to have it within the app instead of an extra URL.


Depends on #1133

MoBOatGVA avatar Sep 08 '20 10:09 MoBOatGVA

@sam-19 I fear I have to ask you again, do you know any feature of the current UI to view videos in general?

The thing is, we did not yet download the videos. This would cause huge files and storage requirements for the NC installation. Do we want that?

@MoBOatGVA could you provide a link to a recipe with video included?

christianlupus avatar Sep 18 '20 06:09 christianlupus

I'm not in the app dev but there is an app which is active on nextcloud: https://github.com/nextcloud/files_videoplayer

I thought it could be used to display video. In the "cooking process", having some video explaining the full recipe ou some tricky parts, could be wonderful.

Regarding the size, then it will depend on the administrator of the site if this option is activated or not. The videos should be only "linked" and not within your app in my opinion and, why not, even directly to another web site.

But again, not sure if this is possible but HEY!!! Don't you think it would be great ?

BTW, Thanks for your reply

MoBOatGVA avatar Sep 18 '20 07:09 MoBOatGVA

All other content are located on the NC once the recipe is imported. This allows to look at the recipe (with all information included like images,...) once the original recipe was removed/changed. Of course we could try to make it possible using an iframe or a popup but this could trigger protection measurements .

Anyway, do you have a link to a recipe which contains a video?

christianlupus avatar Sep 18 '20 07:09 christianlupus

Sure : https://ricette.giallozafferano.it/Gnocchi-di-patate.html

PS : I usually save them locally when I can, never know

MoBOatGVA avatar Sep 18 '20 08:09 MoBOatGVA

I just started a new branch in order to test the possibilities. Unfortunately, it seems that the default docker configuration prohibits external resources. As I assume many default configurations and tutorials are enforcing/encouraging this, we might only have the chance to

  1. Download all videos (of interest)
  2. Open the video in a new tab/window of the browser completely independent of the app
  3. Try to be creative by proxying the data stream through the NC.

I fear version 3 is technically a bad option through PHP and also not the most stable one. The most robust seems to be 2 on my first look. Would that work @MoBOatGVA?

christianlupus avatar Oct 24 '20 14:10 christianlupus

How about if we ask the user on recipe import if he wants to download the video if there is only one or a selection of videos if there are multiple into NC? If the video file size would be displayed this would help the user making a decision.

seyfeb avatar Oct 24 '20 14:10 seyfeb

I do not know if we can get the size of the videos a priori. If the remote server is not providing this information, we might end up downloading it and then dropping it again (maybe asynchronously to avoid duplicate downloads).

The thing is: Adding a link is something of a few lines of code and thus quickly realizable. Adding such an asynchronous task with download and all that might be quite more involved. If the simple link is sufficient, I'd rather suggest to use that for now. Further additions/enhancements might be possible later. Especially as we need to finish #340 and implement some class to get that running to have all the downloading stuff done.

christianlupus avatar Oct 24 '20 15:10 christianlupus

Wouldn't a much simpler solution to this just to be to save the link only and then present that just as a "Play video" button which then opened the link in a new tab? That way there's no saving huge videos, iframes or anything like that. If people want the videos local, they can still use the NC video player link...

Bugsbane avatar Oct 05 '21 17:10 Bugsbane

This PR/issue depends on:

github-actions[bot] avatar Aug 02 '22 08:08 github-actions[bot]