|
@@ -886,9 +886,7 @@ Manage.prototype.dealURL = function(src, type){
|
|
|
if(index>-1){
|
|
|
var wholeOldPrefix = src.slice(0, index+oldPrefix.length);
|
|
|
return src.replace(wholeOldPrefix, settings.localPrefix)
|
|
|
- }
|
|
|
-
|
|
|
- console.error("没有找到合适的本地链接")
|
|
|
+ }else console.error("没有找到合适的本地链接")
|
|
|
return src
|
|
|
}else{
|
|
|
//add https://
|
|
@@ -1648,7 +1646,7 @@ var SoundManager = {//暂不支持同时播放
|
|
|
if(object.audio && object.src){
|
|
|
object.audio.load(); // iOS 9 还需要额外的 load 一下, 否则直接 play 无效 *///https://www.cnblogs.com/interdrp/p/4211883.html 部分资料
|
|
|
object.audio.play();
|
|
|
- object.callback && object.callback(true)
|
|
|
+ object.audio.paused || object.callback && object.callback(true)
|
|
|
Log(name + ' 播放 ' )
|
|
|
}
|
|
|
|
|
@@ -1733,8 +1731,11 @@ var SoundManager = {//暂不支持同时播放
|
|
|
|
|
|
|
|
|
let play = function(){
|
|
|
- if(this.currentAudio && this.currentAudio.audio && this.currentAudio.src){
|
|
|
- this.currentAudio.audio.play()
|
|
|
+ if (this.currentAudio && this.currentAudio.audio && this.currentAudio.src && this.currentAudio.audio.paused ) {
|
|
|
+ this.currentAudio.audio.play() //一般触屏了都会播放成功,就不识别paused了
|
|
|
+
|
|
|
+ this.currentAudio.callback && this.currentAudio.callback(true)
|
|
|
+
|
|
|
Log(`${this.currentAudio.name} 自动播放成功`) //即使设置src在这之后好像也能成功播放
|
|
|
}else{
|
|
|
|