-
AuthorPosts
-
August 5, 2014 at 2:22 am #299957
Is there a way we can hardcode a way to disable the play / pause functionality on the fullscreen slider (when a background video is playing). It is disabled in the color-section video background, but not the slider..
Example: http://v5.12stone.com/
Example in Enfold Demo: http://kriesi.at/themes/enfold/homepage/home-v9-videos-and-parallax/
When a user clicks on the background, it pauses. I want to disable that. I’m using Vimeo to host.
August 5, 2014 at 6:18 am #300027Hey Alex!
Thank you for using Enfold.
You should NOT disable the autoplay option of the video then edit js > shortcodes.js, find this code on line 3277:
pp.attach(); return pp;
Replace it with:
pp.attach(); //return pp;
Remove browser cache then reload the page a few times.
Cheers!
IsmaelAugust 5, 2014 at 6:38 am #300034Hey Ismael,
Thanks for the response!
That does not stop the video from pausing / playing, it only removes pop-up animation of the play / pause:
August 6, 2014 at 3:18 pm #300685Hey Ismael,
Any other ideas? I feel like we’re on the right track.
Thanks,
Alex
August 8, 2014 at 5:44 pm #301753Hey!
You can try to hide the play/pause button with this css code – insert it into the quick css field:
#top .avia_playpause_icon{ display: none !important; }
Regards,
PeterAugust 8, 2014 at 6:33 pm #301771Hey Dude,
I’m not looking to hide the pauseplay icon. I want to disable the actual pause / play functionality altogether. Right now, if the full screen slide is clicked anywhere, the video will play.
Thanks in advance.
August 10, 2014 at 5:52 am #302168Hi!
The video slide in your homepage is unclickable for me, try adding this code to the Quick CSS though:
.avia-fullscreen-slider .mejs-mediaelement { pointer-events: none; }
Regards,
JosueAugust 12, 2014 at 4:09 pm #303275Hey Josue,
Thanks for the reply. I added your CSS, but that did not work.
I’m able to achieve what I need by going into the Enfold parent theme’s shortcodes.js and:
– removing the “pause” value from line 872.
– commenting out line 3278 (return pp;)HOWEVER, I feel that is just a hack and probably not the safest way to do this, and breaks my rule of touching the parent theme that will be overwritten in an update.
Any other suggestions?
August 12, 2014 at 4:17 pm #303279Hey!
You can’t remove the play/pause event without hacking the shortcodes.js file. If you want to make sure that a theme update does not overwrite your customized shortcode.js file copy it to the child theme folder (enfold-child/js/shortcodes.js) and add this code to the child theme functions.php file:
if(!is_admin()) add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 1); function avia_register_child_frontend_scripts() { $child_theme_url = get_stylesheet_directory_uri(); wp_dequeue_script('avia-shortcodes'); wp_enqueue_script( 'avia-shortcodes', $child_theme_url .'/js/shortcodes.js', array('jquery'), 1, true ); }
Note that we also update the parent theme shortcode.js file sometimes – thus I recommend to check the changelog here: http://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990#item-description__changelog and if the js folder (or shortcodes.js) was updated you also need to update the file in your child theme folder.
Cheers!
PeterAugust 12, 2014 at 9:27 pm #303435Thanks Dude,
In the effort of if being a little more efficient and avoid having to check for updates / overwrites, etc… is there a way to pass a filter with functions.php or “only” include this certain event on the child theme shortcodes.js ?
Also, what I’m curious about is why videos are not pausable when they’re the background of a color section but are pausable when they’re a fullscreen slider slide background.
-Alex
August 14, 2014 at 5:17 pm #304488Hey!
1) No, unfortunately not. The filters only work with php and not with jquery/js. There’s currently no hook to bypass the pause event with js code.
2) Because the pause button doesn’t make sense if the videos is displayed in the background. The content overlaps the video background (links inside the text, clickable images, etc.) and there’s simply no space to display a pause button. We wouldn’t be able to distingish between the “play/pause” click events and clicks on the overlapping content. The fullscreen slider on the other hand is not overlapped by other content or text links.
Cheers!
PeterAugust 14, 2014 at 6:06 pm #304521Thanks again for the response.
On your second point- I would disagree, because there IS content that goes over fullscreen sliders – the caption title, caption text, and buttons that are optional. (like the one I have on our home page).
Just a suggestion for a future release- Create an option to choose whether background videos are pausable (or not pausable) in the background of full screen sliders. I think a lot of people would find that useful.
August 15, 2014 at 9:18 am #304757Hi!
Thanks for the suggestion. Please use the feature request page here: https://kriesi.at/support/enfold-feature-requests/ – we use this page to collect all ideas.
Cheers!
Peter -
AuthorPosts
- The topic ‘Fullscreen slider disable pause/play’ is closed to new replies.