Support for kaltura #44

anointed opened this Issue Apr 7, 2012 · 12 comments

3 participants


I've been trying to get fitvids to work with my kaltura player ( ) but just can't seem to get it to work.

Here is a 'temp' video embed code to test:

I tried to paste in the embed code here, but it just doesn't work, hence the gist.

Basically I have to modify the fitvids.js script to force a fixed height, which of course breaks the entire concept of fitvids.

Is there an easy fix for this?


FitVids is for aspect ratio based resizing. If you want to do fixed height, you'd just set a height on your object.

object { width: 100%; height: 300px; }

You probably don't need FitVids, from what it sounds like you're doing.


I'm actually trying to use fitvids with kalura just like I would with youtube.

Right now, using fitvids, if I add a youtube video, then it 'resizes' properly, but if I use kaltura then no video shows up at all.

The only "solution" was a 'fixed height' to make the video show up at all, which is NOT want I am trying, but have no other solution at the moment.

I'm actually hoping to be able to continue using fitvids as I love what it does with all the other video players for aspect ratio. I just need to also be able to use kaltura video player as well.

Hope it makes more sense that I explained a little better.

Owner - I got it all working using your embed code.


When viewing the page in Firefox 12 I do not see the video at all, just hello world and a blank middle area.
In Safari 5.1 I do see the video player, but the aspect ratio is off, showing 'square' player for a widescreen video.

I can live with the Safari 'issue', but having no video in Firefox doesn't work. Windows 7 64bit


It's possible it it won't work with this custom video player unless Kaltura has some kind of callback function. If I set a breakpoint at line 34 of the JSBin, it works just fine because (my guess) the Kaltura script has finished doing its script-loading and executing.

You're seeing the failure in FF because FitVids applies (and strips out height) before the video is fully loaded.


Not sure what callbacks are etc, but maybe this helps?

I do remember reading somewhere about callbacks for kaltura, but have zero experience with them yet. I just know that kaltura is becoming a huge platform used by many universities etc, so guessing it is rather feature complete. Sure hoping it has exactly what we need to get fitvids working :)


If those links are not what you needed, maybe you could let me know what we are looking for and I can post over on the kaltura forums to get some advice?

I know kaltura does have callback function ability, I just don't know what needs to be done with it. Just think it would be really great to get fitvids and kaltura working nicely together.

Owner Should work

Instead of just having $('.container').fitVids(); inside a script block, I put it within the jsCallbackReady()

<script src="path/to/jquery.js"></script>
<script src="path/to/fitvids.js"></script>
function jsCallbackReady(objectId) {
  window.kdp = document.getElementById(objectId);

Awesome! it works for me on Firefox now :)

Now you can add the kaltura player to the list of supported players on the fitvids github homepage.


Well I am back ;)
While I was easily able to replicate the fix from your fiddle for a standalone single page kaltura video, I am struggling to get it to work when using the actual kaltura all-in-one-video plugin.

Here is an example page with a kaltura video embedded into a WordPress page:

You will notice that I am indeed calling fitvids properly, (it loads), and have even tried a couple of different selectors in my header, yet the video is not fluid like it is in standalone mode.

The code for the player is generated via the plugin itself, so changing that is virtually impossible for me. I did add the 'kalturavid' wrapper in an effort to have something specific to target as the span id created by kaltura is random.

Are you able to see the element I should be targeting to get fitvids to work properly?

I have tried:


The video on is not working for me on FF for Linux.
I am having similar problem with code that was working until few days ago. Is it still fine for you? Just wondering if something changed Kaltura side. Not sure this make sense at all, sorry, not a JS developer.


Officially we don't support Kaltura, so this is as far as I can take this with custom video players. That said, you have some basic Javascript execution problems. Your callback wasn't being called, so FitVids wasn't being applied. Just take it out of the function and the squeezing appears to be working:

For more on how Javascript works, ask questions on Stack Overflow. Good luck!

@davatron5000 davatron5000 reopened this Dec 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment