|
|
@@ -1824,12 +1824,11 @@ export struct LocalMusic {
|
|
|
await table.saveOrUpdateWebDavItem(cloneItem);
|
|
|
}
|
|
|
|
|
|
- onPageHide(): void {
|
|
|
+ onPageHide() {
|
|
|
this.knockController?.immersiveDisableListening();
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
@State isFirstStartPlay: boolean = false
|
|
|
|
|
|
private async startFileDeletionWatcher(): Promise<void> {
|
|
|
@@ -10616,10 +10615,17 @@ export struct LocalMusic {
|
|
|
@State timer: number = 0
|
|
|
@State rotateAngle: number = 0
|
|
|
@State isRotationRunning: boolean = false // 旋转动画是否正在运行
|
|
|
+ @StorageProp('isPageVisible') @Watch('onPageVisibilityChange') isPageVisible: boolean = true // 页面可见性标志
|
|
|
+
|
|
|
+ // 页面可见性变化回调
|
|
|
+ onPageVisibilityChange() {
|
|
|
+ // 当页面可见性改变时,重新启动/停止旋转动画
|
|
|
+ this.animationRoFun()
|
|
|
+ }
|
|
|
|
|
|
//封面旋转动画
|
|
|
animationRoFun() {
|
|
|
- if (this.isPlaying && !this.isCoverRectangle) {
|
|
|
+ if (this.isPlaying && !this.isCoverRectangle && this.isPageVisible) {
|
|
|
// 启动旋转动画
|
|
|
if (!this.isRotationRunning) {
|
|
|
this.isRotationRunning = true
|
|
|
@@ -11538,7 +11544,7 @@ export struct LocalMusic {
|
|
|
.visibility(this.isCoverOpacity() || this.isCoverRectangle ? Visibility.None : Visibility.Visible)
|
|
|
.borderRadius('100%')
|
|
|
.align(Alignment.Center)
|
|
|
- .clip(true)// .rotate({ x: 0, y: 0, z: 1, angle: this.rotateAngle })
|
|
|
+ .clip(true)
|
|
|
.rotate({
|
|
|
angle: this.rotateAngle,
|
|
|
centerX: "50%",
|
|
|
@@ -14163,6 +14169,8 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
|
private async play(url: string,startOffset?:number) {
|
|
|
+ this.lyricController.setLyric(null)
|
|
|
+ this.lyricControllerSingle.setLyric(null)
|
|
|
this.isShowBgLiuGUANG = PreferencesUtil.getBooleanSync('isShowBgLiuGUANG', false)
|
|
|
console.info('onecold this.url 1= '+url)
|
|
|
if(!url.toLowerCase().startsWith('http')){
|