javascriptangularjsmeteorkaltura

Kaltura error: kWidget is not defined at eval


I am trying to use the Kaltura API in a web app of mine written in angular, meteor. However I am getting a "kWidget is not defined at eval" error when I try to use it. A past project (not written by me) uses the Kaltura API, so I copied the small bit of embed code from that website into my web app.

The Kaltura API is currently working on this website (link to working site: here), but not on mine. I've tried looking through the site's source code via inspector, but I can't figure out why I am getting this error and the website is not.

Does anyone who has experience with Kaltura's API have any solutions? I've seen a couple answers on SO, but I couldn't make sense of them in my situation.

The code I include in my html view:

    <div id="kaltura_player_1476756849" style="width: 480px; height: 360px; margin:0 auto;"></div>
    <p><script>
    kWidget.embed({
      "targetId": "kaltura_player_1476756849",
      "wid": "_1971441",
      "uiconf_id": 35431201,
      "flashvars": {
        "streamerType": "auto"
      },
      "cache_st": 1476756849,
      "entry_id": "1_q52zk7l2"
    });
    </script></p>

Solution

  • Figured it out so I'll leave it up just in case anyone else runs into this issue and it can be of help.

    If you are using meteor like I am, make sure you include the cdn script in your index.html file not the html file the player will appear in.