Video render dimensions

Support MB Views Video render dimensions

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36059
    stefanocorradinistefanocorradini
    Participant

    Hi, how can I set set video dimensions about width and height on {{ post.link_video.rendered }} code?

    #36071
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can use this code to set the width and height of the rendered video.

    {% for item in post.link_video %}
    	{{ mb.wp_video_shortcode( {
    		src: item.src,
    		width: item.dimensions.width,
    		height: item.dimensions.height
    	}) }}
    {% endfor %}

    or fixed width and height

    {% for item in post.link_video %}
    	{{ mb.wp_video_shortcode( {
    		src: item.src,
    		width: 300,
    		height: 200
    	}) }}
    {% endfor %}

    Read more on the documentation https://docs.metabox.io/fields/video/#template-usage

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.