Commit d2eba3a2c8f76456aef8292e43a8d221d1e08e30

Authored by ykxie
1 parent bd5df8b3

fix 学生录制问题

Showing 1 changed file with 7 additions and 4 deletions
src/js/gb.js
... ... @@ -2357,13 +2357,15 @@ $(function() {
2357 2357 var runStatus = $("#CompileBtn").data('run');
2358 2358 if (runStatus == 1) {
2359 2359 Hourglass.pauseTimer(); // 暂停计时器
2360   - recorder.pause(); // 音频暂停
  2360 + if (_role == 0) {
  2361 + recorder.pause(); // 音频暂停
  2362 + }
2361 2363 }
2362 2364 $("#CompileBtn").data('run', 0);
2363 2365 $('.compile-loading').show();
2364 2366 // 暂停录制
2365 2367 var pauseState = $('#pause').data('pause');
2366   - if (pauseState == 1 && _role == 0) {
  2368 + if (pauseState == 1) {
2367 2369 GBCodePlayBack.record_pause_time = new Date().getTime(); // 暂停的时间
2368 2370 var recordobj = {
2369 2371 intervaltime: GBCodePlayBack.record_pause_time - GBCodePlayBack.record_startime,
... ... @@ -3053,8 +3055,9 @@ $(function() {
3053 3055 $('.pause-shodow').removeClass('show').addClass('hidden');
3054 3056  
3055 3057 $('#pause').data('pause', '1');
3056   -
3057   - recorder.pause(); // 继续录制
  3058 + if (_role == 0) {
  3059 + recorder.pause(); // 继续录制
  3060 + }
3058 3061 }
3059 3062  
3060 3063 function playEnd() {
... ...