Video Player & Autoplay

Permalink
I'm working with the 'base model' of the video player that comes with 5.7 and noticed that the code suggests autoplay is enabled:

<param name="autoplay" value="true">

<embed src="http://.../application/files/4014/5943/3319/intro.mp4.mp4" width="900" height="334" autoplay="true" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/">


And yet, the video does not automatically play. Is there any way to make it do so? I may also be missing something very obvious...

Also, does anyone know how to make a video play simply by clicking on the freeze-frame image instead of needing to actually click on the play button on the controller?

Thanks for sharing your expertise and knowledge!

viriesque
 
Steevb replied on at Permalink Reply
Steevb
Try replacing line 26 in view.php with code below:
<video controls="controls" autoplay="true" <?php echo $posterURL ? 'poster="'.$posterURL.'"' : '' ?> style="max-width: 100%;">

It was easier to give the line than tell you where to put 'autoplay'.
viriesque replied on at Permalink Reply
viriesque
I tried replacing line 24 (which looked most similar to what you wrote) with the line of code you provided. Also, line 26 in the document located at this path: root/concrete/blocks/video/view.php

Neither of those solutions worked out. Is there a different view.php file I should have edited?

Thank you for your help!
Steevb replied on at Permalink Reply
Steevb
Sorry but line 24 for me is a closing div?

Just modify line 26.
hutman replied on at Permalink Reply
hutman
What version of Concrete5 are you using?
viriesque replied on at Permalink Reply
viriesque
I am using 5.7.5.6

And I did try to edit both lines 24 and 26 separately. Neither of these worked.
hutman replied on at Permalink Reply
hutman
My line 24 looks like this to begin with

<video controls="controls" <?php echo $posterURL ? 'poster="'.$posterURL.'"' : '' ?> style="max-width: 100%;">

If that is replaced with

<video controls="controls" autoplay="true" <?php echo $posterURL ? 'poster="'.$posterURL.'"' : '' ?> style="max-width: 100%;">

And then the clear the cache of the site, it autoplays.
viriesque replied on at Permalink Reply
viriesque
My line 24 now looks like this:
<video controls="controls" autoplay="true" <?php echo $posterURL ? 'poster="'.$posterURL.'"' : '' ?> style="max-width: 100%;">


I've emptied the cache four times just to be extra, EXTRA sure...and alas; no luck.

Would it be easier to somehow make the whole video window to serve as a play button to easily allow for viewers to tap the video and begin it?
hutman replied on at Permalink Reply
hutman
You're sure that the video player you are looking at doesn't have a custom template, or that the view isn't already overridden in the applications directory? If you use your developer tools can you see that line showing in the HTML of the page?
viriesque replied on at Permalink Reply
viriesque
Sorry for the long hiatus, here. (And thank you for your help!)

I can't see that particular line of code, but I do see where the autoplay should be on. I've checked for custom styles that the theme might already have but can't find any. Beyond that, I'm not sure if the view is overridden or not. Is there some way to check whether or not it is being overridden?
hutman replied on at Permalink Reply
hutman
If you go into application/blocks if there is a video directory there with a view.php in it, it has been overridden. Just to be clear, you are using the C5 "Video Player" block, right?
viriesque replied on at Permalink Reply
viriesque
In the application/blocks directory via FTP there is nothing inside it at all.

Edit: And yes - this is the 'out of the box' Video Player that comes with the initial 5.7 install.