Page 1 of 1

Local video

Posted: 2020-11-16 20:08
by Moh Youba
Hello dear AppGini family

Is it possible to create a video field and embed local videos. I want to add my own video et let user play it directly from the field.

Thank you for any help.

Re: Local video

Posted: 2024-06-05 11:25
by Ionut Bocanet
Hello,

Did somebody succeeded to do this?

I am very much interested with this functionality as well.

I am not allowed to upload sensitive data outside company domain; so I would want to integrate video field and when pressed to open the video directly without download.

Currently I am doing this manually in different .html or .php files

Re: Local video

Posted: 2024-06-19 05:20
by onoehring
Hi,

just a quick suggestion how this could work (not tested).
Preamble: You can embed mp4 videos quite easily into HTML ( https://duckduckgo.com/?q=html+embed+mp4 ) , so this is something we can use.

You may need an upload field for the video to be uploaded.
As this field holds the filename (location comes from config.php, usually 'baseUploadPath' => "images" ) we know, where the file is.
So, we probably need to adjust /templates/tablenameDV.html and/or /templates/tablenameTV.html and simply add new code to it: Not only the generic AG upload field should be shown, but also the video itself. Hold your horses for the DV-file, AG recommends:
To change the layout of the detail view form, we recommend using JS code in hooks/tablename-dv.js rather than editing this file -->
Maybe better do it that way :-)

The code then should be something like this - where you want the video to appear (formating? ... do it yourway):

Code: Select all

<video width="500" controls autoplay>
  <source src="<%%BASE_UPLOAD_PATH%%><%%VALUE(Bild_Datei)%%>" type="video/mp4" />
  Your browser is outdated, update it to display the video
</video>
Just a suggestion to point the direction. Please update us if this works.
Olaf

Re: Local video

Posted: 2024-06-19 06:15
by onoehring
Hi,

typo ... copy& paste error:
Bild_Datei
should be the name of your field that saves the uploaded file (e.g. your upload field)

Olaf