|
@@ -299,6 +299,7 @@ const ITEM_HEIGHT_BIG: number = 78; // 列表项大高度
|
|
|
@Preview
|
|
@Preview
|
|
|
@Component
|
|
@Component
|
|
|
export struct LocalMusic {
|
|
export struct LocalMusic {
|
|
|
|
|
+ @StorageProp("EnablePointLight") enablePointLight: boolean = true
|
|
|
@State showSimple: boolean = true//开启沉浸模式
|
|
@State showSimple: boolean = true//开启沉浸模式
|
|
|
@State isPaging: boolean = true;//是否分页加载机制
|
|
@State isPaging: boolean = true;//是否分页加载机制
|
|
|
@State isCoverRectangle: boolean = true;
|
|
@State isCoverRectangle: boolean = true;
|
|
@@ -1071,6 +1072,7 @@ export struct LocalMusic {
|
|
|
context.getApplicationContext().setColorMode(colorMode)
|
|
context.getApplicationContext().setColorMode(colorMode)
|
|
|
}
|
|
}
|
|
|
initSetting() {
|
|
initSetting() {
|
|
|
|
|
+ this.enablePointLight = PreferencesUtil.getBooleanSync('enablePointLight', true)
|
|
|
this.showSimple = PreferencesUtil.getBooleanSync('showSimple', true)
|
|
this.showSimple = PreferencesUtil.getBooleanSync('showSimple', true)
|
|
|
this.showZMIndex = PreferencesUtil.getBooleanSync('showZMIndex', false)
|
|
this.showZMIndex = PreferencesUtil.getBooleanSync('showZMIndex', false)
|
|
|
this.autoHideTitle = PreferencesUtil.getBooleanSync('autoHideTitle', true)
|
|
this.autoHideTitle = PreferencesUtil.getBooleanSync('autoHideTitle', true)
|
|
@@ -9834,7 +9836,6 @@ export struct LocalMusic {
|
|
|
private lyricControllerXF: LyricController = new LyricController() //悬浮歌词控制器
|
|
private lyricControllerXF: LyricController = new LyricController() //悬浮歌词控制器
|
|
|
private lyricControllerSingle: LyricController = new LyricController() //播放页单行歌词控制器
|
|
private lyricControllerSingle: LyricController = new LyricController() //播放页单行歌词控制器
|
|
|
private parser = new LyricParser()
|
|
private parser = new LyricParser()
|
|
|
- @State randomColor: string = 'rgb(0,0,0)'
|
|
|
|
|
@State randomShakenX: number = 0
|
|
@State randomShakenX: number = 0
|
|
|
@State randomShakenY: number = 0
|
|
@State randomShakenY: number = 0
|
|
|
@State lyricTextSize: number = 24
|
|
@State lyricTextSize: number = 24
|
|
@@ -10477,9 +10478,8 @@ export struct LocalMusic {
|
|
|
if (this.isPhoneLan()) {
|
|
if (this.isPhoneLan()) {
|
|
|
Column() {
|
|
Column() {
|
|
|
this.playProgressView()
|
|
this.playProgressView()
|
|
|
- // this.playCenterView()
|
|
|
|
|
}
|
|
}
|
|
|
- .margin({ bottom: 30, right: this.currentLyricAlignMode == 0 ? 0 : 30 })
|
|
|
|
|
|
|
+ .margin({ bottom: 34, right: this.currentLyricAlignMode == 0 ? 0 : 30 })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.position({
|
|
.position({
|
|
@@ -10522,129 +10522,133 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
|
|
+ .alignItems(HorizontalAlign.Center)
|
|
|
.position({ bottom: this.isHiCarSmall()?50:(this.isCoverOpacity() ? 55 : 70) }) // 将 固定在底部
|
|
.position({ bottom: this.isHiCarSmall()?50:(this.isCoverOpacity() ? 55 : 70) }) // 将 固定在底部
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Builder
|
|
|
|
|
+ playMenuBuilder(){
|
|
|
|
|
+ Image($r('app.media.menu'))
|
|
|
|
|
+ .width(24)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
+ .bindSheet($$this.isShowMoreView, this.PlayMoreSheet(), {
|
|
|
|
|
+ height: '99%',
|
|
|
|
|
+ preferType:SheetType.CENTER,
|
|
|
|
|
+ dragBar: true,
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ blurStyle: BlurStyle.Thin,
|
|
|
|
|
+ title: { title: $r('app.string.more') },
|
|
|
|
|
+ backgroundColor: Color.Transparent,
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
//播放控制上一首 下一首 暂停和播放
|
|
//播放控制上一首 下一首 暂停和播放
|
|
|
@Builder
|
|
@Builder
|
|
|
playCenterView(){
|
|
playCenterView(){
|
|
|
Row() {
|
|
Row() {
|
|
|
- Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
|
|
- //更多功能
|
|
|
|
|
- Image($r('app.media.menu'))
|
|
|
|
|
- .width(24)
|
|
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
- .bindSheet($$this.isShowMoreView, this.PlayMoreSheet(), {
|
|
|
|
|
- height: '99%',
|
|
|
|
|
- preferType:SheetType.CENTER,
|
|
|
|
|
- dragBar: true,
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- blurStyle: BlurStyle.Thin,
|
|
|
|
|
- title: { title: $r('app.string.more') },
|
|
|
|
|
- backgroundColor: Color.Transparent,
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- .height(45)
|
|
|
|
|
- .width(45)
|
|
|
|
|
- .margin({ left: 5 })
|
|
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
|
|
- .onClick(() => {
|
|
|
|
|
- this.isShowMoreView = !this.isShowMoreView;
|
|
|
|
|
- })
|
|
|
|
|
|
|
|
|
|
- Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
|
|
- Image($r('app.media.ic_previous'))
|
|
|
|
|
- .width(33)
|
|
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
- }
|
|
|
|
|
- .height(45)
|
|
|
|
|
- .width(45)
|
|
|
|
|
- .onClick(async () => {
|
|
|
|
|
- await this.playPrevious()
|
|
|
|
|
|
|
+ PointLightButton({
|
|
|
|
|
+ builder: () => {
|
|
|
|
|
+ this.playMenuBuilder()
|
|
|
|
|
+ },
|
|
|
|
|
+ isPx: false,
|
|
|
|
|
+ builderHeight: 33,
|
|
|
|
|
+ builderWidth: 33,
|
|
|
})
|
|
})
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
|
|
|
|
+ .onClick(async () =>{
|
|
|
|
|
+ this.isShowMoreView = !this.isShowMoreView;
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
|
|
- Stack() {
|
|
|
|
|
- Column() {
|
|
|
|
|
- Image(this.CONTROL_PlayStatus === PlayStatus.PLAY ?
|
|
|
|
|
- (this.isCircleBtn?$r('app.media.hm_pause'):$r('app.media.ic_public_play'))
|
|
|
|
|
- : (this.isCircleBtn?$r('app.media.hm_play2'):$r('app.media.ic_public_pause')))
|
|
|
|
|
- .width(this.isPhoneLan()?45:55)
|
|
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
- .fillColor(Color.White)
|
|
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- // 加载进度圈
|
|
|
|
|
- if (this.isPlayerLoading) {
|
|
|
|
|
- Progress({value:0,total:100,type:ProgressType.Ring })
|
|
|
|
|
- .width(this.isPhoneLan()?48:57)
|
|
|
|
|
- .height(this.isPhoneLan()?48:57)
|
|
|
|
|
- .color(Color.White)
|
|
|
|
|
- .style({ strokeWidth: 5, status: ProgressStatus.LOADING })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .width(this.isPhoneLan()?45:55)
|
|
|
|
|
- .height(this.isPhoneLan()?45:55)
|
|
|
|
|
- }
|
|
|
|
|
- .onClick(async () => {
|
|
|
|
|
- this.playOrPause()
|
|
|
|
|
|
|
+ PointLightButton({
|
|
|
|
|
+ builder: () => {
|
|
|
|
|
+ this.playPreviousBuilder()
|
|
|
|
|
+ },
|
|
|
|
|
+ isPx: false,
|
|
|
|
|
+ builderHeight: 33,
|
|
|
|
|
+ builderWidth: 33,
|
|
|
})
|
|
})
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
|
|
- .layoutWeight(1)
|
|
|
|
|
-
|
|
|
|
|
- // PointLightButton({
|
|
|
|
|
- // builder: () => {
|
|
|
|
|
- // this.PlayOrPauseButton()
|
|
|
|
|
- // },
|
|
|
|
|
- // isPx: true,
|
|
|
|
|
- // builderHeight: 60,
|
|
|
|
|
- // builderWidth: 60,
|
|
|
|
|
- // })
|
|
|
|
|
- // .layoutWeight(1)
|
|
|
|
|
- // .onClick(() =>{
|
|
|
|
|
- // this.playOrPause()
|
|
|
|
|
- // })
|
|
|
|
|
|
|
+ .onClick(async () =>{
|
|
|
|
|
+ await this.playPrevious()
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Button({ type: ButtonType.Circle, stateEffect: true }) {
|
|
|
|
|
- Image($r('app.media.ic_next'))
|
|
|
|
|
- .width(33)
|
|
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
- }
|
|
|
|
|
- .height(45)
|
|
|
|
|
- .width(45)
|
|
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
|
|
- .onClick(async () => {
|
|
|
|
|
- await this.playNext();
|
|
|
|
|
|
|
+ PointLightButton({
|
|
|
|
|
+ builder: () => {
|
|
|
|
|
+ this.PlayOrPauseButton()
|
|
|
|
|
+ },
|
|
|
|
|
+ isPx: false,
|
|
|
|
|
+ builderHeight: this.isPhoneLan()?42:55,
|
|
|
|
|
+ builderWidth: this.isPhoneLan()?42:55,
|
|
|
})
|
|
})
|
|
|
|
|
+ .onClick(() =>{
|
|
|
|
|
+ this.playOrPause()
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ PointLightButton({
|
|
|
|
|
+ builder: () => {
|
|
|
|
|
+ this.playNextBuilder()
|
|
|
|
|
+ },
|
|
|
|
|
+ isPx: false,
|
|
|
|
|
+ builderHeight: 33,
|
|
|
|
|
+ builderWidth: 33,
|
|
|
|
|
+ })
|
|
|
|
|
+ .onClick(async () =>{
|
|
|
|
|
+ await this.playNext()
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
this.playModeButton()
|
|
this.playModeButton()
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
.width('95%')
|
|
.width('95%')
|
|
|
.margin({ bottom:this.isCoverOpacity()?0:15 })
|
|
.margin({ bottom:this.isCoverOpacity()?0:15 })
|
|
|
.justifyContent(FlexAlign.SpaceEvenly)
|
|
.justifyContent(FlexAlign.SpaceEvenly)
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
@Builder
|
|
@Builder
|
|
|
- PlayOrPauseButton(){
|
|
|
|
|
- Image(this.CONTROL_PlayStatus === PlayStatus.PLAY ?
|
|
|
|
|
- (this.isCircleBtn?$r('app.media.hm_pause'):$r('app.media.ic_public_play'))
|
|
|
|
|
- : (this.isCircleBtn?$r('app.media.hm_play2'):$r('app.media.ic_public_pause')))
|
|
|
|
|
- .width(this.isPhoneLan()?45:55)
|
|
|
|
|
|
|
+ playPreviousBuilder(){
|
|
|
|
|
+ Image($r('app.media.ic_previous'))
|
|
|
|
|
+ .width(33)
|
|
|
.clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
.clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
- .fillColor(Color.White)
|
|
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Builder
|
|
|
|
|
+ playNextBuilder(){
|
|
|
|
|
+ Image($r('app.media.ic_next'))
|
|
|
|
|
+ .width(33)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
+ }
|
|
|
|
|
+ @Builder
|
|
|
|
|
+ PlayOrPauseButton(){
|
|
|
|
|
+ Stack() {
|
|
|
|
|
+ Column() {
|
|
|
|
|
+ Image(this.CONTROL_PlayStatus === PlayStatus.PLAY ?
|
|
|
|
|
+ (this.isCircleBtn?$r('app.media.hm_pause'):$r('app.media.ic_public_play'))
|
|
|
|
|
+ : (this.isCircleBtn?$r('app.media.hm_play2'):$r('app.media.ic_public_pause')))
|
|
|
|
|
+ .width(this.isPhoneLan()?45:55)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
+ .fillColor(Color.White)
|
|
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 加载进度圈
|
|
|
|
|
+ if (this.isPlayerLoading) {
|
|
|
|
|
+ Progress({value:0,total:100,type:ProgressType.Ring })
|
|
|
|
|
+ .width(this.isPhoneLan()?48:57)
|
|
|
|
|
+ .height(this.isPhoneLan()?48:57)
|
|
|
|
|
+ .color(Color.White)
|
|
|
|
|
+ .style({ strokeWidth: 5, status: ProgressStatus.LOADING })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .width(this.isPhoneLan()?45:55)
|
|
|
|
|
+ .height(this.isPhoneLan()?45:55)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Builder
|
|
@Builder
|
|
|
TopPlayProgressView(){
|
|
TopPlayProgressView(){
|
|
@@ -10741,40 +10745,48 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
@Builder
|
|
@Builder
|
|
|
playModeButton(){
|
|
playModeButton(){
|
|
|
- Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
|
|
- Column() {
|
|
|
|
|
- if (this.playType === 0) {
|
|
|
|
|
- Image($r('app.media.loop'))
|
|
|
|
|
- .width(27)
|
|
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
- } else if (this.playType === 1) {
|
|
|
|
|
- Image($r('app.media.single'))
|
|
|
|
|
- .width(27)
|
|
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
- } else if (this.playType === 2) {
|
|
|
|
|
- Image($r('app.media.normal_play'))
|
|
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
- .width(27)
|
|
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
- } else if (this.playType === 3) {
|
|
|
|
|
- Image($r('app.media.random'))
|
|
|
|
|
- .width(27)
|
|
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ PointLightButton({
|
|
|
|
|
+ builder: () => {
|
|
|
|
|
+ this.playModeBuilder()
|
|
|
|
|
+ },
|
|
|
|
|
+ isPx: false,
|
|
|
|
|
+ builderHeight: 33,
|
|
|
|
|
+ builderWidth: 33,
|
|
|
|
|
+ })
|
|
|
|
|
+ .onClick(async () =>{
|
|
|
|
|
+ this.setLoopMode()
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Builder
|
|
|
|
|
+ playModeBuilder(){
|
|
|
|
|
+ Column() {
|
|
|
|
|
+ if (this.playType === 0) {
|
|
|
|
|
+ Image($r('app.media.loop'))
|
|
|
|
|
+ .width(27)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
+ } else if (this.playType === 1) {
|
|
|
|
|
+ Image($r('app.media.single'))
|
|
|
|
|
+ .width(27)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
+ } else if (this.playType === 2) {
|
|
|
|
|
+ Image($r('app.media.normal_play'))
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
+ .width(27)
|
|
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
|
|
+ } else if (this.playType === 3) {
|
|
|
|
|
+ Image($r('app.media.random'))
|
|
|
|
|
+ .width(27)
|
|
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .layoutWeight(1)
|
|
|
|
|
- .margin({ left: 5 })
|
|
|
|
|
- .height(45)
|
|
|
|
|
- .width(45)
|
|
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
|
|
- .onClick(async () => {
|
|
|
|
|
- this.setLoopMode()
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
//播放进度条
|
|
//播放进度条
|
|
|
@Builder
|
|
@Builder
|
|
|
BottomView(){
|
|
BottomView(){
|
|
@@ -10902,12 +10914,19 @@ export struct LocalMusic {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //旧版本播放进度条
|
|
|
|
|
|
|
+ //旧版本播放进度条(现在是手机横屏的播放条)
|
|
|
@Builder
|
|
@Builder
|
|
|
playProgressView() {
|
|
playProgressView() {
|
|
|
Row() {
|
|
Row() {
|
|
|
-
|
|
|
|
|
- this.fullButton()
|
|
|
|
|
|
|
+ Column(){
|
|
|
|
|
+ this.fullButton()
|
|
|
|
|
+ }
|
|
|
|
|
+ .margin({ right: 10})
|
|
|
|
|
+ .visibility( this.is_auto_hide_progress ? Visibility.None : Visibility.Visible)
|
|
|
|
|
+ .animation({
|
|
|
|
|
+ duration: 666,
|
|
|
|
|
+ curve: 'ease-in-out' // 可选动画曲线
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
Text(this.currentTime)
|
|
Text(this.currentTime)
|
|
|
.fontSize($r('app.float.slider_font_size'))
|
|
.fontSize($r('app.float.slider_font_size'))
|
|
@@ -11179,7 +11198,6 @@ export struct LocalMusic {
|
|
|
(this.isCoverOpacity() ? (px2vp(this.windowHeight)*0.62) : this.isCoverRectangle ? 320 : 168))
|
|
(this.isCoverOpacity() ? (px2vp(this.windowHeight)*0.62) : this.isCoverRectangle ? 320 : 168))
|
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
|
.alt($r('app.media.alt'))
|
|
.alt($r('app.media.alt'))
|
|
|
- // .geometryTransition('cover') // 绑定标识符
|
|
|
|
|
.margin({ right: 20, left: 20,
|
|
.margin({ right: 20, left: 20,
|
|
|
top:this.isCoverRectangle||this.isLandscape?0:50})
|
|
top:this.isCoverRectangle||this.isLandscape?0:50})
|
|
|
.aspectRatio(1)
|
|
.aspectRatio(1)
|
|
@@ -12598,6 +12616,22 @@ export struct LocalMusic {
|
|
|
.width(48)
|
|
.width(48)
|
|
|
.height(24);
|
|
.height(24);
|
|
|
|
|
|
|
|
|
|
+ Toggle({ type: ToggleType.Switch, isOn: this.enablePointLight })
|
|
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
|
|
+ .switchPointColor(Color.White)
|
|
|
|
|
+ .clickEffect({ level: ClickEffectLevel.LIGHT, scale: 0.5 })
|
|
|
|
|
+ .margin({ right: 15 })
|
|
|
|
|
+ .visibility(more.id == 23 ? Visibility.Visible : Visibility.None)
|
|
|
|
|
+ .onChange((checked: boolean) => { // 选择开关状态变化时触发事件
|
|
|
|
|
+ if (more.id == 23) {
|
|
|
|
|
+ this.enablePointLight = checked;
|
|
|
|
|
+ PreferencesUtil.put('enablePointLight', this.enablePointLight)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ .width(48)
|
|
|
|
|
+ .height(24);
|
|
|
|
|
+
|
|
|
Toggle({ type: ToggleType.Switch, isOn: this.isShowBgLiuGUANG })
|
|
Toggle({ type: ToggleType.Switch, isOn: this.isShowBgLiuGUANG })
|
|
|
.selectedColor(this.themeColor)
|
|
.selectedColor(this.themeColor)
|
|
|
.switchPointColor(Color.White)
|
|
.switchPointColor(Color.White)
|
|
@@ -12691,7 +12725,9 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
{ id: 13, image: $r('app.media.rectangle'), title: '封面方形' },
|
|
{ id: 13, image: $r('app.media.rectangle'), title: '封面方形' },
|
|
|
|
|
|
|
|
- {id : 22, image: $r('app.media.skip'), title: '沉浸式' },
|
|
|
|
|
|
|
+ { id : 22, image: $r('app.media.skip'), title: '沉浸式' },
|
|
|
|
|
+
|
|
|
|
|
+ { id : 23, image: $r('app.media.more_do'), title: '点光源效果' },
|
|
|
|
|
|
|
|
{ id : 21, image: $r('app.media.kp_music'), title: '背景双边流光' },
|
|
{ id : 21, image: $r('app.media.kp_music'), title: '背景双边流光' },
|
|
|
|
|
|
|
@@ -13431,16 +13467,18 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
this.isCurrentTime = true;
|
|
this.isCurrentTime = true;
|
|
|
this.lyricController.updatePosition(position + this.timeOffset * 1000)
|
|
this.lyricController.updatePosition(position + this.timeOffset * 1000)
|
|
|
- this.lyricControllerXF.updatePosition(position + this.timeOffset * 1000)
|
|
|
|
|
- this.lyricControllerSingle.updatePosition(position + this.timeOffset * 1000)
|
|
|
|
|
|
|
+ if(this.showPipLyric){
|
|
|
|
|
+ this.lyricControllerXF.updatePosition(position + this.timeOffset * 1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.isShowSingleLineLyric){
|
|
|
|
|
+ this.lyricControllerSingle.updatePosition(position + this.timeOffset * 1000);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
this.currentTime = this.stringForTime(position);
|
|
this.currentTime = this.stringForTime(position);
|
|
|
this.isCurrentTime = false
|
|
this.isCurrentTime = false
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.mIjkMediaPlayer.isPlaying()) {
|
|
if (this.mIjkMediaPlayer.isPlaying()) {
|
|
|
- this.randomColor =
|
|
|
|
|
- `rgb(${Math.floor(Math.random() * 256)},${Math.floor(Math.random() * 256)},${Math.floor(Math.random() * 256)})`
|
|
|
|
|
|
|
|
|
|
//如果是开启AB循环
|
|
//如果是开启AB循环
|
|
|
if(this.isOpenAB){
|
|
if(this.isOpenAB){
|
|
@@ -13473,12 +13511,8 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- } else {
|
|
|
|
|
- this.randomColor = 'rbg(0,0,0)'
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private startProgressTask() {
|
|
private startProgressTask() {
|
|
@@ -14789,8 +14823,12 @@ export struct LocalMusic {
|
|
|
this.currentTime = this.stringForTime(position);
|
|
this.currentTime = this.stringForTime(position);
|
|
|
this.isCurrentTime = false;
|
|
this.isCurrentTime = false;
|
|
|
this.lyricController.updatePosition(position + this.timeOffset * 1000);
|
|
this.lyricController.updatePosition(position + this.timeOffset * 1000);
|
|
|
- this.lyricControllerXF.updatePosition(position + this.timeOffset * 1000);
|
|
|
|
|
- this.lyricControllerSingle.updatePosition(position + this.timeOffset * 1000);
|
|
|
|
|
|
|
+ if(this.showPipLyric){
|
|
|
|
|
+ this.lyricControllerXF.updatePosition(position + this.timeOffset * 1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.isShowSingleLineLyric){
|
|
|
|
|
+ this.lyricControllerSingle.updatePosition(position + this.timeOffset * 1000);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* Gesture method onActionUpdate.
|
|
* Gesture method onActionUpdate.
|