Commit a33ca933cb40c091a9c51964732810dd7724ae21
1 parent
2c32cfe9
fix audio
Showing
2 changed files
with
13 additions
and
24 deletions
src/gxb-ide/CodingEditer.js
| ... | ... | @@ -292,8 +292,6 @@ |
| 292 | 292 | // 生成 CodeMirror |
| 293 | 293 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 294 | 294 | var modeNameItem = modeName[i] || modeName[0]; |
| 295 | - console.log('00000----------------------00000000') | |
| 296 | - console.log(modeNameItem) | |
| 297 | 295 | // 判断是否是播放页面,如果是则不显示录制区相关dom |
| 298 | 296 | if(!Dir.isReplayPage){ |
| 299 | 297 | treeLinkEditor[i].CodeMirrorRecord = CodeMirror.fromTextArea($('#' + treeLinkEditor[i].record)[0], { |
| ... | ... | @@ -310,7 +308,6 @@ |
| 310 | 308 | buildRecords(Dir.getCurrentEditor(em.getWrapperElement().getAttribute('id')), changeobj); |
| 311 | 309 | } |
| 312 | 310 | if (CodingEditer.isWeb) { |
| 313 | - console.log("++++++++++") | |
| 314 | 311 | CodingEditer.webResult(_pauseValue[0], _pauseValue[1], _pauseValue[2]) |
| 315 | 312 | } |
| 316 | 313 | }, |
| ... | ... | @@ -432,9 +429,6 @@ |
| 432 | 429 | record.trigger = 1; //标记已运行 |
| 433 | 430 | record.playTime = new Date().getTime(); // 播放开始时间 |
| 434 | 431 | |
| 435 | - console.log("==================++======================"); | |
| 436 | - console.log(record.runtimeArgus); | |
| 437 | - | |
| 438 | 432 | if (record.code == 0 || record.code == 1) { |
| 439 | 433 | var iterm = new Iterm(); |
| 440 | 434 | var resultData = { |
| ... | ... | @@ -464,6 +458,7 @@ |
| 464 | 458 | } |
| 465 | 459 | |
| 466 | 460 | CodingEditer.triggertotal = 0; |
| 461 | + CodingEditer.firstPlay = 1; | |
| 467 | 462 | |
| 468 | 463 | if (_role == 1) { |
| 469 | 464 | $('.play-code').show(); | ... | ... |
src/gxb-ide/Dir.js
| ... | ... | @@ -653,32 +653,26 @@ |
| 653 | 653 | debuggers: false, |
| 654 | 654 | allowSeek: false, |
| 655 | 655 | canplayCallback: function(res){ |
| 656 | - // alert('res.status ----------- ' + res.status) | |
| 657 | - if (res.status == true) { | |
| 658 | - // alert('canplayCallback ----------- ' + playTimes) | |
| 659 | - CodingEditer.playCoding(); | |
| 660 | - } | |
| 656 | + // if (res.status == true) { | |
| 657 | + // CodingEditer.playCoding(); | |
| 658 | + // alert('canplayCallback可以播放 ----------- ' + playTimes) | |
| 659 | + // } | |
| 661 | 660 | }, |
| 662 | 661 | onwaitingCallback: function(){ |
| 663 | - if (playTimes != 0) { | |
| 664 | - // alert('onwaitingCallback ----------- ' + playTimes) | |
| 665 | - CodingEditer.audioTime = parseInt(player.elements.audioDom.currentTime*1000); | |
| 666 | - CodingEditer.pauseCode(); | |
| 667 | - }else{ | |
| 668 | - playTimes++ | |
| 669 | - } | |
| 662 | + // alert('onwaitingCallback ----------- ' + playTimes) | |
| 663 | + playTimes++ | |
| 670 | 664 | }, |
| 671 | 665 | playCallback: function() { // 播放 |
| 672 | - // alert('播放 ----------- ' + playTimes) | |
| 673 | - if (playTimes != 0) { | |
| 674 | - // alert('playCallback ----------- ' + playTimes) | |
| 675 | - CodingEditer.playCoding(); | |
| 676 | - } | |
| 666 | + // if (playTimes != 0) { | |
| 667 | + // alert('playCallback播放 ----------- ' + playTimes) | |
| 668 | + // CodingEditer.playCoding(); | |
| 669 | + // } | |
| 670 | + CodingEditer.playCoding(); | |
| 677 | 671 | }, |
| 678 | 672 | pauseCallback: function() { // 暂停 |
| 679 | - // alert('playCallback ----------- ' + playTimes) | |
| 680 | 673 | CodingEditer.audioTime = parseInt(player.elements.audioDom.currentTime*1000); |
| 681 | 674 | CodingEditer.pauseCode(); |
| 675 | + // alert('pauseCallback暂停 ----------- ' + playTimes) | |
| 682 | 676 | }, |
| 683 | 677 | seekedCallback: function() { // 拖拽 |
| 684 | 678 | }, | ... | ... |