Video Player Autoplay

Permalink
Thanks in advanced for any help.

I have an mp4 video posted that I want to autoplay and loop. I am using the built-in video player block in Concrete 5.

I read an article here:
https://www.concrete5.org/community/forums/5-7-discussion/video-play...

about how to change view.php to get the loop working, but the only view.php I find that has these controls is at concrete/blocks/video/view.php, which I cannot modify.

I don't see any view.php with this info inside the application/ directory. I also don't have permissions to add a video/ subdir to the application/blocks directory, which is currently empty.

Is there a correct solution, or something wrong with my installation? I tried using an html block instead, but then I don't have all the necessary code to get resizing to work, etc.

My testing page is here:http://www.simmetrix.com/index.php/testingpage...

Any help would be appreciated.
Thanks,
Heather

HeatherMyers
 
HeatherMyers replied on at Permalink Reply
HeatherMyers
Actually, I think I'm getting close with just using an Html block. I have the following block:

<!DOCTYPE html>
<html>
<body>

<video width="100%" height="auto" controls loop="true" autoplay="true">
<source src="http://www.simmetrix.com/application/files/5816/0512/9183/zthinmoveanim.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

</body>
</html>

which does seem to resize as desired. I think I need to add a max-width in there as well to keep it from taking up the full screen.

Is there an issue with the "controls" section, should it just be "controls autoplay loop" or look like what I have?

Also, is the mp4 sufficient, or do I need the webm format as well?
JohntheFish replied on at Permalink Reply
JohntheFish
Rather than an HTML block, develop a custom template for the video block with the attributes you require.

The autoplay attribute may be disabled by browser security, browser settings or adblockers like plugins.
HeatherMyers replied on at Permalink Reply
HeatherMyers
JohntheFish,

You're saying to use the built-in Concrete player, but add the custom template to that? Just trying to be sure I understand.

I see that option when I click on the Video Player block "Design & Custom Template" but I don't really understand what that means. Is the template just CSS? How do you get a template to show up? I can start doing some google searching... thank you for the suggestion.

Heather
HeatherMyers replied on at Permalink Reply
HeatherMyers
https://documentation.concrete5.org/developers/working-with-blocks/working-with-existing-block-types/creating-additional-custom-view-templates/creating-a-template-file

I found this article that explains what you mean, I believe, I would copy the view.php from concrete\blocks\video into application\blocks\video\templates\myvideo.php

However my problem is that I don't have write access for application to create the subdir/page needed. I'll talk to the person who set up the installation, see if it can be added.
JohntheFish replied on at Permalink Reply
JohntheFish
Yes, that is the correct idea. Once you have the new block template configured and uploaded it will be more flexible and easier to maintain your video links than messing with html blocks.