Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

RELEASE 2.2.0 OR ABOVE

This event occurs after a video is uploaded.

Adding Event: Using API

var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
var editor = new SynapEditor(editorId, editorConfig, html);


editor.setEventListener('afterUploadVideo', function (e) {
});

Adding Event: Function

var editorId = 'synapEditor';
var editorConfig = {};
var html = '';

function SynapEditorAfterUploadVideo(e) {
}

new SynapEditor(editorId, editorConfig, html);

Adding Event: When the Editor is initialized

var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
var eventListeners = {
    afterUploadVideo: function (e) {
    }
};

new SynapEditor(editorId, editorConfig, html, eventListeners);

Object Delivered through Functions

In the form of parameter e delivered through functions

e
// release 2.2.0
{
	editor: SynapEditor,
	eventType:  'afterUploadVideo',
	cancelable: false,
	returnValue: null,
	path: '/upload/path/filename.mp4', // The upload path.
	elementId: 'se-123456-abcdefg-7890' // HTML Element Id (wapper)
}

// release 2.2.1 or above
{
	editor: SynapEditor,
	eventType:  'afterUploadVideo',
	cancelable: false,
	returnValue: null,
	fileType: 'video', // [2.2.1] File type
	path: '/upload/path/filename.mp4',
	elementId: 'se-123456-abcdefg-7890'
}

// release 2.10.0 or above
{
	editor: SynapEditor,
	eventType:  'afterUploadVideo',
	cancelable: false,
	returnValue: null,
	fileType: 'video',
	path: '/upload/path/filename.mp4',
    responseData: {},   // [2.10.0] complete response data
	elementId: 'se-123456-abcdefg-7890'
}
  • No labels