• i want to play the videos from the attachment media lib . i tried with this code

    <?php
    $query_images_args = array(
    ‘post_type’ => ‘attachment’,
    ‘post_mime_type’ =>’video’,
    ‘post_status’ => ‘inherit’,
    ‘orderby’ => ‘date’,
    ‘order’ => ‘DESC’,
    ‘posts_per_page’ => -1,
    );

    $query_images = new WP_Query( $query_images_args );
    $images = array();
    foreach ( $query_images->posts as $image) {
    ?>

    <video width=”250″ height=”250″ src=”<?php echo $images[]= wp_get_attachment_url( $image->ID );?>” controls=”controls”></video>
    <?php

    }

    ?>

    it working in localhost but in live server not working in below live

    https://cmsonlive.com/agile-developer/videos

Viewing 1 replies (of 1 total)
  • Hi @gobi004,

    Have you checked the developer console on Chrome? It has a lot of JavaScript errors and one of them is related to fitsVidsvariable not being defined. There are some 404’s too.

    Could we try clearing them first?

Viewing 1 replies (of 1 total)
  • The topic ‘Video not playing’ is closed to new replies.