Commit 6f3fe281 by Lee Munkyeong

コードレビュー対応。

parent 3cb4cff1
......@@ -154,7 +154,7 @@ $(function () {
captureAndShareImage(CMS_SERVER_URL + '/chatapi/file/uploadArchive', data.payload.name);
}
} else if (data.type === "SEND_HOST_CHANGE_SIGNAL") {
if(g_username == data.payload.name){
if (g_username == data.payload.name) {
fw.sendToMsg('others', 'SEND_HOST_CHANGE_DONE_SIGNAL', {host: g_username});
$(".coview_on_media_image_crown").show();
$(".coview_on_screen_btn.owner").show();
......@@ -162,12 +162,11 @@ $(function () {
$(".coview_share_title_right_area").show();
g_isMainMan = true;
g_isMainManUsername = g_username;
//g_agentID = g_username;
options.constraints = { audio: true, video: true };
g_localStream = await createLocalVideo (options.constraints);
ChangeAgentStream(g_localStream);
$('[id^="video-"]').css('display','none');
SwitchMainVideoPosition("agent");
$('[id^="video-"]').css('display','none');
SwitchMainVideoPosition("agent");
$("#localVideo").show();
$("#remotes").css("z-index", "0");
alert(getLocalizedString('host_change_notify', data.payload.name));
......@@ -601,7 +600,7 @@ function captureAndShareImage(urls, changeHostName) {
var w,h;
var video = document.getElementById("localVideo");
var canvas = document.createElement('canvas');
if(clientOrientaionState == 1){
if (clientOrientaionState == 1) {
canvas.width = w = 680;
canvas.height = h = 515;
} else {
......@@ -621,7 +620,7 @@ function captureAndShareImage(urls, changeHostName) {
$(canvasRemote).attr("height", $(snapshots[cpatureViewIndex]).attr("height"));
$(canvasRemote).attr("width", $(snapshots[cpatureViewIndex]).attr("width"));
console.log ('url', URL.createObjectURL(blob));
if ( $(".canvas_wrap").css("width").replace("px","") / $(".canvas_wrap").css("height").replace("px","") < $(canvas).attr("width") / $(canvas).attr("height") ) {
if ($(".canvas_wrap").css("width").replace("px","") / $(".canvas_wrap").css("height").replace("px","") < $(canvas).attr("width") / $(canvas).attr("height")) {
var h = $(".canvas_wrap").css("width").replace("px","") * ($(canvas).attr("height") / $(canvas).attr("width"));
var w = $(".canvas_wrap").css("width").replace("px","");
$(canvasRemote).css("height", h);
......@@ -648,7 +647,7 @@ function captureAndShareImage(urls, changeHostName) {
formData.append("imgFile", blob, uploadFileName);
var uploadUrl = location.protocol + "//" + location.hostname + ":" + location.port + "/upload/create";
if(!location.port){
if (!location.port) {
uploadUrl = location.protocol + "//" + location.hostname + "/upload/create";
}
$.ajax({
......@@ -657,8 +656,8 @@ function captureAndShareImage(urls, changeHostName) {
data: formData,
processData: false,
contentType: false,
success: function (res) {
setTimeout(function(){
success: function(res) {
setTimeout(function() {
SendFileShare(uploadFileName);
$("#coviewCaptureCtrBtn").hide();
$("#coviewRecCtrBtn").hide();
......@@ -669,7 +668,7 @@ function captureAndShareImage(urls, changeHostName) {
fw.sendToMsg('others', 'SEND_HOST_CHANGE_SIGNAL', {"name": changeHostName});
}, 1500);
},
error: function (err) {
error: function(err) {
console.log(err);
}
});
......
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