I’m adding a video, using the WordPress video shortcode:

$attr = array(
    //'poster' =>  esc_url( wp_get_attachment_image_src( get_post_thumbnail_id(), 'large')[0] ),
    'src' => esc_url( get_field( 'video' ) ),
    'ogv' => esc_url( replace_extension(get_field( 'video' ), ogv )),
    'webm' => esc_url( replace_extension(get_field( 'video' ), webm )),
    'flash' =>  true,
    'width' => 1024,
    'height' => 576
);
echo wp_video_shortcode( $attr );

The output produced by WordPress looks like that:

<video width="800" height="449" preload="metadata" id="video-309-1" class="wp-video-shortcode" style="width: 100%; height: 100%;" src="http://xxx.de/wordpress/wp-content/uploads/2014/06/xxx.mp4?_=1">
    <source src="http://xxx.de/wordpress/wp-content/uploads/2014/06/xxx.mp4?_=1" type="video/mp4"></source>
    <source src="http://xxx.de/wordpress/wp-content/uploads/2014/06/xxx.webm?_=1" type="video/webm"></source>
    <source src="http://xxx.de/wordpress/wp-content/uploads/2014/06/xxx.ogv?_=1" type="video/ogg"></source>
    <a href="http://xxx.de/wordpress/wp-content/uploads/2014/06/xxx.mp4">http://xxx.de/wordpress/wp-content/uploads/2014/06/xxx.mp4</a>
</video>

Following the advice given in other questions, regarding the same problem, I added this to my htaccess:

AddType video/mp4  .mp4
AddType video/ogg .ogv
AddType video/webm .webm

, removed the poster attribute, double checked the encoding (It is h.264, plus the videos are playing perfectly if I open them directly via their link)

Read more here: Video not playing on iPhone, iPad and Safari for windows


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , ,

Wordpress related questions and answers: