Commit 34bcc2b54543ddfa6cb587e1da75b99697533adb

Authored by 张光辉
1 parent 3fd5966f

放开学生端的录音功能

Showing 1 changed file with 12 additions and 12 deletions

Too many changes to show.

To preserve performance only 1 of 3 files are displayed.

dist/gxb-ide/ToolBox.js
@@ -109,9 +109,9 @@ @@ -109,9 +109,9 @@
109 var _this = this; 109 var _this = this;
110 _this.readOnly(1) 110 _this.readOnly(1)
111 // 老师端录制停止录音 111 // 老师端录制停止录音
112 - if (_this.options.role == 0) {  
113 - _this.stopAudio();  
114 - } 112 + // if (_this.options.role == 0) {
  113 + _this.stopAudio(); //学生和老师一样,都进行录音
  114 + // }
115 // 回调 115 // 回调
116 if (typeof _this.options.stopCallback == 'function') { 116 if (typeof _this.options.stopCallback == 'function') {
117 console.log('stopCallback'); 117 console.log('stopCallback');
@@ -161,15 +161,15 @@ @@ -161,15 +161,15 @@
161 }, 161 },
162 initRecording: function(){ 162 initRecording: function(){
163 var _this = this; 163 var _this = this;
164 - if (_this.options.role == 0) { 164 + // if (_this.options.role == 0) {
165 HZRecorder.get(function(rec) { 165 HZRecorder.get(function(rec) {
166 recorder = rec; 166 recorder = rec;
167 recorder.start(); 167 recorder.start();
168 CodingEditer.initRecodesValue() 168 CodingEditer.initRecodesValue()
169 }); 169 });
170 - }else{  
171 - CodingEditer.initRecodesValue()  
172 - } 170 + // }else{
  171 + // CodingEditer.initRecodesValue()
  172 + // }
173 }, 173 },
174 stopAudio: function(){ 174 stopAudio: function(){
175 recorder.stop(); 175 recorder.stop();
@@ -200,11 +200,11 @@ @@ -200,11 +200,11 @@
200 $('.upload-tip').show(); 200 $('.upload-tip').show();
201 201
202 var role = getQuery('role'); 202 var role = getQuery('role');
203 - if (role == 0) {  
204 - recorder.upload();  
205 - }else{  
206 - _this.saveCode();  
207 - } 203 + // if (role == 0) {
  204 + recorder.upload(); //学生和老师都进行音频保存
  205 + // }else{
  206 + // _this.saveCode();
  207 + // }
208 }, 208 },
209 saveCode: function(){ 209 saveCode: function(){
210 var _this = this; 210 var _this = this;