I’m not sure of the exact method you’ll want to use, but I can point you in the right direction I think. Any video encoded by the plugin is saved as a child of the original video. There are a lot of locations I look for because a user could provide their own alternate formats, but I start with a query to get all the videos that are children of the video then loop through all the possible formats. That should work for your purposes. Here’s some sample code to get you started. I haven’t tested this, so I don’t know if it will work exactly as written.
$postID = get_the_ID(); //assuming you're doing this in the Loop
$args = array(
'numberposts' => '-1',
'post_parent' => $postID,
'post_type' => 'attachment',
'post_mime_type' => 'video'
);
$children = get_posts( $args );
$video_formats = array( //setting up all the possible formats
"rotated" => array("type" => "h264", "suffix" => "-rotated.mp4"),
"1080" => array("name" => "1080p H.264", "width" => 1920, "height" => 1080, "type" => "h264", "suffix" => "-1080.mp4", "old_suffix" => "-1080.m4v"),
"720" => array("name" => "720p H.264", "width" => 1280, "height" => 720, "type" => "h264", "suffix" => "-720.mp4", "old_suffix" => "-720.m4v"),
"mobile" => array("name" => "480p H.264", "width" => 640, "height" => 480, "type" => "h264", "suffix" => "-480.mp4", "old_suffix" => "-ipod.m4v"),
"webm" => array("name" => "WEBM", "width" => 0, "height" => 0, "type" => "webm", "suffix" => ".webm"),
"ogg" => array("name" => "OGV", "width" => 0, "height" => 0, "type" => "ogv", "suffix" => ".ogv")
);
foreach ( $video_formats as $format => $format_stats ) {
if ($children) {
foreach ( $children as $child ) {
$mime_type = get_post_mime_type($child->ID);
$wp_attached_file = get_post_meta($child->ID, '_wp_attached_file', true);
if ( substr($wp_attached_file, -strlen($format_stats['suffix'])) == $format_stats['suffix'] ) {
$url = $uploads['baseurl'].'/'.$wp_attached_file;
echo '<source="'.$url.'" type="'.$mime_type.'">'; //or whatever info your player needs
}
}
}
}