Search code examples
videokaltura

How can I set a video default image with Kaltura Player without using the KMC?


Or, How can I set the default image for a video without editing the Media Entry?

I want to specify a specific video second for a thumbnail, or provide my own URL within the HTML. By providing the player a url like:

https://cdnsecakmi.kaltura.com/p/1475532/sp/147553200/thumbnail/entry_id/1_alg5s8io/vid_sec/12

And then being able to dynamically set the vid_sec:

https://cdnsecakmi.kaltura.com/p/1475532/sp/147553200/thumbnail/entry_id/1_alg5s8io/vid_sec/${VID_SEC}


Normally, one would set what Kaltura calls 'Default Thumbnail' through the KMC,

By either the gui: Content->Entries->(edit entry)->Thumbnails->Add Thumbnail

Or by API call: https://www.kaltura.com/api_v3/testmeDoc/index.php?service=media&action=updatethumbnail

But both of these methods involve editing the Media Entry on the server.

I need to be able to set the image shown before the play button is pressed within the flashvars, javascript, or html so I can maintain it in a template instead of on the KMC.

I've tried setting:

<span itemprop="thumbnail" content="(thumbnail url)"></span>

which doesn't seem to work.

I've also put both 'thumbnailURL' and 'thumbnail' within flashvars, and that didn't do it either.

kWidget.embed({
  "targetId": "kaltura_player_1413399902",
  "wid": "_XXXX",
  "uiconf_id": xxxxxxx,
  "flashvars": {'thumbnailUrl': "URL OF THUMBNAIL"},
  "cache_st": 1413399902,
  "entry_id": "1_XXXXXXXX"
});

Solution

  • We added to the latest version thumbnailUrl param which you can define on your embed code.

      kWidget.embed({
      "targetId": "kaltura_player",
      "wid": "_1281471",
      "uiconf_id": 27119341,
      "flashvars": {
        "thumbnailUrl": "http://upload.wikimedia.org/wikipedia/commons/5/5c/Double-alaskan-rainbow.jpg"
      },
      "cache_st": 1416828471,
      "entry_id": "1_d5o9twuk"
    });
    

    http://jsfiddle.net/itayKinnrot/0wpnhawt/ <-- Exmaple