Using Kaltura Player API in Storyline

Mar 25, 2023

Hello everyone,

I recently came across Chris Hodgson's fantastic tutorial on utilizing the YouTube API to enhance embedded video functionality in Storyline (https://youtu.be/_4e0DSJp3cY). Inspired by this, I'm attempting to achieve a similar outcome with videos hosted on the Kaltura video platform. Like YouTube, Kaltura provides access to its player API, which I'd like to leverage.

With ChatGPT's help, I've successfully created a test HTML site featuring an embedded video, where I can retrieve the current player state. You can find the demo file attached for reference. To view the player state, simply open the site locally, launch the developer console, and enter "videoStatus."

My challenge now is to integrate this functionality into Storyline. However, I'm struggling to make it work and haven't received any error messages that could guide me.

I'm wondering if anyone here has experience working with the Kaltura player API in Storyline and can offer some advice or direction.

Thank you in advance for your help!

7 Replies
Jürgen Schoenemeyer

i have tried with the kaltura embed player, the integration is basically the same as the youtube or vimeo integration

before you can really use it, kaltura has to solve the problem with the autoplay

  • when you turn autoplay on, the videos always start muted - tested on firefox and chrome
  • if you turn off autoplay, the videos start correctly with sound

the autoplay has solved youtube, vimeo and other video platforms much better

in the attachment an extended html (css + autoplay active + console.log)

Jürgen Schoenemeyer

it looks like the player was developed about 10 years ago - and this is what it looks like (not as nice as the one on the marketing website in the promotional videos)

large parts of kaltura websites do not have https yet (only unsecured http connection) - the developer does not have a high priority

Fabian Koeninger

Thank you both for your input. I have successfully embedded the video using a web object in Storyline, and to ensure that the video is not muted at the start, I added the parameter 'flashvars[mute]=false'. In my use case, autoplay is not necessary.

My objective is to retrieve the current player state using the Kaltura player API. I aim to update a Storyline variable and trigger an action when the video ends. While I can currently see the current player state in the console, I lack sufficient JavaScript knowledge to update the variable in Storyline.

I attempted to use the GetPlayer() function from Storyline and employed the sl.SetVar("vidStatus", videoStatus) method, similar to the process with the YouTube API. However, I have not yet achieved success with the Kaltura API.

Craig Bunyea

I too was "in the same boat" wanting to leverage the Kaltura js API. The page that made it 'click' for me was this Dynamic Embed sample
So for Articulate developers, you'll want to embed a Web Object in your course, and point to some html like I've attached (rename index.html).  If you used to create Flash (remember that?) this method will look familiar.  Once the js script is executed you'll have the all-important kWidget DOM object to work with.
The Kaltura API looks rather robust. It has flags for 25, 50 and 75% completion (firstQuartile, etc.), and can even track that the progress bar was used (seeked) witha duration callback.

All the embedded HTML needs to do then is manipulate/toggle some variables in your Articulate file.  I just wanted a disabled Next button to become enabled on video completion. 
NOTE: Because of cross-frame blocking policies, you won't be able to test this just opening in Chrome (with the Web Server Extension), you'll need localhost, or a stage server to see it work.

// when video ends
var player = parent.GetPlayer();
player.SetVar("videoIsComplete","Yes");
}

 When creating the kWidget object, you should be able to obtain all the specific id's from the <iframe> of link code Kaltura provides you for the video you'll be accessing. Hope this helps.

Link to Kaltura's API documentation