Commit a2f34c2e by Lee Munkyeong

コードレビュー対応及び動画エンコード失敗の処理追加。

parent 62fbf72b
......@@ -846,30 +846,31 @@ var GetFileObjectFromURL = function(filePathOrUrl, convertBlob) {
});
};
CHAT_UI.videoEncodeFail = function() {
alert(getLocalizedString('error_send_video'));
CHAT_UI.dismissLoadingIndicator();
}
CHAT_UI.videoEncodeEnd = function(encodedUri) {
console.log('encode end');
console.log('file:'+encodedUri);
var fileName = encodedUri.split('/')[encodedUri.split('/').length-1];
//var testFile = new File(decodeURI('file://'+encodedUri));
var FileURL='file:'+encodedUri;
var fileURL = 'file:'+encodedUri;
var xhr = new XMLHttpRequest();
xhr.open("GET", FileURL);
xhr.open("GET", fileURL);
xhr.responseType = "blob";
xhr.addEventListener('load', function() {
console.log(xhr.response);
var formData=new FormData();
var formData = new FormData();
formData.append("image", xhr.response, fileName);
formData.append('sid', CHAT.globalLoginParameter.sid);
formData.append('roomId', CHAT.globalLoginParameter.roomId);
jQuery.ajax({
async: true,
url: CMS_SERVER_URL+"/chatapi/file/upload",
url: CMS_SERVER_URL + "/chatapi/file/upload",
type: "post",
data: formData,
contentType: false,
processData: false,
error: function () {
alert("読み込み失敗");
alert(getLocalizedString('error_send_video'));
CHAT_UI.dismissLoadingIndicator();
}
}).done(function(res) {
......@@ -905,7 +906,6 @@ CHAT_UI.videoEncodeEnd = function(encodedUri) {
text: encodedText + messageSeperator + messageType.VIDEO
}, 1);
$('.overlay').removeClass('active undismissable');
$('.loader').removeClass('active');
CHAT_UI.dismissLoadingIndicator();
......
......@@ -99,5 +99,6 @@ $.lang.en = {
"not_support_version" : "did not support this device version.",
"err_target_android_version_not_support" : "did not support document collaboration on this user's device version.",
"err_not_exist_room" : "this room is not exist.",
"norify_request_host_change" : "%@ request host permission \ndo you want to approve?"
"norify_request_host_change" : "%@ request host permission \ndo you want to approve?",
"error_send_video": "Fail to send."
}
......@@ -99,5 +99,6 @@ $.lang.ja = {
"not_support_version" : "現在の端末バージョンでは利用できません。",
"err_target_android_version_not_support" : "対象ユーザの端末バージョンでは文書協業が利用できません。",
"err_not_exist_room" : "該当のルームが存在しません。",
"norify_request_host_change" : "%@様からホスト変更リクエストがあります。\n承認しますか?"
"norify_request_host_change" : "%@様からホスト変更リクエストがあります。\n承認しますか?",
"error_send_video": "送信に失敗しました。"
}
\ No newline at end of file
......@@ -99,5 +99,6 @@ $.lang.ko = {
"not_support_version" : "현재단말버전에서는 지원되지않는기능입니다.",
"err_target_android_version_not_support" : "해당 유저의 단말버전에서는 문서협업이 이용불가능합니다.",
"err_not_exist_room" : "해당 룸이 존재하지않습니다.",
"norify_request_host_change" : "%@님이 호스트변경을 요청하셨습니다.\n승인하시겠습니까?"
"norify_request_host_change" : "%@님이 호스트변경을 요청하셨습니다.\n승인하시겠습니까?",
"error_send_video": "전송에 실패했습니다."
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment