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:
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!
<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!
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!
Neither of those solutions worked out. Is there a different view.php file I should have edited?
Thank you for your help!
Sorry but line 24 for me is a closing div?
Just modify line 26.
Just modify line 26.
What version of Concrete5 are you using?
I am using 5.7.5.6
And I did try to edit both lines 24 and 26 separately. Neither of these worked.
And I did try to edit both lines 24 and 26 separately. Neither of these worked.
My line 24 looks like this to begin with
If that is replaced with
And then the clear the cache of the site, it autoplays.
<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.
My line 24 now looks like this:
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?
<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?
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?
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?
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?
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?
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.
Edit: And yes - this is the 'out of the box' Video Player that comes with the initial 5.7 install.
It was easier to give the line than tell you where to put 'autoplay'.