Widget Functions (Deprecated)
This section lists Upload Widget functions.
Specify your parameters including account information (pcode) and then sign them according to our signature generation instructions. The resulting string should be passed to setParameters.
To set parameters use:
ooyalaUploader.setParameters('<paramstring>')
In many cases you will wish to receive notifications when some events occur. At this point in time, the API only supports one listener per event. Subsequent calls to addEventListener will override previous handler assignments.
To register an event listener use:
ooyalaUploader.addEventListener('<event name>', '<event handler name>')
Example:
If you wish to register a listener to an IO error event.
ooyalaUploader.addEventListener('error', 'onUploaderIOError');
setTitle(String) and setDescription(String)Pass in a user-entered title and description respectively.
To assign a title use:
ooyalaUploader.setTitle('<title>');
To assign a description use:
ooyalaUploader.setDescription('<description>');
Adds dynamic (user-generated) label to the content. The label must match at least one regular expression specified in the dynamic[<id>] parameter of the setParameters() signed string.
To add a user-generated label to the uploaded videos use:
ooyalaUploader.addDynamicLabel('<labelname>');
Check that the uploader widget is ready to upload files. This returns null if the uploader is ready or an error string if some prerequisite is not met (e.g. file is not selected, title is not specified, file is too big, et cetera).
To validate an upload use:
ooyalaUploader.validate();
upload()Begin file upload. Returns true if upload has been started or false if it has not. In subsequent events you may use validate() to retrieve the reason for the false return.
To start an upload use:
ooyalaUploader.upload();