Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've got a multisite installation of WP 3.5.1 running, and I'd like to for users to be able to embed screencast.com videos into posts, preferably with a shortcode like you do with YouTube or Vimeo.

I can do this using the full embed code from the screencast.com sharing menu, but I can only do this as a super admin. All other users have and tags stripped out of their posts. I can get around this by installing the Unfiltered MU plugin, but that's not ideal, since it allows users to put all sorts of untrusted code/tags in their posts.

I've searched pretty extensively for some sort of simple plugin, and have come across this Screencast.com Video Embedder that seems idea, but it hasn't been updated in 2 years.

So I'm wondering if there are any other solutions that might work for this.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Screencast.com has a dedicated GitHub page with hands full of tutorials (no need to clone them over here).

You can then utilize wp_oembed_get() or register a new provider using wp_oembed_add_provider().

echo wp_oembed_get( 'http://example.com', array( 
    'width'  => 1920,
    'height' => 1080
) );

Or add the provider:

wp_oembed_add_provider(
    'http://screencast.com/*', // The Format
    'http://screencast.com/',  // The Provider
    FALSE                      // Is the first argument not a wildcard but a Regex?
);

Keep in mind that some providers will force you that you obtain an API key to do successful requests. The good ones hand out some for testing & developing purpose.

To alter the MarkUp, there's the obembed_dataparse filter, which you can use.

add_filter( 'oembed_dataparse', 'wpse_91680_oembed_markup', 10, 3 );
function wpse_91680_oembed_markup( $html, $data, $url )
{
    if ( is_int( strpos( $url, 'screencast.com' ) ) )
    {
        // $data might hold interesting stuff for you
        # echo htmlspecialchars( var_export( $data, true ) );

        return "{$html}<br /> And some special appendix";
    }

    return $html;
}
share|improve this answer

Not sure if this helps you, but I was just scouring some other blogs, and found a suggestion to try Embed.ly plugin. It has an API that you can register for free, and hundreds of media providers (including Screencast, which you have to enable from the Embed.ly settings once installed). After that, just go into the page/post HTML page and paste just the URL from screencast (or other) and viola! It worked great, and my hotspots work too. I think they have an API that takes the URL, and delivers the embed code in the background. I'll report back if my code disappears or not.

Good luck!

share|improve this answer
    
Please add at least a link to the plugin. Thanks. –  toscho Mar 21 '13 at 15:57
    
This worked, but configuring this plugin to work on multisite installs requires a bit of finagling of the plugin source code as explained here –  occam98 Mar 27 '13 at 1:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.