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="https://webapps.wooster.edu/player/swf/flowplayer.swf" type="application/x-shockwave-flash"><param name="movie" value="https://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.