Unified bind/unbind methods

Simple binding for kaltura events.

View the full list of events
  1. kWidget.addReadyCallback( function( playerId ){
  2. var kdp = document.getElementById( playerId );
  3. var foo = "bar";
  4. // Unlike addJsListener, you can directly issue local callbacks.
  5. kdp.kBind( "doPlay.test", function(){ //notice the .test postfix namespaces the event)
  6. console.log("play " + foo); // will log "play bar"
  7. //Now we can unbind our .test postfix via kUnbind ( only will log play once )
  8. kdp.kUnbind('.test')
  9. });
  10. });

html5 qunit | flash qunit