Since google/ youtube pulled object/embed support for embedded youtube videos, here is a wordpress filter for attempting to replace object embeds with video specifiers for use in other plugins (code could be adjusted for direct iframes too), it checks to see if an iframe or youtube reference already exists as it builds up an array of youtube urls – only uses first youtube url found. It assumes any youtube urls are in . Maybe of use to somebody.

function replaceyoutubeobject($string) {
    if(stripos($string,'iframe')===false) {
    if(stripos($string,'+<\/object>/smi", "", $string); // remove old objects
    $match = $matches[0];
    $url = $match[0];
    if(stripos($url,"/v/")!==false) {
    $u=explode("/v/",$url);
    } else if(stripos($url,"v=")!==false) {
    $u=explode("v=",$url);
    }
    $u1=$u[0];
    $u2=$u[1];
    $ext=explode("&",$u2);
    $vcode=$ext[0];
    $string = "
\n".$string; }}} return $string; } add_filter( 'the_content', 'replaceyoutubeobject' );