Embedding Kaltura videos in WordPress

Hi,

We are having trouble embedding Kaltura videos (we have SaaS Kaltura) in WordPress (4.3.2) within our domain. So far we have attempted the following:

  1. Installed the Kaltura WordPress Plugin. This has been set up correctly and linked to our instance of Kaltura however it is not compatible with WordPress version 4.3.2. I believe there is an update coming however we need a solution asap.
  2. Attempted to paste the embed code into WordPress. This works if you are an admin or enable iFrames within posts however due to the security concerns of thousands of WordPress users at our organisation this is a non preferred method.
  3. Using oembed. We have created a plugin to whitelist our instance of Kaltura within WordPress.

function custom_oembed_provider() {

wp_oembed_add_provider( 'https://video-uat.deakin.edu.au/id/*', 'https://video-uat.deakin.edu.au/oembed', false );

}
add_action( ‘init’, ‘custom_oembed_provider’ );

We have then been attempting to embed a video by just pasting the URL within a page/post. eg. https://video-uat.deakin.edu.au/id/0_fzmwh4qg?width=600&height=338&playerId=31518292

The oembed will not render and the link is just displayed as text. This has worked intermittently but we cannot seem to find a reason why this will not resolve. Oembed will work for YouTube videos successfully.

Any advice or suggestions would be greatly appreciated we have been working to find a resolution for a month now and to no avail…

thanks,
Emily

Hi Emily,

We use WP for our blog. You can see an embedded entry here for instance:


If you look at the page source, you’ll be able to see the embed code of course.

I see no reason why it should not work. Certainly not intermittently:)

However, if you would like to supply a public URL within your WP that has the issue, I’ll be happy to take a look.

Also, being a SaaS customer, you can open a support ticket.

Thanks,

Hi Jess,

Thanks for the reply. I can see the embed code in the page source. This is an iFrame, was it populated by oembed or just by using the standard embed code? If you use the standard embed code WordPress strips out the iFrame as a security measure by default.

oEmbed displays the URL only in our WP posts and pages.

Can you access this page: https://blogs-dev.deakin.edu.au/test/oembed-testing/ ?

I have used YouTube to oembed from another source on this page for testing, which works… I am trying to narrow down where the issue occurs.

I will also raise a ticket I was trying all avenues as we have been working to get this right for over 1 month now.

Thanks,
Emily

Hi Emily,

Most welcome, of course.

In the particular case I mentioned above, we just use:

<iframe width="560" height="315" id="kaltura_player" src="https://cdnapisec.kaltura.com/p/939341/sp/93934100/embedIframeJs/uiconf_id/22165091/partner_id/939341?iframeembed=true&amp;playerId=kaltura_player&amp;entry_id=0_7m2ujllz&amp;flashvars[streamerType]=auto&amp;&amp;wid=1_9lfq94qd" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen" frameborder="0"></iframe>

Within the post.

I cannot reach https://blogs-dev.deakin.edu.au/test/oembed-testing, perhaps it is only available from your LAN?

One advise I can give you w/o looking, though I could be more productive about it if I could, is to open the browser’s dev tools and look at the “Network” and “Console” tabs for errors. Also, and this is quite important, make sure you embed the content over HTTPs as well, i.e, use:
https://cdnapisec.kaltura.com
and not:
http://cdnapi.kaltura.com

A lot if not most browsers, would block the content otherwise, seeing how your blog is over HTTPs.

Thanks Jess,

Our WP strips the iframe code out of the code and removes it due to security. This can be worked around but is not something our org wants to change.

We are using https…

Thankyou for your help, I have raised a support ticket and given Kaltura access to our blog so that hopefully we can find a resolution.

Emily