Commit ecfe6ff0cbcbb25e12ab86c56766cf91ad289906
1 parent
81285e22
test
Showing
2 changed files
with
7 additions
and
3 deletions
src/gxb-ide/Dir.js
| @@ -620,8 +620,12 @@ | @@ -620,8 +620,12 @@ | ||
| 620 | if (role == 0) { | 620 | if (role == 0) { |
| 621 | if (playTimes === 0) { | 621 | if (playTimes === 0) { |
| 622 | // 请求玩立刻执行 | 622 | // 请求玩立刻执行 |
| 623 | - alert('play11 -----------123 ' + playTimes) | ||
| 624 | - $.AudioPlayer.play() | 623 | + var u = navigator.userAgent; |
| 624 | + var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 | ||
| 625 | + var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 | ||
| 626 | + if(!isAndroid){ | ||
| 627 | + $.AudioPlayer.play() | ||
| 628 | + } | ||
| 625 | } | 629 | } |
| 626 | }else{ | 630 | }else{ |
| 627 | CodingEditer.playCoding(); | 631 | CodingEditer.playCoding(); |
src/js/audioPlayer/jQuery.AudioPlayer.js
| @@ -251,7 +251,7 @@ | @@ -251,7 +251,7 @@ | ||
| 251 | if(typeof _this.options.canplayCallback == 'function'){ | 251 | if(typeof _this.options.canplayCallback == 'function'){ |
| 252 | _this.options.canplayCallback({'status': true}); | 252 | _this.options.canplayCallback({'status': true}); |
| 253 | } | 253 | } |
| 254 | - alert('readyState--------------'+_this.elements.audioDom.readyState) | 254 | + // alert('readyState--------------'+_this.elements.audioDom.readyState) |
| 255 | // if (_this.elements.audioDom.readyState == 4) { | 255 | // if (_this.elements.audioDom.readyState == 4) { |
| 256 | // var duration = Math.round(_this.elements.audioDom.duration); | 256 | // var duration = Math.round(_this.elements.audioDom.duration); |
| 257 | // var minutes = Math.floor(duration / 60); | 257 | // var minutes = Math.floor(duration / 60); |