Good Afternoon,
I have entered 4 different Videos into my Hesk Knowledgebase under one article. but the issue I have is all 4 videos play straight away.
How can I stop this and need the user to click Play on each video?
The Video Code I have is: (removed Source for security)
<p><iframe src="https://localhost/test.mp4" width="674" height="706" frameborder="0" allowfullscreen=""></iframe></p>
Video Auto Play
Moderator: mkoch227
Re: Video Auto Play
This is not something Hesk-specific. I would answer if I knew the answer, but unfortunately, I don't.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Video Auto Play
Good afternoonkevin_Webbers wrote: Thu Apr 11, 2024 11:40 am Good Afternoon,
I have entered 4 different Videos into my Hesk Knowledgebase under one article. but the issue I have is all 4 videos play straight away.
How can I stop this and need the user to click Play on each video?
The Video Code I have is: (removed Source for security)
<p><iframe src="https://localhost/test.mp4" width="674" height="706" frameborder="0" allowfullscreen=""></iframe></p>
To solve this problem, you need to add an 'allow' attribute with the value 'autoplay' to the 'iframe' tag and set its value to 'false'. This will disable automatic video playback. Additionally, I would added a 'muted' attribute set to 'true' so that the video is muted when loading.
This is what your video code should look like:
Code: Select all
<p><iframe src="https://localhost/test.mp4" width="674" height="706" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen autoplay="false" muted= "true"></iframe></p>
If I'm wrong, please indicate where the mistake was.
Last edited by shddcit on Thu Apr 11, 2024 4:46 pm, edited 1 time in total.
Re: Video Auto Play
I believe that this concerns the extended TinyMCE editor, which you use in the Hesk system and, in theory, does not relate to questions about Hesk technical support.Klemen wrote: Thu Apr 11, 2024 4:00 pm This is not something Hesk-specific. I would answer if I knew the answer, but unfortunately, I don't.
-
- Posts: 6
- Joined: Wed May 17, 2023 12:32 pm
Re: Video Auto Play
I would like to thank you so much for your help on this matter.
I though it was Hesk, but looking it seems more php/html script.
But thank you for your pointer, unfortunately when putting in the code, it removes all the allow=autoplay
here is the Code I have put in:
<p><iframe src="https://server/extras/SFB_Users.mp4" width="1058" height="722" frameborder="0" allow="autoplay" allowfullscreen="true" autoplay="false" muted= "true"></iframe></p>
This is what it changes it to:
<p><iframe src="https://server/extras/SFB_Users.mp4" width="1058" height="722" frameborder="0" allowfullscreen="true"></iframe></p>
I though it was Hesk, but looking it seems more php/html script.
But thank you for your pointer, unfortunately when putting in the code, it removes all the allow=autoplay
here is the Code I have put in:
<p><iframe src="https://server/extras/SFB_Users.mp4" width="1058" height="722" frameborder="0" allow="autoplay" allowfullscreen="true" autoplay="false" muted= "true"></iframe></p>
This is what it changes it to:
<p><iframe src="https://server/extras/SFB_Users.mp4" width="1058" height="722" frameborder="0" allowfullscreen="true"></iframe></p>
Re: Video Auto Play
Iframes are tricky to do right, but here are some guidelines that should help:
You will need to allow iframes in both TinyMCE and HTMLPurifier.
1. backup all files before making changes
2. make changes using a powerful editor like the free Notepad++. Do not use Microsoft Notepad.
3. first, you need to set up TinyMCE to allow iframes. In file /inc/tiny_mce/tinymce.inc.php find and just ABOVE that code add
4. second, you need some tricks for the HTMLPurifier library to accept iframes. Open file /inc/htmlpurifier/custom/heskIframe.inc.php and:
Change to
Change to
5. Upload the modified files to your help desk and test.
You may need to customize the above code additionally if you wish to pass further attributes etc. This is not something I will help with.
Be warned, though, that any changes you make, you do it at your own risk and only allow people you trust to submit HTML code to your Hesk.
You will need to allow iframes in both TinyMCE and HTMLPurifier.
1. backup all files before making changes
2. make changes using a powerful editor like the free Notepad++. Do not use Microsoft Notepad.
3. first, you need to set up TinyMCE to allow iframes. In file /inc/tiny_mce/tinymce.inc.php find
Code: Select all
});
</script>
Code: Select all
,extended_valid_elements : "iframe[class|src|border=0|alt|title|name|width|height|frameborder|allow|allowfullscreen|autoplay|muted]"
Change
Code: Select all
return '<iframe ' . $matches[1] . $extra . '></iframe>';
Code: Select all
return '<iframe ' . $matches[1] . $extra . ' frameborder="0" allow="autoplay" allowfullscreen="true" autoplay="false" muted= "true"></iframe>';
Code: Select all
return '';
Code: Select all
return '<iframe src="'.$matches[1].'" frameborder="0" allow="autoplay" allowfullscreen="true" autoplay="false" muted= "true"></iframe>';
You may need to customize the above code additionally if you wish to pass further attributes etc. This is not something I will help with.
Be warned, though, that any changes you make, you do it at your own risk and only allow people you trust to submit HTML code to your Hesk.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools