릴리즈 2.2.0 이상
비디오를 업로드 하기 전에 발생합니다. 이벤트 진행 취소가 가능합니다.
이벤트 등록: API 사용
var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
var editor = new SynapEditor(editorId, editorConfig, html);
editor.setEventListener('beforeUploadVideo', function (e) {
});
이벤트 등록: 함수방식
var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
function SynapEditorBeforeUploadVideo(e) {
}
new SynapEditor(editorId, editorConfig, html);
이벤트 등록: 에디터 초기화시 등록
var editorId = 'synapEditor';
var editorConfig = {};
var html = '';
var eventListeners = {
beforeUploadVideo: function (e) {
}
};
new SynapEditor(editorId, editorConfig, html, eventListeners);
함수로 전달되는 객체 형태
함수로 전달되는 파라미터 e의 형식
e
// release 2.2.0
{
editor: SynapEditor,
eventType: 'beforeUploadVideo',
cancelable: true,
returnValue: null,
fileName: 'filename.mp4' // 업로드 대상 파일 이름
}
// release 2.2.1 이상
{
editor: SynapEditor,
eventType: 'beforeUploadVideo',
cancelable: true,
returnValue: null,
fileType: 'video', // [2.2.1] 파일 타입
fileName: 'filename.mp4',
uploadCount: 0 // [2.2.1] 업로드 중인 파일 수 (아직 업로드 되지 않은 업로드 대상 수)
}