|
@@ -511,6 +511,7 @@ export struct LocalMusic {
|
|
|
this.pause();
|
|
this.pause();
|
|
|
} else if (event.hintType === InterruptHintType.INTERRUPT_HINT_RESUME) {
|
|
} else if (event.hintType === InterruptHintType.INTERRUPT_HINT_RESUME) {
|
|
|
console.info(`onecold audioInterrupt startPlayOrResumePlay: ${JSON.stringify(event)}`)
|
|
console.info(`onecold audioInterrupt startPlayOrResumePlay: ${JSON.stringify(event)}`)
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 514')
|
|
|
this.startPlayOrResumePlay();
|
|
this.startPlayOrResumePlay();
|
|
|
} else if (event.hintType === InterruptHintType.INTERRUPT_HINT_STOP) {
|
|
} else if (event.hintType === InterruptHintType.INTERRUPT_HINT_STOP) {
|
|
|
this.stop();
|
|
this.stop();
|
|
@@ -753,6 +754,7 @@ export struct LocalMusic {
|
|
|
//查询完毕在启动是否自动播放
|
|
//查询完毕在启动是否自动播放
|
|
|
if (this.isStartAutoPlay&&this.isCanAuto) {
|
|
if (this.isStartAutoPlay&&this.isCanAuto) {
|
|
|
this.isCanAuto = false
|
|
this.isCanAuto = false
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 757')
|
|
|
this.startPlayOrResumePlay()
|
|
this.startPlayOrResumePlay()
|
|
|
}
|
|
}
|
|
|
PreferencesUtil.putSync('albumCount', this.albumList.length)
|
|
PreferencesUtil.putSync('albumCount', this.albumList.length)
|
|
@@ -1994,6 +1996,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
//空格键 Space key controls pause/play
|
|
//空格键 Space key controls pause/play
|
|
|
if (event.keyCode === KeyCode.KEYCODE_SPACE) {
|
|
if (event.keyCode === KeyCode.KEYCODE_SPACE) {
|
|
|
|
|
+ console.info('onecold playOrPause 1999')
|
|
|
this.playOrPause()
|
|
this.playOrPause()
|
|
|
}
|
|
}
|
|
|
// Right-click to fast forward
|
|
// Right-click to fast forward
|
|
@@ -4542,6 +4545,7 @@ export struct LocalMusic {
|
|
|
LogUtil.info('this.currentSong.duration =' + this.currentSong.duration)
|
|
LogUtil.info('this.currentSong.duration =' + this.currentSong.duration)
|
|
|
LogUtil.info('this.currentSong.sampleRate =' + this.currentSong.sampleRate)
|
|
LogUtil.info('this.currentSong.sampleRate =' + this.currentSong.sampleRate)
|
|
|
LogUtil.info('this.currentSongmimeType =' + this.currentSong.mimeType)
|
|
LogUtil.info('this.currentSongmimeType =' + this.currentSong.mimeType)
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 4547')
|
|
|
this.startPlayOrResumePlay()
|
|
this.startPlayOrResumePlay()
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
@@ -4635,6 +4639,7 @@ export struct LocalMusic {
|
|
|
.fillColor(this.themeColor)
|
|
.fillColor(this.themeColor)
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
if (ArrayUtil.isNotEmpty(this.songList)) {
|
|
if (ArrayUtil.isNotEmpty(this.songList)) {
|
|
|
|
|
+ console.info('onecold playOrPause 4642')
|
|
|
this.playOrPause()
|
|
this.playOrPause()
|
|
|
} else {
|
|
} else {
|
|
|
ToastUtil.showToast('当前播放列表为空,请先导入音乐。')
|
|
ToastUtil.showToast('当前播放列表为空,请先导入音乐。')
|
|
@@ -6685,6 +6690,7 @@ export struct LocalMusic {
|
|
|
if (this.CONTROL_PlayStatus === PlayStatus.PLAY) {
|
|
if (this.CONTROL_PlayStatus === PlayStatus.PLAY) {
|
|
|
ToastUtil.showToast('已暂停')
|
|
ToastUtil.showToast('已暂停')
|
|
|
}
|
|
}
|
|
|
|
|
+ console.info('onecold playOrPause 6693')
|
|
|
this.playOrPause()
|
|
this.playOrPause()
|
|
|
|
|
|
|
|
})
|
|
})
|
|
@@ -6738,6 +6744,7 @@ export struct LocalMusic {
|
|
|
.visibility(Visibility.None)
|
|
.visibility(Visibility.None)
|
|
|
.borderStyle(BorderStyle.Dashed)// .hitTestBehavior(HitTestMode.Transparent)
|
|
.borderStyle(BorderStyle.Dashed)// .hitTestBehavior(HitTestMode.Transparent)
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 6744')
|
|
|
this.startPlayOrResumePlay();
|
|
this.startPlayOrResumePlay();
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -7520,6 +7527,7 @@ export struct LocalMusic {
|
|
|
seekUIStyle: "listItem", // 滑动定位样式(seekLine传统样式,listItem类似抖音汽水音乐样式)
|
|
seekUIStyle: "listItem", // 滑动定位样式(seekLine传统样式,listItem类似抖音汽水音乐样式)
|
|
|
onSeekAction: (position: number) => { // 滑动歌词触发seek定位回调
|
|
onSeekAction: (position: number) => { // 滑动歌词触发seek定位回调
|
|
|
if (!this.isPlaying) {
|
|
if (!this.isPlaying) {
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 7527')
|
|
|
this.startPlayOrResumePlay()
|
|
this.startPlayOrResumePlay()
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
@@ -7640,9 +7648,8 @@ export struct LocalMusic {
|
|
|
.fillColor(Color.White)
|
|
.fillColor(Color.White)
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
.onClick(async () => {
|
|
.onClick(async () => {
|
|
|
|
|
+ console.info('onecold playOrPause 7651')
|
|
|
this.playOrPause()
|
|
this.playOrPause()
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -9861,6 +9868,7 @@ export struct LocalMusic {
|
|
|
if (status === 0) {
|
|
if (status === 0) {
|
|
|
this.pause();
|
|
this.pause();
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 9869')
|
|
|
this.startPlayOrResumePlay();
|
|
this.startPlayOrResumePlay();
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
@@ -10583,6 +10591,7 @@ export struct LocalMusic {
|
|
|
this.playNext()
|
|
this.playNext()
|
|
|
} else if (this.playType == 1) { //1:单片重复播放
|
|
} else if (this.playType == 1) { //1:单片重复播放
|
|
|
this.CONTROL_PlayStatus = PlayStatus.INIT
|
|
this.CONTROL_PlayStatus = PlayStatus.INIT
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 10592')
|
|
|
that.startPlayOrResumePlay();
|
|
that.startPlayOrResumePlay();
|
|
|
|
|
|
|
|
} else if (this.playType == 2) { //2:正常播放,单曲播完
|
|
} else if (this.playType == 2) { //2:正常播放,单曲播完
|
|
@@ -10633,7 +10642,7 @@ export struct LocalMusic {
|
|
|
let mOnSeekCompleteListener: OnSeekCompleteListener = {
|
|
let mOnSeekCompleteListener: OnSeekCompleteListener = {
|
|
|
onSeekComplete: () => {
|
|
onSeekComplete: () => {
|
|
|
LogUtils.getInstance().LOGI("OnSeekCompleteListener-->go");
|
|
LogUtils.getInstance().LOGI("OnSeekCompleteListener-->go");
|
|
|
-
|
|
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 10643')
|
|
|
that.startPlayOrResumePlay();
|
|
that.startPlayOrResumePlay();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -11038,10 +11047,12 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private sessionPlayCallback = (): void => {
|
|
private sessionPlayCallback = (): void => {
|
|
|
|
|
+ console.info('onecold playOrPause 11050')
|
|
|
this.playOrPause()
|
|
this.playOrPause()
|
|
|
};
|
|
};
|
|
|
private sessionPauseCallback = (): void => {
|
|
private sessionPauseCallback = (): void => {
|
|
|
- this.playOrPause()
|
|
|
|
|
|
|
+ console.info('onecold playOrPause 11054')
|
|
|
|
|
+ this.pause()
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
private playOrPause() {
|
|
private playOrPause() {
|
|
@@ -11054,6 +11065,7 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 11064')
|
|
|
this.startPlayOrResumePlay();
|
|
this.startPlayOrResumePlay();
|
|
|
this.playChange()
|
|
this.playChange()
|
|
|
|
|
|
|
@@ -11216,6 +11228,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.mIjkMediaPlayer.seekTo(value);
|
|
this.mIjkMediaPlayer.seekTo(value);
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 11227')
|
|
|
// this.startPlayOrResumePlay()
|
|
// this.startPlayOrResumePlay()
|
|
|
// 在这里恢复计时器状态
|
|
// 在这里恢复计时器状态
|
|
|
this.setProgress()
|
|
this.setProgress()
|
|
@@ -11301,11 +11314,13 @@ export struct LocalMusic {
|
|
|
}, () => {
|
|
}, () => {
|
|
|
this.opacityValueImage = 1;
|
|
this.opacityValueImage = 1;
|
|
|
this.scaleValueImage = 1 // 图标恢复到原始大小
|
|
this.scaleValueImage = 1 // 图标恢复到原始大小
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 11313')
|
|
|
this.startPlayOrResumePlay()
|
|
this.startPlayOrResumePlay()
|
|
|
});
|
|
});
|
|
|
}, 500);
|
|
}, 500);
|
|
|
}else{
|
|
}else{
|
|
|
this.cover = this.songList[this.curIndex].pixelMapPath
|
|
this.cover = this.songList[this.curIndex].pixelMapPath
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 11319')
|
|
|
this.startPlayOrResumePlay()
|
|
this.startPlayOrResumePlay()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -11420,6 +11435,7 @@ export struct LocalMusic {
|
|
|
this.cover = prevSong.pixelMapPath
|
|
this.cover = prevSong.pixelMapPath
|
|
|
this.artist = prevSong.artist
|
|
this.artist = prevSong.artist
|
|
|
this.name = prevSong.name;
|
|
this.name = prevSong.name;
|
|
|
|
|
+ console.info('onecold startPlayOrResumePlay 11434')
|
|
|
this.startPlayOrResumePlay();
|
|
this.startPlayOrResumePlay();
|
|
|
} else {
|
|
} else {
|
|
|
// 如果历史记录不足两首,可根据需求处理,这里简单按普通逻辑处理
|
|
// 如果历史记录不足两首,可根据需求处理,这里简单按普通逻辑处理
|