Commit 753fd644 by Kim Peace

Merge branch 'develop' into debug/console_logs

# Conflicts:
#	public_new/js/views/collaboration/share-bind-button-action.js
#	public_new/js/views/collaboration/share.js
parents db2d2706 0e296d27
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css"> <link rel="stylesheet" href="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css"> <link rel="stylesheet" href="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css"> <link rel="stylesheet" href="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css"> <link rel="stylesheet" href="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css"> <link rel="stylesheet" href="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css" > <link rel="stylesheet" href="./fontawesome/css/all.css" >
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css" > <link rel="stylesheet" href="./fontawesome/css/all.css" >
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css" > <link rel="stylesheet" href="./fontawesome/css/all.css" >
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<!--<link rel="stylesheet" href="./css/notosansjp.css">--> <!--<link rel="stylesheet" href="./css/notosansjp.css">-->
<link rel="stylesheet" href="./fontawesome/css/all.css"> <link rel="stylesheet" href="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css" > <link rel="stylesheet" href="./fontawesome/css/all.css" >
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>BizTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css"> <link rel="stylesheet" href="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
......
...@@ -6,84 +6,75 @@ NativeBridgeDataSource.getCollaborationJoinFlg = function () { ...@@ -6,84 +6,75 @@ NativeBridgeDataSource.getCollaborationJoinFlg = function () {
} }
}; };
var CoviewUserInfo = class { function CoviewUserInfo(sid, loginId, roomId, shopName) {
sid; this.sid = sid;
loginId; this.loginId = loginId;
roomId; this.roomId = roomId;
shopName; this.shopName = shopName;
collaborationType; const unwrappedType = NativeBridgeDataSource.getJoinCollaborationType();
joinType; this.collaborationType = this.parseNumberToCoworkType(unwrappedType);
isLeaved; this.joinType = NativeBridgeDataSource.getCollaborationJoinFlg();
meetingID;
constructor(sid, loginId, roomId, shopName) { this.isLeaved = false;
this.sid = sid; this.meetingID = 0;
this.loginId = loginId;
this.roomId = roomId;
this.shopName = shopName;
const unwrappedType = NativeBridgeDataSource.getJoinCollaborationType();
this.collaborationType = this.parseNumberToCoworkType(unwrappedType);
this.joinType = NativeBridgeDataSource.getCollaborationJoinFlg();
this.isLeaved = false; Object.defineProperty(this, "coWorkType", {
this.meetingID = 0; get() {
} switch (this.collaborationType) {
case COLLABORATION_TYPE.AUDIO:
get coWorkType() { return COLLABORATION_TYPE.AUDIO;
switch (this.collaborationType) { case COLLABORATION_TYPE.CAMERA:
case COLLABORATION_TYPE.AUDIO: return COLLABORATION_TYPE.CAMERA;
return COLLABORATION_TYPE.AUDIO; case COLLABORATION_TYPE.VIDEO:
case COLLABORATION_TYPE.CAMERA: return COLLABORATION_TYPE.VIDEO;
return COLLABORATION_TYPE.CAMERA; case COLLABORATION_TYPE.DOCUMENT:
case COLLABORATION_TYPE.VIDEO: return COLLABORATION_TYPE.AUDIO;
return COLLABORATION_TYPE.VIDEO; case COLLABORATION_TYPE.BOARD:
case COLLABORATION_TYPE.DOCUMENT: return COLLABORATION_TYPE.AUDIO;
return COLLABORATION_TYPE.AUDIO; }
case COLLABORATION_TYPE.BOARD: },
return COLLABORATION_TYPE.AUDIO; });
} }
}
isInvited() { CoviewUserInfo.prototype.isInvited = function () {
return this.joinType == COLLABORATION_JOIN_TYPE.INVITED; return this.joinType == COLLABORATION_JOIN_TYPE.INVITED;
} };
parseNumberToCoworkType(type) { CoviewUserInfo.prototype.parseNumberToCoworkType = function (type) {
switch (type) { switch (type) {
case COLLABORATION_TYPE_NUMBER.AUDIO: case COLLABORATION_TYPE_NUMBER.AUDIO:
return COLLABORATION_TYPE.AUDIO; return COLLABORATION_TYPE.AUDIO;
case COLLABORATION_TYPE_NUMBER.CAMERA: case COLLABORATION_TYPE_NUMBER.CAMERA:
return COLLABORATION_TYPE.CAMERA; return COLLABORATION_TYPE.CAMERA;
case COLLABORATION_TYPE_NUMBER.VIDEO: case COLLABORATION_TYPE_NUMBER.VIDEO:
return COLLABORATION_TYPE.VIDEO; return COLLABORATION_TYPE.VIDEO;
case COLLABORATION_TYPE_NUMBER.DOCUMENT: case COLLABORATION_TYPE_NUMBER.DOCUMENT:
return COLLABORATION_TYPE.DOCUMENT; return COLLABORATION_TYPE.DOCUMENT;
case COLLABORATION_TYPE_NUMBER.BOARD: case COLLABORATION_TYPE_NUMBER.BOARD:
return COLLABORATION_TYPE.BOARD; return COLLABORATION_TYPE.BOARD;
default: default:
return 0; return 0;
}
} }
};
getCollaborarionTypeAsNumber() { CoviewUserInfo.prototype.getCollaborarionTypeAsNumber = function () {
return this.parseCoworkTypeToNumber(this.collaborationType); return this.parseCoworkTypeToNumber(this.collaborationType);
} };
parseCoworkTypeToNumber(type) { CoviewUserInfo.prototype.parseCoworkTypeToNumber = function (type) {
switch (type) { switch (type) {
case COLLABORATION_TYPE.AUDIO: case COLLABORATION_TYPE.AUDIO:
return COLLABORATION_TYPE_NUMBER.AUDIO; return COLLABORATION_TYPE_NUMBER.AUDIO;
case COLLABORATION_TYPE.CAMERA: case COLLABORATION_TYPE.CAMERA:
return COLLABORATION_TYPE_NUMBER.CAMERA; return COLLABORATION_TYPE_NUMBER.CAMERA;
case COLLABORATION_TYPE.VIDEO: case COLLABORATION_TYPE.VIDEO:
return COLLABORATION_TYPE_NUMBER.VIDEO; return COLLABORATION_TYPE_NUMBER.VIDEO;
case COLLABORATION_TYPE.DOCUMENT: case COLLABORATION_TYPE.DOCUMENT:
return COLLABORATION_TYPE_NUMBER.DOCUMENT; return COLLABORATION_TYPE_NUMBER.DOCUMENT;
case COLLABORATION_TYPE.BOARD: case COLLABORATION_TYPE.BOARD:
return COLLABORATION_TYPE_NUMBER.BOARD; return COLLABORATION_TYPE_NUMBER.BOARD;
default: default:
return 0; return 0;
}
} }
}; };
......
...@@ -6,30 +6,24 @@ NativeBridgeDataSource.getDeviceInfo = function () { ...@@ -6,30 +6,24 @@ NativeBridgeDataSource.getDeviceInfo = function () {
} }
}; };
var DeviceInfo = class { function DeviceInfo(deviceInfo) {
isMoble; // iphone or iPad this.isMoble = deviceInfo.isMoble;
platform; // ios or android this.platform = deviceInfo.platform;
androidVersion; if (typeof android != "undefined") {
this.androidVersion = android.getAndroidVersion();
constructor(deviceInfo) {
this.isMoble = deviceInfo.isMoble;
this.platform = deviceInfo.platform;
if (typeof android != "undefined") {
this.androidVersion = android.getAndroidVersion();
}
} }
}
isiOS() { DeviceInfo.prototype.isiOS = function () {
return this.platform == "ios"; return this.platform == "ios";
} };
isAndroid() { DeviceInfo.prototype.isAndroid = function () {
return this.platform == "android"; return this.platform == "android";
} };
isMobile() { DeviceInfo.prototype.isMobile = function () {
return this.isMoble == true; return this.isMoble == true;
}
}; };
var deviceInfo = new DeviceInfo(NativeBridgeDataSource.getDeviceInfo()); var deviceInfo = new DeviceInfo(NativeBridgeDataSource.getDeviceInfo());
......
...@@ -6,15 +6,10 @@ NativeBridgeDataSource.getRoomInfo = function () { ...@@ -6,15 +6,10 @@ NativeBridgeDataSource.getRoomInfo = function () {
} }
}; };
var RoomInfo = class { function RoomInfo(roomInfo) {
roomID; this.roomID = roomInfo.roomID;
roomName; this.roomName = roomInfo.roomName;
roomType; this.roomType = roomInfo.roomType;
constructor(roomInfo) { }
this.roomID = roomInfo.roomID;
this.roomName = roomInfo.roomName;
this.roomType = roomInfo.roomType;
}
};
var roomInfo = new RoomInfo(NativeBridgeDataSource.getRoomInfo()); var roomInfo = new RoomInfo(NativeBridgeDataSource.getRoomInfo());
...@@ -6,16 +6,10 @@ NativeBridgeDataSource.getServerInfo = function () { ...@@ -6,16 +6,10 @@ NativeBridgeDataSource.getServerInfo = function () {
} }
}; };
var ServerInfo = class { function ServerInfo(serverInfo) {
chatURL; this.chatURL = serverInfo.chatURL;
cmsURL; this.cmsURL = serverInfo.cmsURL;
isOnline; this.isOnline = serverInfo.isOnline;
}
constructor(serverInfo) {
this.chatURL = serverInfo.chatURL;
this.cmsURL = serverInfo.cmsURL;
this.isOnline = serverInfo.isOnline;
}
};
var serverInfo = new ServerInfo(NativeBridgeDataSource.getServerInfo()); var serverInfo = new ServerInfo(NativeBridgeDataSource.getServerInfo());
var JoinInfo = class { function JoinInfo(sid, loginId, shopName, roomId, roomName, shopMemberId) {
sid; this.sid = sid;
loginId; this.loginId = loginId;
shopName; this.shopName = shopName;
roomId; this.roomId = roomId;
roomName; this.roomName = roomName;
shopMemberId; this.shopMemberId = shopMemberId;
constructor(sid, loginId, shopName, roomId, roomName, shopMemberId) { }
this.sid = sid;
this.loginId = loginId;
this.shopName = shopName;
this.roomId = roomId;
this.roomName = roomName;
this.shopMemberId = shopMemberId;
}
};
...@@ -6,30 +6,25 @@ NativeBridgeDataSource.getMyUserInfo = function () { ...@@ -6,30 +6,25 @@ NativeBridgeDataSource.getMyUserInfo = function () {
} }
}; };
var CurrentUserInfo = class { function CurrentUserInfo(userInfo) {
sid; this.sid = userInfo.sid;
loginID; this.loginID = userInfo.loginId;
shopName; this.shopName = userInfo.shopName;
shopMemberID; this.shopMemberID = userInfo.shopMemberId;
languageCode; if (userInfo.languageCode == undefined) {
constructor(userInfo) { userInfo.languageCode = "jp";
this.sid = userInfo.sid;
this.loginID = userInfo.loginId;
this.shopName = userInfo.shopName;
this.shopMemberID = userInfo.shopMemberId;
if (userInfo.languageCode == undefined) {
userInfo.languageCode = "jp";
}
this.languageCode = userInfo.languageCode;
} }
this.languageCode = userInfo.languageCode;
}
configureLanguage(languageCode = undefined) { CurrentUserInfo.prototype.configureLanguage = function (
if (languageCode == undefined) { languageCode = undefined
languageCode = this.languageCode; ) {
} if (languageCode == undefined) {
moment.locale(languageCode); languageCode = this.languageCode;
setLanguage(languageCode);
} }
moment.locale(languageCode);
setLanguage(languageCode);
}; };
var currentUserInfo = new CurrentUserInfo( var currentUserInfo = new CurrentUserInfo(
......
...@@ -52,7 +52,7 @@ CHAT_SOCKET.handleMessage = function ( ...@@ -52,7 +52,7 @@ CHAT_SOCKET.handleMessage = function (
) { ) {
CHAT_SOCKET.cleanUpCollaborationMessage(); CHAT_SOCKET.cleanUpCollaborationMessage();
if (typeof CoviewBridge !== "undefined") { if (typeof CoviewBridge !== "undefined" && g_isMainMan !== "undefined" && g_isMainMan == false) {
CoviewBridge.finishCollaboration(); CoviewBridge.finishCollaboration();
} }
return; return;
......
...@@ -211,7 +211,7 @@ ArchiveUI.appendImageTypePlayer = function (filePath) { ...@@ -211,7 +211,7 @@ ArchiveUI.appendImageTypePlayer = function (filePath) {
ArchiveUI.appendVideoTypePlayer = function (filePath) { ArchiveUI.appendVideoTypePlayer = function (filePath) {
if (deviceInfo.isiOS()) { if (deviceInfo.isiOS()) {
$("#archive_player").prepend( $("#archive_player").prepend(
'<video class="archive_player" controls autoplay playsinline controlsList="nodownload"><source src="' + '<video class="archive_player" controls playsinline controlsList="nodownload"><source src="' +
filePath + filePath +
'" type="video/mp4"><source src="' + '" type="video/mp4"><source src="' +
filePath + filePath +
...@@ -223,7 +223,7 @@ ArchiveUI.appendVideoTypePlayer = function (filePath) { ...@@ -223,7 +223,7 @@ ArchiveUI.appendVideoTypePlayer = function (filePath) {
$("#archive_player").prepend( $("#archive_player").prepend(
'<video class="archive_player" src=' + '<video class="archive_player" src=' +
filePath + filePath +
' controls autoplay playsinline controlsList="nodownload"></video>' ' controls playsinline controlsList="nodownload"></video>'
); );
} }
}; };
......
...@@ -203,7 +203,7 @@ FermiWebSocketMessageHandler.captureRequest = function (data) { ...@@ -203,7 +203,7 @@ FermiWebSocketMessageHandler.captureRequest = function (data) {
if ($("#recordBtn .record").hasClass("disable")) { if ($("#recordBtn .record").hasClass("disable")) {
screenLock(); screenLock();
recordStop(function () { recordStop().then(function () {
$("#screenLock").remove(); $("#screenLock").remove();
captureAndShareImage( captureAndShareImage(
serverInfo.cmsURL + "/chatapi/file/uploadArchive", serverInfo.cmsURL + "/chatapi/file/uploadArchive",
...@@ -264,7 +264,7 @@ FermiWebSocketMessageHandler.apiSendOwnerChangeComplete = function (data) { ...@@ -264,7 +264,7 @@ FermiWebSocketMessageHandler.apiSendOwnerChangeComplete = function (data) {
); );
penOff(); penOff();
if ($("#recordBtn .record").hasClass("disable")) { if ($("#recordBtn .record").hasClass("disable")) {
recordStop(function () {}); recordStop();
} }
if ($("#micBtn .voice").hasClass("disable")) { if ($("#micBtn .voice").hasClass("disable")) {
micOff(); micOff();
......
...@@ -35,7 +35,7 @@ function toggleCapture() { ...@@ -35,7 +35,7 @@ function toggleCapture() {
console.log("peacekim:: share-bind-button-action - toggleCapture()"); console.log("peacekim:: share-bind-button-action - toggleCapture()");
if ($("#recordBtn").hasClass("bg_red")) { if ($("#recordBtn").hasClass("bg_red")) {
screenLock(); screenLock();
recordStop(function () { recordStop().then(function () {
$("#screenLock").remove(); $("#screenLock").remove();
coview_api.Capture(serverInfo.cmsURL + "/chatapi/file/uploadArchive"); coview_api.Capture(serverInfo.cmsURL + "/chatapi/file/uploadArchive");
}); });
...@@ -93,42 +93,33 @@ function toggleRecord() { ...@@ -93,42 +93,33 @@ function toggleRecord() {
if (!$("#recordBtn .record").hasClass("disable")) { if (!$("#recordBtn .record").hasClass("disable")) {
recordStart(); recordStart();
} else { } else {
recordStop(function () { recordStop().then(function () {
console.info("Did record stop"); console.info("Did record stop");
}); });
} }
} }
function recordStop(callback) { function recordStop() {
console.log("peacekim:: share-bind-button-action - recordStop()"); return new Promise(function (done) {
if (!$("#recordBtn .record").hasClass("disable")) { console.log("peacekim:: share-bind-button-action - recordStop()");
callback(); if (!$("#recordBtn .record").hasClass("disable")) {
return; done();
} return;
Common.showLoadingIndicator(); }
// アーカイブ保存中は画面操作不可(協業終了,協業切り替え防止) Common.showLoadingIndicator();
screenLock(); // アーカイブ保存中は画面操作不可(協業終了,協業切り替え防止)
screenLock();
// アーカイブ保存処理
mainManRecordWithCollaboration(
"stop",
serverInfo.cmsURL + "/chatapi/file/uploadArchive",
callback
);
}
function mainManRecordWithCollaboration(action, url, callback) { // アーカイブ保存処理
console.log( mainManRecordStopWithCollaboration().then(function () {
"peacekim:: share-bind-button-action - mainManRecordWithCollaboration()" done();
); });
try { });
mediaRecorder.stop(); }
} catch (exeption) {
console.error("Record failed");
callback();
}
setTimeout(function () { async function sendRecordedData() {
return new Promise(function (done) {
// get lastest message id and update message from server via native
const blob = new Blob(recordedBlobs, { type: "video/webm" }); const blob = new Blob(recordedBlobs, { type: "video/webm" });
const uploadFileName = "record_" + g_webroom + "_" + g_shareCount + ".webm"; const uploadFileName = "record_" + g_webroom + "_" + g_shareCount + ".webm";
g_shareCount++; g_shareCount++;
...@@ -142,27 +133,48 @@ function mainManRecordWithCollaboration(action, url, callback) { ...@@ -142,27 +133,48 @@ function mainManRecordWithCollaboration(action, url, callback) {
: ARCHIVE_TYPE.VOICE; : ARCHIVE_TYPE.VOICE;
formData.append("archiveType", collaborationType); formData.append("archiveType", collaborationType);
postRecords(url, formData, callback); postRecords(formData).then(function () {
}, 1000); done();
} });
});
function postRecords(url, formData, callback) { }
$.ajax({
type: "post", function mainManRecordStopWithCollaboration() {
url: url, return new Promise(function (done) {
data: formData, console.log(
contentType: false, "peacekim:: share-bind-button-action - mainManRecordWithCollaboration()"
processData: false, );
success: function (res) { try {
recordFinished(); mediaRecorder.stop();
Common.dismissLoadingIndicator(); } catch (exeption) {
callback(); console.error("Record stop failed");
}, done();
error: function (err) { }
recordFinished(); sendRecordedData().then(function () {
Common.dismissLoadingIndicator(); done();
callback(); });
}, });
}
function postRecords(formData) {
return new Promise(function (done) {
$.ajax({
type: "post",
url: serverInfo.cmsURL + "/chatapi/file/uploadArchive",
data: formData,
contentType: false,
processData: false,
success: function (res) {
recordFinished();
Common.dismissLoadingIndicator();
done();
},
error: function (err) {
recordFinished();
Common.dismissLoadingIndicator();
done();
},
});
}); });
} }
......
...@@ -590,9 +590,11 @@ CoviewBridge.exitCollaboration = function () { ...@@ -590,9 +590,11 @@ CoviewBridge.exitCollaboration = function () {
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.DOCUMENT) { if (globalUserInfo.collaborationType == COLLABORATION_TYPE.DOCUMENT) {
NativeBridgeDelegate.exitMeetingRoom(); NativeBridgeDelegate.exitMeetingRoom();
} }
if ($("#recordBtn .record").hasClass("disable")) { if ($("#recordBtn .record").hasClass("disable")) {
recordStop(CoviewBridge.finishCollaboration); recordStop().then(function () {
CoviewBridge.finishCollaboration();
});
} else { } else {
CoviewBridge.finishCollaboration(); CoviewBridge.finishCollaboration();
} }
......
...@@ -29,8 +29,12 @@ document.addEventListener("DOMContentLoaded", function () { ...@@ -29,8 +29,12 @@ document.addEventListener("DOMContentLoaded", function () {
// call from collaboration_overlay_menu.html and collaboration.html // call from collaboration_overlay_menu.html and collaboration.html
function changeCollaboration(collaborationType) { function changeCollaboration(collaborationType) {
console.log("peacekim:: share.js changeCollaboration collaborationType: "+collaborationType); console.log(
recordStop(function () { "peacekim:: share.js changeCollaboration collaborationType: " +
collaborationType
);
recordStop().then(function () {
console.log("peacekim:: share.js changeCollaboration did recordStop"); console.log("peacekim:: share.js changeCollaboration did recordStop");
var newMeetingID = 0; var newMeetingID = 0;
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.DOCUMENT) { if (globalUserInfo.collaborationType == COLLABORATION_TYPE.DOCUMENT) {
......
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