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) {
    } else if(stripos($url,"v=")!==false) {
    $string = "
\n".$string; }}} return $string; } add_filter( 'the_content', 'replaceyoutubeobject' );