<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Room.aspx.cs" Inherits="RM.Web.Live.Room" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title><%=liveName %>-<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("live_Room")%></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<style type="text/css">
html, body { height: 100%; }
body { margin: 0; padding: 0; overflow: auto; text-align: center; background-color: #ececec; }
#flashContent { display: none; }
.closeLiveResult { width: 1005px; margin: 0 auto; }
.closeLiveResult { margin-top: 10px; background-color: #FFF; border: 1px solid #DEDEDE; box-shadow: 0 6px 9px -8px rgba(0, 0, 0, 0.5); display: none; font-size: 16pt; font-weight: bold; color: #4cb7db; text-align: center; height: 300px; line-height: 300px; }
.warningImg { vertical-align: middle; }
 ul{ padding:0; margin:0; list-style:none;}
.userlis{ border:1px #ddd solid;}
.nav-tabs{background-color:#f4f4f4; padding:5px; padding-bottom:0;}
.tab-content{ height:490px; padding:5px; overflow-y:scroll; background-color:White; text-align:left;}
.chat-message{ margin-bottom:10px;}
.chat-log{ color:#ccc; font-size:small;}
.chat-message .chat-username{ color:Blue; display:block; font-size:12px;}
.chat-message .chat-message-body{ display:block;}
#cat_send{  background-color:#f4f4f4; border-top:1px #ddd solid; padding:10px; margin-top:5px;}
</style>
</head>
<body>
<div style=" height:53px; background-color:White;">
        <div style=" width:1005px; margin:0 auto; text-align:left;"><img src="http://cn.jingyaoshi.net/live/Images/liveroom_logo.gif" />
        
        <div style=" float:right; font-size:12px; margin-right:10px; margin-top:20px;" id="headname"></div>
        </div>
</div>
<div style=" width:1000px; margin:10px auto;">
<div style=" width:800px; height:600px; float:left;" >
<div class="embed-responsive embed-responsive-4by3" style=" background:#000">
  <div class="" id="flashContent"></div>
  </div>
</div>


<div style=" width:200px;height:600px; float:right;">
<div  class="userlis">
    <ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">讨论</a></li>
    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">列表</a></li>
    </ul>
    <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">
       
           
                        <ul id="chat-messages" class="chat-messages">
                            <!--  span.chat-username 游客#1000 -->
                            <!--  span.chat-message-body 游客#1000: message -->
                            
                        </ul>
                        
        
    
    </div>
    <div role="tabpanel" class="tab-pane" id="profile">
        <ul id="chat-online-list" class="list-group chat-online-list">
                            <!--li.list-group-item 游客#1000-->
                        </ul>
    </div>
    </div>
    <div class="input-group" id="cat_send">
         <input type="text" id="chatroom-input" class="form-control">
           <span class="input-group-btn">
              <button type="button" id="btn-send-msg" class="btn btn-success">发送</button>
           </span>
    </div>
</div>
</div>
</div>

<!--[if lte IE 7]>
    <script type='text/javascript' src='js/lib/json2.js'></script>
    <![endif]-->
    <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/lib/socket.io-1.3.5.min.js"></script>
    <script type="text/javascript" src="js/lib/yunba-js-sdk.js"></script>
    
     <script src="swfobject.js" type="text/javascript"></script>
    <script type="text/javascript">
        var flashvars = {
            rid: '<%=roomId %>',
            rtmpVideo: '<%=RM.Common.DotNetConfig.ConfigHelper.GetAppSettings("RmtpURLvLive")%>',
            name: '<%=item.LiveTelecast_CreateUserName %>',
            id: '111a222333',
           	id:'<%=item.LiveTelecast_CreateUserId%>',
            type:<%=item.LiveTelecast_InType=="3"?0:item.LiveTelecast_InType=="1"?1:item.LiveTelecast_InType=="2"?1:item.LiveTelecast_InType=="4"?1:0 %>,
            record: '<%=IsVideo%>',
            bookname: "<%=LiveTelecast_Name%>",
            data: "<%=LiveTelecast_StartDate%>",
            createuserName: "<%=LiveTelecast_Teacher%>",
            teacherid: "<%=LiveTelecast_TeacherId %>"
        };
        var CHATROOM_TOPIC = flashvars.rid;
        var roleId = flashvars.type; // 1、学生 0、老师

        function QueryString(fieldName) {
            var reg = new RegExp("(^|&)" + fieldName.toLowerCase() + "=([^&]*)(&|$)", "i");
            var r = window.location.search.toLowerCase().substr(1).match(reg);
            if (r != null) return unescape(r[2]); return "";
        }
        function livelog(text) {
            console.log(text);
        }
        function liveload() {
            var a = "<%=item.LiveTelecast_CreateUserId%>";
            var b = "<%=LiveTelecast_TeacherId %>";
            if (a != b) {
                var swfVersionStr = "10.0.0";
                var xiSwfUrlStr = "playerProductInstall.swf";
                var params = { quality: "high", bgcolor: "#ececec", allowscriptaccess: "sameDomain", allowfullscreen: "true" };
                var attributes = { id: "TKSLIVE", name: "TKSLIVE", align: "middle" };
                params.wmode = "opaque";
                document.getElementById("headname").innerHTML = "您好，" + flashvars.name;
                var h = document.documentElement.clientHeight;
                swfobject.embedSWF("stu_live.swf", "flashContent", "100%", "100%", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
                swfobject.createCSS("#flashContent", "display:block;text-align:left;");

            }
            else {
                alert("请主讲人，使用软件登陆！！");
            }
        }
        $(function () {
            liveload();
        })
    </script>
    <script type="text/javascript" src="js/main.js"></script>
</body>
</html>
