Copyright © 2011 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
EduVideo.org
Howdy,
Trying to get JS control of KDP.
I am not getting the function bound to readyF to be called back and therefore I am not getting any of the rest of the callbacks to be attached to the swf object.
I have call back functions and such defined in an external js file ( http://dev.becausefoundation.org/js/kaltura-player-controls.js )which is included from this PHP5 page:
http://dev.becausefoundation.org/films/onebridge/index-clips.php
The embedded JS script:
I've tried onKdpReady as a string (like above) and also without quotation marks to get its value which would presumably be it's function object.
I put a break at the embedSWF line and examined the binding of onKdpReady:
Which says to me that it is executing in the correct lexical environment.
And yet...... onKdpReady is not called?! I put a throw in there to check and it is never invoked.
I am using widget 48110 which is supposed to handle the JS API..... what holy water am I forgetting to throw over my shoulder?
I SO want to move on to the next hurdle of mastering Kaltura...... !!!!
Thanks for any and all info!
Smallhands
Hi,
In fact the "onKdpReady" function is being called (if you use breakpoint on firebug, you will see it is being called), however, the playerId parameter is null.
The probelms is with the swfobject embedSwf call that is missing the attributes definitions.
In order to have onKdpReady callback providing the right element id (in the playerId parameter), you must specify the name attribute in object tag as follow:
var params = {
allowscriptaccess: "always",
allownetworking: "all",
allowfullscreen: "true",
wmode: "opaque"
};
var flashVars = {
entryId: "wa5399nt92",
readyF: "onKdpReady"
};
var attributes = {
id: "myKdp";
name: "myKdp";
};
swfobject.embedSWF("http://www.kaltura.com/kwidget/wid/_26954/uiconf_id/48110", "myKdp", "640", "360", "9.0.0", false, flashVars, params, attributes);
</script>
Notice the addition of the attributes var added to the end of the embedSWF function.