Autostart/Autoplay video in InFocus slider

(11 posts) (5 voices)

  1. cmusuraca
    Member

    Hello, I've read through the threads (which seem to have fallen silent 8 months ago) regarding this topic. I've scoured the core.php file (NOT a programmer) but found the video code, not sure if I can change any parameters there.

    That said, is there a simply (or complex - I can copy-and-paste code overwrites), to get the vimeo video to autostart or play.

    In slider
    http://wwwvimeo.com/​moogaloop.swf?clip_id=139894&autoplay=true <-- doesn't work
    http://www.vimeo.com/6936029&autoplay=true <-- doesn't work
    Thanks in advance!

    Posted 5 years ago #
  2. Webtreats
    Support

    Hi cmusuraca,

    Open up the following file on your server wp-content/themes/infocus/lib/functions/core.php

    And replace line # 468 :

    return do_shortcode( '[vimeo url="' . $url . '" title="0" fs="0" portrait="0" height="' . $height . '" width="' . $width . '"]' );

    With this :

    return do_shortcode( '[vimeo url="' . $url . '" title="0" fs="0" portrait="0" autoplay=1 height="' . $height . '" width="' . $width . '"]' );

    Let me know if it works for you.

    Posted 5 years ago #
  3. motionmanager
    Member

    Hi,
    the problem of this solution is, that it will force all vimeo videos on the whole website to autostart, not only in the slider!

    Posted 4 years ago #
  4. Elliott
    Support

    That code should only be for the slideshow videos. Try deactivating all of your plugins and send us a link. Also paste the code your using here.

    Posted 4 years ago #
  5. motionmanager
    Member

    Hi,
    I'm using the elegance theme.

    /wp-content/themes/elegance/lib/functions/core.php - line #461-481:

    function mysite_video( $args = array() ) {
     
    	extract( $args );
     
    	# Vimeo video
    	if( preg_match_all( '#http://(www.vimeo|vimeo)\.com(/|/clip:)(\d+)(.*?)#i', $url, $matches ) ) {
    		if( !empty( $parse ) )
    			return do_shortcode( '[vimeo url="' . $url . '" title="0" fs="0" portrait="0" autoplay='.$autoplay.' loop='.$loop.' height="' . $height . '" width="' . $width . '"]' );
    		else
    			return 'vimeo';
     
    	} elseif( preg_match( '#http://(www.youtube|youtube|[A-Za-z]{2}.youtube)\.com/(.*?)#i', $url, $matches ) ) {
    		if( !empty( $parse ) )
    			return do_shortcode( '[youtube url="' . $url . '" controls="' . ( empty( $video_controls ) ? 0 : 1 ) . '" showinfo="0" fs="1" height="' . $height . '" width="' . $width . '"]' );
    		else
    			return 'youtube';
     
    	} else {
    		return false;
    	}
    }
    Posted 4 years ago #
  6. motionmanager
    Member

    hello,

    does the link in the previous post help you to pause the slider during a video is runing?

    vimeo gives you feedback through the appi - so I guess it can´t be a big deal?

    thank you chris

    Posted 4 years ago #
  7. Elliott
    Support

    I'll move this to feature requests and we'll take a look at adding this in a future update.

    Posted 4 years ago #
  8. motionmanager
    Member

    Thank you! When will this update be released?

    Posted 4 years ago #
  9. motionmanager
    Member

    Have you changed something yet? At the moment it seems to work that the slider is paused during the video is playing?!

    Or do we only have the problem when we use the autoplay function for vimeo?

    Posted 4 years ago #
  10. justinmonehen2
    Member

    Has this been fixed in a later version as I went into the core and this seems to already say 'autoplay' - but the vimeo video does not autoplay?
    All the best,
    Justin

    Posted 2 years ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme