• How do I turn on the autoplay for the new video player in WP3.6?
    I use wp_video_shortcode(); in my custom theme and I tried autoplay=”true” but nothing happens. Also I set the width="583" height="328" but the player gets rather adjusted to the surrounding div.
    Here is the code in my theme (I use WPML):

    $shortcode = '[video autoplay="true" width="583" height="328" mp4="';
    $id = icl_object_id($post->ID, 'playing', false, 'en');
    $args = array(
    'numberposts' => null,
    'post_mime_type' => 'video',
    'post_parent' => $id,
    'post_status' => null,
    'post_type' => 'attachment',
    'suppress_filters' => false,
    );
    $video_attachments = get_posts($args);
    $movie_url = wp_get_attachment_url( $video_attachments[0]->ID );
    $shortcode .= $movie_url.'"][/video]';
    echo wp_video_shortcode("$shortcode");

    Or is there even a simpler way of implementing this in a custom theme? ??
    I’d be thankful for any hint.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘video shortcode autoplay and player size in WP3.6’ is closed to new replies.