only me have this problem?
I have a similar issue. I am adapting a working video embed plugin I wrote and have just changed function names and regex in the new plugin. I activate the new plugin and test the regex in a post and nothing happens. It’s like the filter for this plugin isn’t firing.
Hi Jon, i resolved myself the problem. If i remember correctly the problem was on the function. I rewrite it from scratch, wipe the unused variables (the embed i write is for livestream.com). Hope this help you.
It still isn’t working for me and I’m wondering if it’s because the service isn’t looking for <object><embed></embed></object> syntax in what is being put in in place of the URL. Here is what I have
wp_embed_register_handler( 'woostervideo', '#rtmp://adobeflash.wooster.edu/vod/(.+)#', 'wp_embed_handler_woostervideo');
function wp_embed_handler_woostervideo( $matches, $attr, $url, $rawattr ) {
$width = get_option('woostervideoautoembed_player_width', '480');
$height = get_option('woostervideoautoembed_player_height', '360');
$embed = sprintf(
'<object id="flowplayer" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" data="http://webapps.wooster.edu/player/swf/flowplayer.swf" type="application/x-shockwave-flash"><param name="movie" value="http://webapps.wooster.edu/player/swf/flowplayer.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value=\'config={"key":"#$28d4f4f3f205e518e4a","clip":{"provider":"rtmp","live":true,"url":"%1$s","autoBuffering":true,"autoPlay":false},"plugins":{"rtmp":{"url":"flowplayer.rtmp.swf","netConnectionUrl":"rtmp://adobeflash.wooster.edu/vod"}}}\' /></object>',
esc_attr($matches[1])
);
return apply_filters( 'embed_woostervideo', $embed, $matches, $attr, $url, $rawattr );
}
I check the regex with an online regex testing tool and it is matching exactly what I want. So I’m not sure what is wrong.