Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
bugfix
  • Loading branch information
Neallin committed Jun 22, 2018
1 parent 244648f commit ac5b42d
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 161 deletions.
134 changes: 2 additions & 132 deletions assets/css/webrtc.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
background:#006eff
}

.edu-right-sidebar{width:435px;padding:9px 15px;height: auto}
.edu-right-sidebar{width:270px;padding:9px 15px;height: auto}
.edu-chatroom-speaking .tc-15-input-textarea{padding:10px 5px;}
.edu-right-chatroom{ height: calc( 100vh - 110px);}
.edu-chatroom-notification{padding:0 10px;
Expand All @@ -14,134 +14,4 @@
word-wrap: break-word;
overflow: auto;
}
.edu-chatroom-list{padding:0}

.tc-member-list-container{height:auto}

.edu-member-list-inner{ overflow: hidden; padding-bottom:0;
white-space: normal;}
.edu-member-list-inner>li{
display:inline-block; margin:2px;
width: calc( (100vw - 800px)/2 - 10px );
height: calc( (100vw - 800px)/2 - 10px );
vertical-align: middle;
overflow: hidden;
}
.edu-member-box .edu-member-img{
width:100%;height:100%;background:#000;
}

.tc-member-list-container{background:transparent;margin:auto}

.edu-main-content-wrapper{
margin-right:480px; margin-left: 20px; height: 100%;
}

.edu-left-sidebar{ width:300px; }
.edu-main-content-wrapper{margin-left:105px;}

@media screen and (max-width: 1300px) {
.edu-header{height:50px;line-height: 50px}
.edu-container{top:50px;}
.edu-member-list-inner>li{
display:inline-block; margin:2px;
width: calc( (100vw - 450px)/2 - 10px );
height: calc( (100vw - 450px)/2 - 10px );
vertical-align: middle;
overflow: hidden;
}
.edu-member-box .edu-member-img{
width:100%;height:100%;background:#000;
}
.edu-main-content-wrapper{
margin-right:200px
}
.edu-right-sidebar{
width:200px;
}
.edu-left-sidebar{
width:200px
}
.edu-main-content-wrapper{
margin-left:10px;
}
.tc-15-tab{
margin-bottom:5px;
}
.tc-15-tab-alt > .tc-15-tablist{
margin-bottom:0;
}
.tc-15-tab-alt > .tc-15-tablist ul{display: none}
}
/*
@media screen and (max-width: 1300px) {
.edu-header{height:30px;line-height: 30px}
.edu-container{top:30px;}
.edu-member-list-inner>li{
display:inline-block; margin:2px;
width: calc( (100vw - 450px)/2 - 10px );
height: calc( (100vw - 450px)/2 - 10px );
vertical-align: middle;
overflow: hidden;
}
.edu-member-box .edu-member-img{
width:100%;height:100%;background:#000;
}
.edu-main-content-wrapper{
margin-right:200px
}
.edu-right-sidebar{
width:200px;
}
.edu-left-sidebar{
width:200px
}
.edu-main-content-wrapper{
margin-left:10px;
}
.tc-15-tab{
margin-bottom:5px;
}
.tc-15-tab-alt > .tc-15-tablist{
margin-bottom:0;
}
.tc-15-tab-alt > .tc-15-tablist ul{display: none}
} */



@media screen and (max-width: 1440px) {
.edu-header{height:30px;line-height: 30px}
.edu-container{top:30px;}
.edu-member-list-inner>li{
display:inline-block; margin:2px;
width: calc( (100vw - 230px)/2 - 10px );
height: calc( (100vw - 230px)/2 - 10px );
vertical-align: middle;
overflow: hidden;
}
.edu-member-box .edu-member-img{
width:100%;height:100%;background:#000;
}
.edu-main-content-wrapper{
margin-right:0
}
.edu-right-sidebar{
width:0;
display:none;
}
.edu-left-sidebar{
width:200px
}
.edu-main-content-wrapper{
margin-left:10px;
}
.tc-15-tab{
margin-bottom:5px;
}
.tc-15-tab-alt > .tc-15-tablist{
margin-bottom:0;
}
.tc-15-tab-alt > .tc-15-tablist ul{display: none}
}
.edu-chatroom-list{padding:0}
2 changes: 1 addition & 1 deletion component/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Vue.use(Toast, {
defaultType: 'center',
duration: 3000,
wordWrap: true,
width: '150px'
width: '500px'
});

new Vue({
Expand Down
1 change: 1 addition & 0 deletions component/banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var Banner = {
<div class="edu-header-login"> \
<a href="javascript:return false;" onclick="return false;">{{teacher}}</a> \
<a v-on:click="logout">退出</a> \
<a href="https://support.qq.com/products/31450" target="_blank">问题反馈</a> \
</div> \
</div>',
name: 'Banner',
Expand Down
29 changes: 20 additions & 9 deletions component/mainwindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var MainView = {
\
<!-- 主界面 start --> \
<div class="edu-main" style="overflow-y: scroll"> \
<div class="edu-main-content-wrapper" > \
<div style=" margin-right:320px; margin-left: 20px; height: 100%;"> \
<!-- tab start --> \
<div class="tc-15-tab tc-15-tab-alt customize-tab-bg" > \
<div role="tablist" class="tc-15-tablist edu-tab-tablist"> \
Expand All @@ -59,7 +59,15 @@ var MainView = {
</div> \
<!-- tab end --> \
<!-- 内容快 start --> \
<div class="edu-area-main"> \
<div class="edu-area-main"> \
<!--tab1 摄像头 Start --> \
<div v-show="mode == \'camera\'" style="background-color: black;display: flex;justify-content: center;"> \
<!-- <div id="videoview" class="edu-main-video-play" style=" margin: 0 auto; width: 720px; height: 540px;"> --> \
<!-- </div> --> \
<video id="localVideo" style=" margin: 0 auto; width: 100%; height: calc( 100vh - 335px );" muted autoplay playinline></video> \
</div> \
<!--tab1 摄像头 End --> \
<!--tab2 白板 Start --> \
<div v-show="mode == \'whiteboard\'"> \
<sketchpad ref="sketchpadCom" v-if="showSketchpad" :canDraw="canDraw" :toggleSketchPage="toggleSketchPage" @sketchpadData="onSketchpadDataGen" :inputData="inputSketchpadData" :imOptions="imOptions" :userAuthData="userAuthData" /> \
</div> \
Expand All @@ -81,17 +89,20 @@ var MainView = {
</div> \
</div> \
</li> \
<li class="edu-member-box" v-show="mode == \'camera\'"> \
<div class="edu-member-img" > \
<video id="localVideo" style=" margin: 0 auto; width: 100%; height: 100%;" muted autoplay playinline></video> \
</div> \
</li> \
\
<li class="edu-member-box" v-for="(item, index) in members" :key="index"> \
<!-- 互动人员图片 start --> \
<div class="edu-member-img" :id="\'video_\'+(item.id)"> \
<img :id="\'img_\'+(item.id)" v-show="item.reqeust" srcset="./assets/css/img/default.png 1x, ./assets/css/img/[email protected] 2x" src="./assets/css/img/default.png" alt="default"> \
<video :id="\'v_\'+(item.id)" style=" margin: 0 auto; width: 100%; height: 100%;" autoplay playsinline></video>\
</div> \
</div> \
<!-- 互动人员图片 end --> \
<!-- 互动信息 start --> \
<div class="edu-member-body"> \
<div class="edu-member-body-info"> \
<span class="edu-member-name">{{ nameMap[item.name] || item.name}}</span> \
</div> \
</div> \
</li> \
\
<li class="edu-member-box" v-for="(item, index) in requestMembers" :key="index"> \
Expand Down Expand Up @@ -858,4 +869,4 @@ var MainView = {
this.stopRenderMemberList();
clearInterval(this.heartBeatTask);
}
};
};
13 changes: 8 additions & 5 deletions component/report.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,22 +774,25 @@ Report.prototype.send = function(opts){
if( !dev_id ){
dev_id = uuid()
store.set('trtc_dev_id',dev_id )
this.send({
event:1205
})
}

var sendData = JSON.stringify({
dev_id: dev_id , //dev_id String 设备唯一标识
dev_type: navigator.userAgent , //dev_type String 浏览器类型
sys_version: '' , //sys_version String 浏览器版本号
dev_type: navigator.platform , //dev_type String 浏览器类型
sys_version: navigator.userAgent , //sys_version String 浏览器版本号
bussiness: 'trtc' , //bussiness String 业务标识(固定为trtc)
client_ip: '' , //client_ip String 设备ip地址
platform: navigator.platform, //platform String 平台类型
sdkappid: global.sdkappid || null, //sdkappid String 应用标识
platform: "web", //platform String 平台类型
sdkappid: String(global.sdkappid) || null, //sdkappid String 应用标识
net_type: '' , //net_type String 网络类型(Wifi/4G/3G等)
type: opts.type || global.type || 'event' , //type String 数据类型(日志为log,事件为event)
version: "2.4.0" , //version String sdk版本号
event: opts.event || null, //event String 事件id
room_id: opts.room_id || global.room_id || null, //room_id int 房间号
event_time: + new Date() , //event_time int 事件持续时间(单位为毫秒)
event_time: 0, //event_time int 事件持续时间(单位为毫秒)
err_code: opts.err_code || 0, //err_code int 事件错误码(0表示成功)
err_info: opts.err_info || "", //err_info String 错误描述信息
ext: opts.ext || null , //ext String 扩展字段(一般为补充信息)
Expand Down
8 changes: 8 additions & 0 deletions component/sketchpad.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,18 @@ var Sketchpad = {
event: [{
type: 'mousedown',
fn: function (event) {
if(!self.canDraw) { //学生角色
self.$toast.center('您的角色是学生,只能观看白板,无法操作,如需体验教师角色,请自己创建房间');
}
self.toggleToolName = null;
}
}]

});

if(!self.canDraw) { //学生角色
self.$toast.center('您的角色是学生,只能观看白板,无法操作,如需体验教师角色,请自己创建房间');
}
},

getCurrentBoard() {
Expand Down
18 changes: 4 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<router-view></router-view>
</div>

<script type="text/javascript" src="./component/report.min.js" charset="utf-8"></script>
<script type="text/javascript" src="./report.min.js" charset="utf-8"></script>
<script>
var trtc_report = new trtcReport({
sdkappid: 1400037025
Expand All @@ -80,24 +80,14 @@
<script type="text/javascript" src="./component/im.js" charset="utf-8"></script>
<script src="https://sqimg.qq.com/expert_qq/webrtc/2.2/WebRTCAPI.min.js"></script>
<script type="text/javascript" src="./component/banner.js" charset="utf-8"></script>
<script type="text/javascript" src="./component/sketchpad.js" charset="utf-8"></script>
<script type="text/javascript" src="./component/sketchpad.js?v=20180518" charset="utf-8"></script>
<script type="text/javascript" src="./component/courselist.js" charset="utf-8"></script>
<script type="text/javascript" src="./component/createcourse.js" charset="utf-8"></script>
<script type="text/javascript" src="./component/joinclass.js" charset="utf-8"></script>
<script type="text/javascript" src="./component/mainwindow.js" charset="utf-8"></script>
<script type="text/javascript" src="./component/app.js" charset="utf-8"></script>
<script type="text/javascript" src="./component/app.js?v=20180518" charset="utf-8"></script>

<script>
var _mtac = {"senseHash":0};
(function() {
var mta = document.createElement("script");
mta.src = "//pingjs.qq.com/h5/stats.js";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "500538821");
mta.setAttribute("cid", "500538834");
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(mta, s);
})();
</script>

</body>
</html>
1 change: 1 addition & 0 deletions third/cos-js-sdk-v5.min.js

Large diffs are not rendered by default.

0 comments on commit ac5b42d

Please sign in to comment.