BuddyDev

Search

[Resolved] Mediapress video height

  • Participant
    Level: Enlightened
    Posts: 71
    Christian Hendriks on #3970

    Hello,

    Where can i set the video height?

    Kind regards,
    Christian

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #3971

    Hi Christian,

    Copy this template for mediapress plugin ” templates/mediapress/default/gallery/views/grid-video.php ” to your current theme ” mediapress/default/gallery/views/grid-video.php”

    and modify the following section

    
    $args = array(
    				'src'		=> mpp_get_media_src(),
    				'loop'		=> false,
    				'autoplay'	=> false,
    				'poster'	=> mpp_get_media_src( 'thumbnail' ),
    				'width'		=> 320, //set the width of video
    				'height'	=> 180  // set the height of the video
    			);
    

    and in your current theme file name “functions.php”

    
    function buddydev_set_mediapress_video_size(){
    
    	$default = array(
    		'name'=> 'thumb',
    		'width'=> 320, //set the width of video
    		'height'=> 180,  // set the height of the video
    		'crop'=> true,
    		'type'=> 'video'//allow multiple types
    
    	);
    
    	mpp_register_media_size( $default );
    }
    add_action('mpp-init', 'buddydev_set_mediapress_video_size' );
    

    place it at the bottom of the code

    Thank You
    Ravi

  • Participant
    Level: Enlightened
    Posts: 71
    Christian Hendriks on #4046

    The last time i try to change the code (lightbox) i mess it up. Can you maybe do it for me? 🙂

    Thnx

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #4049

    Hi Christian,

    Please let me know. What are the resolution you want to set for the video so that I can modify in the code accordingly.

    Thank You
    Ravi

  • Participant
    Level: Enlightened
    Posts: 71
    Christian Hendriks on #4083

    Hmm, maybe you can check my site and see what is the best? I dont now what is normal. I think like youtube or something like that.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #4092

    Hi Chirstian,

    I have set the video resolution as per YouTube. Please check and let me know if it is working on not.

    Thank You
    Ravi

  • Participant
    Level: Enlightened
    Posts: 71
    Christian Hendriks on #4113

    Beautiful. This is what i mean. Thank you so much! 🙂

The topic ‘ [Resolved] Mediapress video height’ is closed to new replies.

This topic is: resolved