<!doctype html>
<html lang="en">

<head>
  <!-- Required meta tags -->
  <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>
  <link rel="stylesheet" href="./css/notosansjp.css">
  <link href="./fontawesome/css/all.css" rel="stylesheet">
  <link rel="stylesheet" href="./css/bootstrap.min.css">
  <link rel="stylesheet" href="./css/common.css">
  <link rel="stylesheet" href="./css/contact.css">
  <link rel="stylesheet" href="./css/collaboration.css">
  <link rel="stylesheet" href="./css/footer.css">
  <link rel="stylesheet" href="./css/loading.css">
  <link rel="stylesheet" href="./css/font-awesome.css">
  <link rel="stylesheet" href="./css/share.css">
</head>

<body>
  <!-- ナビメニュー -->
  <header id="collabo_header">
    <div class="d-flex align-items-center h-100">
      <div class="collabo_nav_l text-left w-100">
      </div>
      <div class="collabo_nav_r">
        <div class="text-right d-flex align-items-center">
          <button type="button" name="button" class="btn add_user_btn none"></button>
          <!--<button type="button" name="button" class="btn menu_btn"></button>-->
        </div>
      </div>
    </div>
  </header><!-- header -->

  <!-- コンテンツ -->
  <main id="collabo_main" class="none">
    <div class="document_wrap">
      <div class="coview_share_body coview_share_area" id="coviewShare" style="z-index: 1;">
      </div>
    </div>
  </main>

  <!-- オーバーレイ メニュー -->
  <div id="collaboration_voice_overlay_menu"></div>
  <!-- オーバーレイ ユーザーリスト -->
  <div id="overlay_user_list" class="overlay slidein" style="z-index: 3;">
    <div id="collaboration_overlay_user_list"></div>
  </div>

  <!-- プロフィールモーダル -->
  <div id="userProfileModalInCollaboration"></div>
  <div id="modal_collabo_profile2"></div>
  <!-- ユーザー追加オーバーレイ -->
  <div id="add_user_list" ></div>
  <div id="modal_add_user_confirm"></div>
  <!-- ホスト変更モーダル -->
  <div id="modal_collabo_change_host"></div>
  <!-- ホストリクエストモーダル -->
  <div id="modal_collabo_host_request"></div>

  <!-- フッター -->
  <div id="footer_collabo"></div>
  <script src="./js/libs/jquery-3.3.1.min.js"></script>
  <script src="./js/libs/socket.io.js"></script>
  <script src="./js/libs/moment.js"></script>
  <script src="./js/libs/locale/ko.js" charset="UTF-8"></script>
  <script src="./js/libs/locale/ja.js" charset="UTF-8"></script>
  <script src="./js/libs/mustache.min.js"></script>
  <script src="./js/libs/bootstrap.min.js"></script>
  <script src="./js/libs/jquery.mark.min.js"></script>
  <script src="./js/constant.js"></script>
  <script src="./js/collaboration.js"></script>
  <script src="./js/common.js"></script>
  <script src="./js/chat.js"></script>
  <script src="./js/chat-ui.js"></script>
  <script src="./js/chat-util.js"></script>
  <script src="./js/chat-db.js"></script>
  <script src="./js/language.js"></script>
  <script src="./js/language_ko.js" charset="UTF-8"></script>
  <script src="./js/language_ja.js" charset="UTF-8"></script>
  <script src="./js/language_en.js" charset="UTF-8"></script>
  <script src="./js/chat-websocket.js"></script>
  <script src="https://livetaskyell.abookcloud.com/coview_api.js"></script>
  <script src="./js/share.js"></script>
  <script>
    $("#footer_collabo").load("./footer_collabo.html");
    $("#modal_collabo_host_request").load("./modal_collabo_host_request.html");
    $("#modal_collabo_change_host").load("./modal_collabo_change_host.html");
    $("#modal_collabo_capture").load("./modal_collabo_capture.html");
    $("#modal_collabo_profile2").load("./modal_collabo_profile2.html");
    $("#collaboration_voice_overlay_menu").load("./collaboration_voice_overlay_menu.html");
    $("#add_user_list").load("./modal_add_user_list.html");

    let CHAT_SERVER_URL = '';
    let CMS_SERVER_URL = '';
    let ASSET_PATH = './';
    let PLATFORM = '';
    let IS_MOBILE = true;
    let IS_ONLINE = false;
    let collaborationJoinFlg = 0;
    let roomType;

    if (typeof(android) != "undefined") {
      android.getLoginParameter();
      android.getGlobalParameter();
      roomType = android.getRoomType();
    } else {
      webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
      webkit.messageHandlers.getGlobalParameter.postMessage({});
      roomType = CHAT_DB.getRoomType();
    }

    if (roomType == chatRoomType.DM) {
        $('.add_user_btn').removeClass('none');
    }

    async function getGlobalParam(chatServerUrl, cmsServerUrl, platform, isMobile, isOnline) {
      CHAT_SERVER_URL = chatServerUrl;
      CMS_SERVER_URL = cmsServerUrl;
      PLATFORM = platform;
      IS_MOBILE = isMobile;
      IS_ONLINE = isOnline;
      if (CHAT_UTIL.isIOS()) {
        collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
      } else if (CHAT_UTIL.isAndroid()) {
        collaborationJoinFlg = android.getCollaborationJoinFlg();
        console.log(collaborationJoinFlg);
      }
      globalUserInfo.coWorkType = collaborationTypeKey.AUDIO;
      if (collaborationJoinFlg != '2') {
        CHAT_SOCKET.connectSocket();
        socket.emit('join', CHAT.globalLoginParameter, function() {
        });
      }
    };
  </script>
</body>


</html>