javascript - jquery load function with kwidget (kaltura player) -
i loading html page having kaltura player embed code in jquery using jquery.load(). idea load video in div tag through javascript on page.
code in aspx page
<%@ page language="c#" autoeventwireup="true" codebehind="default.aspx.cs" inherits="webapplication1._default" %> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="head1" runat="server"></head> <body> <script src="images/jquery-1.9.1.min.js" type="text/javascript"> </script> <script type="text/javascript"> function test() { var light = document.createelement('div'); light.id = "light"; document.body.appendchild(light); $("#light").load("files/test.html"); $("#fade").fadein(); $("#light").fadein(1000); $("#close").fadein(); return false; } </script> <form id="form1" runat="server"> <asp:linkbutton id="lb" runat="server" clientidmode="autoid" text="test" ></asp:linkbutton> </form> </body> </html>
test.html file
<html> <body> <script src="http://www.kaltura.com/p/423851/sp/42385100/embediframejs/uiconf_id/11598752/partner_id/423851"></script> <div id="kaltura_player" style="width: px; height: px;"></div> <script> kwidget.embed({ "targetid": "kaltura_player", "wid": "_423851", "uiconf_id": "11598752", "flashvars": {}, "entry_id": "1_znvt6hgh" }); </script> </body> </html>
calling function test() aspx.cs file
protected void page_load(object sender, eventargs e) { lb.onclientclick = "return test()"; }
error when click on button load kaltura video in div(id='light')
microsoft jscript runtime error: 'kwidget' undefined
please let me know if need include file or api overcome error. thanks.
try upgrade player version - you're using old version. -our latest v2.31