Tagged: ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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.

    #300027

    Hey 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!
    Ismael

    #300034

    Hey Ismael,

    Thanks for the response!

    That does not stop the video from pausing / playing, it only removes pop-up animation of the play / pause:

    http://v5.12stone.com

    #300685

    Hey Ismael,

    Any other ideas? I feel like we’re on the right track.

    Thanks,

    Alex

    #301753

    Hey!

    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,
    Peter

    #301771

    Hey 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.

    #302168

    Hi!

    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,
    Josue

    #303275

    Hey 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?

    #303279

    Hey!

    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!
    Peter

    #303435

    Thanks 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

    #304488

    Hey!

    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!
    Peter

    #304521

    Thanks 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.

    #304757

    Hi!

    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

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Fullscreen slider disable pause/play’ is closed to new replies.