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.
Local video
-
- Posts: 29
- Joined: 2017-03-12 09:26
- Contact:
Re: Local video
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
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
Ionut Bocanet
Re: Local video
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):
Just a suggestion to point the direction. Please update us if this works.
Olaf
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>
Olaf
Some postings I was involved, you might find useful:
Multi Path Upload (MPU) / dynamic upload folder; SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button
Multi Path Upload (MPU) / dynamic upload folder; SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button
Re: Local video
Hi,
typo ... copy& paste error:
Olaf
typo ... copy& paste error:
should be the name of your field that saves the uploaded file (e.g. your upload field)Bild_Datei
Olaf
Some postings I was involved, you might find useful:
Multi Path Upload (MPU) / dynamic upload folder; SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button
Multi Path Upload (MPU) / dynamic upload folder; SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button