Custom field and displaying video
-
- Sr. Bludit
- Posts: 30
- Joined: Wed Jul 19, 2023 6:51 pm
- Location: Paris - France
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Hi all,
Any idea why I got that error message trying to play a mp4 file ?
https://ibb.co/hZSVcQ4
I followed to the letter the doc. and I could make it work with a YouTube video. I replaced the <iframe> with <video> of course within the parser.
WBR,
Q
Any idea why I got that error message trying to play a mp4 file ?
https://ibb.co/hZSVcQ4
I followed to the letter the doc. and I could make it work with a YouTube video. I replaced the <iframe> with <video> of course within the parser.
WBR,
Q
Last edited by lesmegeres on Mon Sep 11, 2023 8:36 am, edited 3 times in total.
-
- Sr. Bludit
- Posts: 30
- Joined: Wed Jul 19, 2023 6:51 pm
- Location: Paris - France
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Hi and thanks for your request,
So here is the plugin parser :
Here is the custome field in JSON format within general parameters :
The code in the page to display the video :
Finally, here is the {{ value }} declared in new customer field added into page Options :
https://ibb.co/99sfSnZ
The url is : https://lesmegeresdelhumus/bl-content/uploads/video.mp4.
WBR,
Q
So here is the plugin parser :
Code: Select all
<video width="560" height="315" controls>
<source src="{{ value }}" type="video/mp4">
<source src="/bl-content/uploads/video.webm" type="video/webm">
<p>
Votre navigateur ne prend pas en charge les vidéos HTML5. Voici
<a href="{{ value }}">un lien pour télécharger la vidéo</a>.
</p>
</video>
Code: Select all
{
"video": {
"type": "string",
"placeholder": "Chemin vers la vid\u00e9o",
"label": "Vid\u00e9o \u00e0 inclure"
}
}
Code: Select all
Voilà ce que donnera l'inclusion vidéo (quand ça fonctionnera ;)):
{{ video }}
https://ibb.co/99sfSnZ
The url is : https://lesmegeresdelhumus/bl-content/uploads/video.mp4.
WBR,
Q
-
- Sr. Bludit
- Posts: 30
- Joined: Wed Jul 19, 2023 6:51 pm
- Location: Paris - France
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
-
- Sr. Bludit
- Posts: 30
- Joined: Wed Jul 19, 2023 6:51 pm
- Location: Paris - France
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Works locally but not on my online site.
Page with video is Spectacles.
Page with video is Spectacles.
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 78 times
- Contact:
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
-
- Sr. Bludit
- Posts: 30
- Joined: Wed Jul 19, 2023 6:51 pm
- Location: Paris - France
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
-
- Sr. Bludit
- Posts: 30
- Joined: Wed Jul 19, 2023 6:51 pm
- Location: Paris - France
- Has thanked: 3 times
- Been thanked: 2 times
- Contact: