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 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css" >
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css" >
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css" >
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css" >
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="viewport"
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="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css">
......
......@@ -6,17 +6,7 @@ NativeBridgeDataSource.getCollaborationJoinFlg = function () {
}
};
var CoviewUserInfo = class {
sid;
loginId;
roomId;
shopName;
collaborationType;
joinType;
isLeaved;
meetingID;
constructor(sid, loginId, roomId, shopName) {
function CoviewUserInfo(sid, loginId, roomId, shopName) {
this.sid = sid;
this.loginId = loginId;
this.roomId = roomId;
......@@ -27,9 +17,9 @@ var CoviewUserInfo = class {
this.isLeaved = false;
this.meetingID = 0;
}
get coWorkType() {
Object.defineProperty(this, "coWorkType", {
get() {
switch (this.collaborationType) {
case COLLABORATION_TYPE.AUDIO:
return COLLABORATION_TYPE.AUDIO;
......@@ -42,13 +32,15 @@ var CoviewUserInfo = class {
case COLLABORATION_TYPE.BOARD:
return COLLABORATION_TYPE.AUDIO;
}
}
},
});
}
isInvited() {
CoviewUserInfo.prototype.isInvited = function () {
return this.joinType == COLLABORATION_JOIN_TYPE.INVITED;
}
};
parseNumberToCoworkType(type) {
CoviewUserInfo.prototype.parseNumberToCoworkType = function (type) {
switch (type) {
case COLLABORATION_TYPE_NUMBER.AUDIO:
return COLLABORATION_TYPE.AUDIO;
......@@ -63,13 +55,13 @@ var CoviewUserInfo = class {
default:
return 0;
}
}
};
getCollaborarionTypeAsNumber() {
CoviewUserInfo.prototype.getCollaborarionTypeAsNumber = function () {
return this.parseCoworkTypeToNumber(this.collaborationType);
}
};
parseCoworkTypeToNumber(type) {
CoviewUserInfo.prototype.parseCoworkTypeToNumber = function (type) {
switch (type) {
case COLLABORATION_TYPE.AUDIO:
return COLLABORATION_TYPE_NUMBER.AUDIO;
......@@ -84,7 +76,6 @@ var CoviewUserInfo = class {
default:
return 0;
}
}
};
// variable name for legacy connection to agent_app.js in coview library
......
......@@ -6,30 +6,24 @@ NativeBridgeDataSource.getDeviceInfo = function () {
}
};
var DeviceInfo = class {
isMoble; // iphone or iPad
platform; // ios or android
androidVersion;
constructor(deviceInfo) {
function DeviceInfo(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";
}
};
isAndroid() {
DeviceInfo.prototype.isAndroid = function () {
return this.platform == "android";
}
};
isMobile() {
DeviceInfo.prototype.isMobile = function () {
return this.isMoble == true;
}
};
var deviceInfo = new DeviceInfo(NativeBridgeDataSource.getDeviceInfo());
......
......@@ -6,15 +6,10 @@ NativeBridgeDataSource.getRoomInfo = function () {
}
};
var RoomInfo = class {
roomID;
roomName;
roomType;
constructor(roomInfo) {
function RoomInfo(roomInfo) {
this.roomID = roomInfo.roomID;
this.roomName = roomInfo.roomName;
this.roomType = roomInfo.roomType;
}
};
}
var roomInfo = new RoomInfo(NativeBridgeDataSource.getRoomInfo());
......@@ -6,16 +6,10 @@ NativeBridgeDataSource.getServerInfo = function () {
}
};
var ServerInfo = class {
chatURL;
cmsURL;
isOnline;
constructor(serverInfo) {
function ServerInfo(serverInfo) {
this.chatURL = serverInfo.chatURL;
this.cmsURL = serverInfo.cmsURL;
this.isOnline = serverInfo.isOnline;
}
};
}
var serverInfo = new ServerInfo(NativeBridgeDataSource.getServerInfo());
var JoinInfo = class {
sid;
loginId;
shopName;
roomId;
roomName;
shopMemberId;
constructor(sid, loginId, shopName, roomId, roomName, shopMemberId) {
function JoinInfo(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,13 +6,7 @@ NativeBridgeDataSource.getMyUserInfo = function () {
}
};
var CurrentUserInfo = class {
sid;
loginID;
shopName;
shopMemberID;
languageCode;
constructor(userInfo) {
function CurrentUserInfo(userInfo) {
this.sid = userInfo.sid;
this.loginID = userInfo.loginId;
this.shopName = userInfo.shopName;
......@@ -21,15 +15,16 @@ var CurrentUserInfo = class {
userInfo.languageCode = "jp";
}
this.languageCode = userInfo.languageCode;
}
}
configureLanguage(languageCode = undefined) {
CurrentUserInfo.prototype.configureLanguage = function (
languageCode = undefined
) {
if (languageCode == undefined) {
languageCode = this.languageCode;
}
moment.locale(languageCode);
setLanguage(languageCode);
}
};
var currentUserInfo = new CurrentUserInfo(
......
......@@ -52,7 +52,7 @@ CHAT_SOCKET.handleMessage = function (
) {
CHAT_SOCKET.cleanUpCollaborationMessage();
if (typeof CoviewBridge !== "undefined") {
if (typeof CoviewBridge !== "undefined" && g_isMainMan !== "undefined" && g_isMainMan == false) {
CoviewBridge.finishCollaboration();
}
return;
......
......@@ -211,7 +211,7 @@ ArchiveUI.appendImageTypePlayer = function (filePath) {
ArchiveUI.appendVideoTypePlayer = function (filePath) {
if (deviceInfo.isiOS()) {
$("#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 +
'" type="video/mp4"><source src="' +
filePath +
......@@ -223,7 +223,7 @@ ArchiveUI.appendVideoTypePlayer = function (filePath) {
$("#archive_player").prepend(
'<video class="archive_player" src=' +
filePath +
' controls autoplay playsinline controlsList="nodownload"></video>'
' controls playsinline controlsList="nodownload"></video>'
);
}
};
......
......@@ -203,7 +203,7 @@ FermiWebSocketMessageHandler.captureRequest = function (data) {
if ($("#recordBtn .record").hasClass("disable")) {
screenLock();
recordStop(function () {
recordStop().then(function () {
$("#screenLock").remove();
captureAndShareImage(
serverInfo.cmsURL + "/chatapi/file/uploadArchive",
......@@ -264,7 +264,7 @@ FermiWebSocketMessageHandler.apiSendOwnerChangeComplete = function (data) {
);
penOff();
if ($("#recordBtn .record").hasClass("disable")) {
recordStop(function () {});
recordStop();
}
if ($("#micBtn .voice").hasClass("disable")) {
micOff();
......
......@@ -35,7 +35,7 @@ function toggleCapture() {
console.log("peacekim:: share-bind-button-action - toggleCapture()");
if ($("#recordBtn").hasClass("bg_red")) {
screenLock();
recordStop(function () {
recordStop().then(function () {
$("#screenLock").remove();
coview_api.Capture(serverInfo.cmsURL + "/chatapi/file/uploadArchive");
});
......@@ -93,16 +93,17 @@ function toggleRecord() {
if (!$("#recordBtn .record").hasClass("disable")) {
recordStart();
} else {
recordStop(function () {
recordStop().then(function () {
console.info("Did record stop");
});
}
}
function recordStop(callback) {
function recordStop() {
return new Promise(function (done) {
console.log("peacekim:: share-bind-button-action - recordStop()");
if (!$("#recordBtn .record").hasClass("disable")) {
callback();
done();
return;
}
Common.showLoadingIndicator();
......@@ -110,25 +111,15 @@ function recordStop(callback) {
screenLock();
// アーカイブ保存処理
mainManRecordWithCollaboration(
"stop",
serverInfo.cmsURL + "/chatapi/file/uploadArchive",
callback
);
mainManRecordStopWithCollaboration().then(function () {
done();
});
});
}
function mainManRecordWithCollaboration(action, url, callback) {
console.log(
"peacekim:: share-bind-button-action - mainManRecordWithCollaboration()"
);
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 uploadFileName = "record_" + g_webroom + "_" + g_shareCount + ".webm";
g_shareCount++;
......@@ -142,28 +133,49 @@ function mainManRecordWithCollaboration(action, url, callback) {
: ARCHIVE_TYPE.VOICE;
formData.append("archiveType", collaborationType);
postRecords(url, formData, callback);
}, 1000);
postRecords(formData).then(function () {
done();
});
});
}
function postRecords(url, formData, callback) {
function mainManRecordStopWithCollaboration() {
return new Promise(function (done) {
console.log(
"peacekim:: share-bind-button-action - mainManRecordWithCollaboration()"
);
try {
mediaRecorder.stop();
} catch (exeption) {
console.error("Record stop failed");
done();
}
sendRecordedData().then(function () {
done();
});
});
}
function postRecords(formData) {
return new Promise(function (done) {
$.ajax({
type: "post",
url: url,
url: serverInfo.cmsURL + "/chatapi/file/uploadArchive",
data: formData,
contentType: false,
processData: false,
success: function (res) {
recordFinished();
Common.dismissLoadingIndicator();
callback();
done();
},
error: function (err) {
recordFinished();
Common.dismissLoadingIndicator();
callback();
done();
},
});
});
}
// div削除関数
......
......@@ -592,7 +592,9 @@ CoviewBridge.exitCollaboration = function () {
}
if ($("#recordBtn .record").hasClass("disable")) {
recordStop(CoviewBridge.finishCollaboration);
recordStop().then(function () {
CoviewBridge.finishCollaboration();
});
} else {
CoviewBridge.finishCollaboration();
}
......
......@@ -29,8 +29,12 @@ document.addEventListener("DOMContentLoaded", function () {
// call from collaboration_overlay_menu.html and collaboration.html
function changeCollaboration(collaborationType) {
console.log("peacekim:: share.js changeCollaboration collaborationType: "+collaborationType);
recordStop(function () {
console.log(
"peacekim:: share.js changeCollaboration collaborationType: " +
collaborationType
);
recordStop().then(function () {
console.log("peacekim:: share.js changeCollaboration did recordStop");
var newMeetingID = 0;
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