Sha256: 546a8f97c777602f9aee5b2e44a9c38ec5a86cdeb83db0d200b02fbda5874416

Contents?: true

Size: 1.49 KB

Versions: 3

Compression:

Stored size: 1.49 KB

Contents

var flashObj;
var delegate = {};
var mediaTypeInput;

//KSU handlers
delegate.readyHandler = function()
{
  flashObj = document.getElementById("uploader");
}

delegate.selectHandler = function()
{
  //flashObj.upload();
  console.log("selectHandler()");
  console.log(flashObj.getTotalSize());
}

function setMediaType()
{
  var mediaType = document.getElementById("mediaTypeInput").value;
  //alert(mediaType);
  console.log(mediaType);
  flashObj.setMediaType(mediaType);
}

delegate.singleUploadCompleteHandler = function(args)
{

  flashObj.addEntries();
  console.log("singleUploadCompleteHandler", args[0].title);
  document.getElementById('button_submit').disabled = false;

}

delegate.allUploadsCompleteHandler = function()
{
  console.log("allUploadsCompleteHandler");
}

delegate.entriesAddedHandler = function(entries)
{
  //alert(entries.length);
  var entry = entries[0];
  //alert(entry.entryId);
  document.getElementById('video_entry_id').value = entry.entryId
  console.log(entries);
}

delegate.progressHandler = function(args)
{
  document.getElementById('video_title').value = args[2].title;
  var bob = Math.round(args[0] / args[1] * 100);
  document.getElementById('progress').value = bob;
  console.log(args[2].title + ": " + args[0] + " / " + args[1]);
}

delegate.uiConfErrorHandler = function()
{
  console.log("ui conf loading error");
}

<!--- JavaScript callback methods to activate Kaltura services via the KSU widget.-->
function upload()
{
  flashObj.upload();
  //flashObj.addEntries();
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kaltura_box-0.0.3 lib/generators/templates/kaltura_upload.js
kaltura_box-0.0.2 lib/generators/templates/kaltura_upload.js
kaltura_box-0.0.1 lib/generators/templates/kaltura_upload.js