Support » Plugin: Featured Video Plus » Echo Video Duration

  • I’m trying to echo the video duration if its available from youtube or vimeo. I’m not sure if there is an existing function for this hook, but would appreciate any help if anyone knows.

    <?php if (function_exists('has_post_video') ) :
                        $post_id = get_the_post_video_url( $post_id );
    					$video_time = $min + $sek; { ?>
                    <meta itemprop="embedUrl" content="<?php echo $post_id; ?>" />
                <span>Duration: <?php echo $video_time; ?></span>
                <?php } endif; ?>

    At the moment, the duration is displaying “0”.

    Any thoughts on how to accomplish this?

  • The topic ‘Echo Video Duration’ is closed to new replies.