bugfix :: 동영상 파일 업로드 시 썸네일 만들어지지 않아도 업로드 될 수 있도록 수정.

This commit is contained in:
leejinho 2020-02-14 09:42:19 +09:00
parent 52c70097fb
commit 51ac5facfe
2 changed files with 7 additions and 2 deletions

View File

@ -1159,7 +1159,11 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
'wmv'
].indexOf(FileUtil.getExtension(fileUploadItem.file.name))
) {
try {
thumbnail = await FileUtil.thumbnail(fileUploadItem.file);
} catch (err) {
this.logger.error('video thumbnail error.', err);
}
this.logger.debug('thumbnail', thumbnail);
}

View File

@ -266,7 +266,8 @@ export class FileUtil {
video.muted = true;
// tslint:disable-next-line: no-string-literal
video['playsInline'] = true;
video.play();
video.crossOrigin = 'anonymous';
video.play().catch(e => reject(e));
};
fileReader.onerror = (event: ProgressEvent) => {
fileReader.abort();