Commit ef187a26 by Lee Munkyeong

動画のメッセージ作成修正。

parent f9f13056
...@@ -1044,7 +1044,7 @@ CHAT_UI.refreshRoomList = function(roomType) { ...@@ -1044,7 +1044,7 @@ CHAT_UI.refreshRoomList = function(roomType) {
var displayMsg; var displayMsg;
//TODO 協業の場合処理追加必要 //TODO 協業の場合処理追加必要
if (room.messageType == messageType.TEXT || room.messageType == messageType.TEXT) displayMsg = room.message; if (room.messageType == messageType.TEXT || room.messageType == messageType.TEXT) displayMsg = room.message;
if (room.messageType == messageType.IMAGE || room.messageType == messageType.SYSTEM) displayMsg = getLocalizedString("image"); if (room.messageType == messageType.IMAGE || room.messageType == messageType.VIDEO) displayMsg = getLocalizedString("image");
var attendUserName = []; var attendUserName = [];
room.attendUsers.forEach(function(user) { room.attendUsers.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl); user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
......
...@@ -135,14 +135,18 @@ CHAT.uploadImage = function(formData) { ...@@ -135,14 +135,18 @@ CHAT.uploadImage = function(formData) {
} }
let downloadPath = CMS_SERVER_URL + '/chatapi/file/download?fileName=' + imageName + '&roomId=' + CHAT.globalLoginParameter.roomId; let downloadPath = CMS_SERVER_URL + '/chatapi/file/download?fileName=' + imageName + '&roomId=' + CHAT.globalLoginParameter.roomId;
const aTag = $('<a/>', {id:"attachedImages"})
const image = $('<img/>',{src:imgPath, width:'auto',style:'max-width:100%'}); var videoSrc = CMS_SERVER_URL + '/chatapi/file/getImage?fileName=' + res.fileName + '&roomId=' + CHAT.globalLoginParameter.roomId;
const totalDiv = $('<div/>', {id:"attachedImages"});
const videoTag = $('<video/>', {controls:"true", width:'auto', style:'max-width:100%'});
const source = $('<source/>', {src:videoSrc});
const downloadIcon = $('<a/>',{href:downloadPath, class:'fa fa-download', download:res.fileName}); const downloadIcon = $('<a/>',{href:downloadPath, class:'fa fa-download', download:res.fileName});
aTag.append(image); videoTag.append(source);
aTag.append(downloadIcon); totalDiv.append(videoTag);
totalDiv.append(downloadIcon);
let text = aTag.prop('outerHTML'); let text = totalDiv.prop('outerHTML');
let encodedText let encodedText
try { try {
encodedText = encodeURIComponent(text) encodedText = encodeURIComponent(text)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="chat_item d-flex flex-row align-items-center"> <div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l"> <div class="chat_item_l">
<div class="thumbnail"> <div class="thumbnail">
<div class="img_wrap"><img src="{{profileImagePath}}" onError="this.src='./img/noImage.png'"/></div> <div class="img_wrap"><img src="{{profileUrl}}" onError="this.src='./img/noImage.png'"/></div>
</div> </div>
</div> </div>
<div class="chat_item_m px-0"> <div class="chat_item_m px-0">
......
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