Commit 22200a15716ba459d2dec2987d5684f695231fd8
1 parent
d3a34dc1
fix play
Showing
5 changed files
with
10 additions
and
10 deletions
dist/gxb-ide/CodingEditer.js
| ... | ... | @@ -102,8 +102,10 @@ |
| 102 | 102 | Dir.showEdite({'treeNode': CodingEditer.treeSelectNode}); |
| 103 | 103 | }else{ |
| 104 | 104 | CodingEditer.resetCodeMirrorValue(1); |
| 105 | - var iterm = new Iterm(); | |
| 106 | - iterm.compileResult() | |
| 105 | + // alert('new Iterm()------' + CodingEditer.firstPlay) | |
| 106 | + // var iterm = new Iterm(); | |
| 107 | + // alert('iterm ============' + CodingEditer.firstPlay) | |
| 108 | + // iterm.compileResult() | |
| 107 | 109 | } |
| 108 | 110 | |
| 109 | 111 | // CodingEditer.resetCodeMirrorValue(1); | ... | ... |
dist/gxb-ide/Dir.js
| ... | ... | @@ -619,6 +619,7 @@ |
| 619 | 619 | |
| 620 | 620 | initTrigger(coderecords) |
| 621 | 621 | |
| 622 | + // fix js执行顺序playTimes没有值 | |
| 622 | 623 | if(isAndroid){ |
| 623 | 624 | playTimes++ |
| 624 | 625 | } |
| ... | ... | @@ -628,12 +629,11 @@ |
| 628 | 629 | var role = getQuery('role'); |
| 629 | 630 | if (role == 0) { |
| 630 | 631 | if(!isAndroid){ |
| 631 | - // $.AudioPlayer.play() | |
| 632 | + $.AudioPlayer.play() | |
| 632 | 633 | }else{ |
| 633 | 634 | playTimes++ |
| 634 | 635 | } |
| 635 | 636 | }else{ |
| 636 | - // alert('canplay !isAndroid ----------- ' + playTimes) | |
| 637 | 637 | CodingEditer.playCoding(); |
| 638 | 638 | } |
| 639 | 639 | |
| ... | ... | @@ -668,8 +668,7 @@ |
| 668 | 668 | allowSeek: false, |
| 669 | 669 | canplayCallback: function(res){ |
| 670 | 670 | if (res.status == true && playTimes === 0 && !isAndroid) { |
| 671 | - alert('canplay !isAndroid ----------- ' + playTimes) | |
| 672 | - // CodingEditer.playCoding(); | |
| 671 | + CodingEditer.playCoding(); | |
| 673 | 672 | playTimes++ |
| 674 | 673 | // alert('canplay !isAndroid ----------- ' + playTimes) |
| 675 | 674 | } |
| ... | ... | @@ -679,7 +678,6 @@ |
| 679 | 678 | // alert('onwaitingCallback ----------- ' + playTimes) |
| 680 | 679 | }, |
| 681 | 680 | playCallback: function() { // 播放 |
| 682 | - | |
| 683 | 681 | if (playTimes != 0) { |
| 684 | 682 | CodingEditer.playCoding(); |
| 685 | 683 | // alert('playCoding可以播放 ----------- ' + playTimes) | ... | ... |
dist/gxb-ide/Iterm.js
dist/js/audioPlayer/jQuery.AudioPlayer.js
| ... | ... | @@ -251,7 +251,7 @@ |
| 251 | 251 | if(typeof _this.options.canplayCallback == 'function'){ |
| 252 | 252 | _this.options.canplayCallback({'status': true}); |
| 253 | 253 | } |
| 254 | - | |
| 254 | + // alert('readyState--------------'+_this.elements.audioDom.readyState) | |
| 255 | 255 | // if (_this.elements.audioDom.readyState == 4) { |
| 256 | 256 | // var duration = Math.round(_this.elements.audioDom.duration); |
| 257 | 257 | // var minutes = Math.floor(duration / 60); | ... | ... |
src/gxb-ide/Iterm.js