Local video

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
Moh Youba
Veteran Member
Posts: 235
Joined: 2017-03-12 09:31

Local video

Post by Moh Youba » 2020-11-16 20:08

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.

Ionut Bocanet
Posts: 29
Joined: 2017-03-12 09:26
Contact:

Re: Local video

Post by Ionut Bocanet » 2024-06-05 11:25

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
Best Regards,
Ionut Bocanet

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1201
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Local video

Post by onoehring » 2024-06-19 05:20

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

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1201
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Local video

Post by onoehring » 2024-06-19 06:15

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

Post Reply