Commit 761d6a0b50e0568997c67b73a70c2d1bddbfadc1
1 parent
e2ab3b5f
Revert "fix audio bug"
This reverts commit e2ab3b5f.
Showing
1 changed file
with
19 additions
and
10 deletions
src/gxb-ide/Dir.js
| @@ -624,17 +624,26 @@ | @@ -624,17 +624,26 @@ | ||
| 624 | } | 624 | } |
| 625 | console.log("https://gxb-file.oss-cn-beijing.aliyuncs.com") | 625 | console.log("https://gxb-file.oss-cn-beijing.aliyuncs.com") |
| 626 | console.log(audioUrl) | 626 | console.log(audioUrl) |
| 627 | - AudioPlayer(audioUrl) | ||
| 628 | - var role = getQuery('role'); | ||
| 629 | - if (role == 0) { | ||
| 630 | - if(!isAndroid){ | ||
| 631 | - $.AudioPlayer.play() | ||
| 632 | - }else{ | ||
| 633 | - playTimes++ | 627 | + |
| 628 | + $.ajax({ | ||
| 629 | + type: "get", | ||
| 630 | + url: "https://gxb-file.oss-cn-beijing.aliyuncs.com" + audioUrl, | ||
| 631 | + success: function(res) { | ||
| 632 | + console.log('res============') | ||
| 633 | + console.log(res) | ||
| 634 | + AudioPlayer(audioUrl) | ||
| 635 | + var role = getQuery('role'); | ||
| 636 | + if (role == 0) { | ||
| 637 | + if(!isAndroid){ | ||
| 638 | + $.AudioPlayer.play() | ||
| 639 | + }else{ | ||
| 640 | + playTimes++ | ||
| 641 | + } | ||
| 642 | + }else{ | ||
| 643 | + CodingEditer.playCoding(); | ||
| 644 | + } | ||
| 634 | } | 645 | } |
| 635 | - }else{ | ||
| 636 | - CodingEditer.playCoding(); | ||
| 637 | - } | 646 | + }) |
| 638 | }, | 647 | }, |
| 639 | error: function(error) { | 648 | error: function(error) { |
| 640 | console.log(error) | 649 | console.log(error) |