How to use Kaltura video in VideoJS

I have a web page that uses VideoJS to load and play videos such as “youtube”, “vimeo”, “mp4”.

Apparently the company stores all the videos on Kaltura and I got the task to use kaltura video in my VideoJS player.

Below is my code which is a function that checks whether the url is a youtube video, kaltura, vimeo or simply mp4. All types of video work fine except kaltura

Here is my Code:


    class="video-js vjs-default-skin"
    data-setup='{ "techOrder": ["html5", "flash", "youtube", "vimeo"]}'


function playApropriateType(url) {
                //check if video is from youtube
                if(url.indexOf('youtube') != -1) {
                    scope.player.src({type: 'video/youtube', src: url});

                //KALTURA url. not working
                else if(url.indexOf('kaltura') != -1) {
                    scope.player.src({"type":"video/mp4", "src":url});

                //check if link is vimeo from payed account
                else if( ((url.indexOf('mp4') != -1) && (url.indexOf('vimeo') != -1)) || url.indexOf('mp4') != -1) {
                    scope.player.src({"type":"video/mp4", "src":url});

                //check if video is simple vimeo
                else if(url.indexOf('mp4') == -1 && url.indexOf('vimeo') != -1){
                    scope.player.src({type: 'video/vimeo', src: url});

Can anybody help me with that?


Kaltura can be used on our SaaS but can also be self hosted using either the Community Edition [CE] or OnPrem.
Depending on that, the URL to the actual video may or may not contain the string ‘kaltura’.
Also, the Kaltura Server can serve the mp4 as is [what is called progressive download] or use adaptive bitrate protocols such as HLS, HDS and DASH, in which case, a corresponding manifest which contains the same video in different flavours [different bitrates and other params] will be served and the video will be served in segments.
What does your URL to the video look like and when you say “it does not work”, what is the behaviour you are seeing?



Thanks for the reply. By “not working” I mean that my VideoJS plugin doesn’t support kaltura videos. I think it is because the kaltura links are not pointing to the mp4 videos directly.

Here is a link:

I will have a look at HLS as you suggested because I think VideoJS has a plugin for that.

Is it possible to get the link to the plain mp4 on Kaltura for a video?

Thanks a lot again for the reply!

Hi @morcov,

If you run a HTTP sniffer while playing this video, you will see a playmanifest request that looks like this:,1_l9xum4aw,1_h0pbzs4j,1_6dseohb8,1_v0owkwoc/format/applehttp/protocol/https/a.m3u8?referrer=aHR0cHM6Ly93d3cua2FsdHVyYS5jb20=&playSessionId=fc0cca6f-436b-d639-85ff-93b33d6135e7&clientTag=html5:v2.53.2&uiConfId=35919811&responseFormat=jsonp&callback=jQuery111107637449795986788_1490621933904&_=1490621933905

The important part there is:
which means HLS [code name applehttp] is requested.
You could make this request instead:
which would return:

<?xml version="1.0" encoding="UTF-8"?>
        <manifest xmlns="">


<media url="" bitrate="429" width="640" height="360" />

So, a direct URL to one of the entry flavours is returned, in this case:

Depending on your conversion profiles, a conversion to several flavours will be attempted. When using adaptive bitrate protocols such as HLS, HDS and DASH, different flavours may be served during the playback session, depending on your available bandwidth and device. The file is segmented into fragments and is not served in one chunk.
Whenever possible, this method is obviously preferable to a progressive download.

VideoJS is capable of HLS playback, see: but may I ask why you wish to use it rather than the Kaltura player?

Hi, thanks a lot for your help. I think this is what I need.

We built that prototype a few months ago ang we used VideoJS to support vimeo, youtube and mp4 videos. Also there is a videoJS plugin called Video.Js-Markers which allows to add marks on video progress bar.