add oembed provider

I want to add oembed provider to my buddypress activity content

I found this function

<?php wp_oembed_add_provider( $format, $provider, $regex ); ?> 

I know I need it to add with init filter

I’ve contacted developers of that site and they gave me oembed link.

so site is http://www.myvideo.ge/

and they gave me this link:
http://embed.myvideo.ge/flv_player/player.php?video_id=xxxx.format

so if video is http://www.myvideo.ge/?video_id=2119027
I need to contact http://embed.myvideo.ge/flv_player/player.php?video_id=2119027.mp4

But I have no Idea how to sum everything this

1 Answer
1

The easiest way would be to take advantage of Embedly’s outstanding API. Add this code to your theme’s functions.php:

// Add Myvideo oEmbed
function add_oembed_myvideo(){
  wp_oembed_add_provider(
    'http://www.myvideo.ge/*',
    'http://api.embed.ly/v1/api/oembed'
  );
}

add_action('init', 'add_oembed_myvideo');

Embedly is free up to 5,000 “unique URLs per hour per month”. Unless you’re going wild with embeds on your site, you’ll probably never need to pay. But if you’re interested in Embedly’s premium services, here’s details on their pricing.

Leave a Comment