|
@@ -234,6 +234,9 @@ const ITEM_HEIGHT_BIG: number = 78; // 列表项大高度
|
|
|
@Preview
|
|
@Preview
|
|
|
@Component
|
|
@Component
|
|
|
export struct LocalMusic {
|
|
export struct LocalMusic {
|
|
|
|
|
+ // @State button_gradient_state: hdsEffect.PressShadowType = hdsEffect.PressShadowType.NONE;
|
|
|
|
|
+ // @State lightIntensity: number = 10;
|
|
|
|
|
+ // @State illuminatedType: hdsEffect.PointLightIlluminatedType = hdsEffect.PointLightIlluminatedType.NONE
|
|
|
//背景两侧流光控制器
|
|
//背景两侧流光控制器
|
|
|
@State sceneBgController: HdsSceneController|undefined = deviceInfo.sdkApiVersion>=20
|
|
@State sceneBgController: HdsSceneController|undefined = deviceInfo.sdkApiVersion>=20
|
|
|
&&canIUse("SystemCapability.UIDesign.HDSComponent.Core")?
|
|
&&canIUse("SystemCapability.UIDesign.HDSComponent.Core")?
|
|
@@ -4128,8 +4131,6 @@ export struct LocalMusic {
|
|
|
let mSearchList: Array<VideoItem> = []
|
|
let mSearchList: Array<VideoItem> = []
|
|
|
switch (this.modeType) {
|
|
switch (this.modeType) {
|
|
|
case 0:
|
|
case 0:
|
|
|
- // mSearchList = this.videoLocalList
|
|
|
|
|
- // break;
|
|
|
|
|
case 1:
|
|
case 1:
|
|
|
mSearchList = this.mediaKuList
|
|
mSearchList = this.mediaKuList
|
|
|
break;
|
|
break;
|
|
@@ -4139,6 +4140,10 @@ export struct LocalMusic {
|
|
|
case 3:
|
|
case 3:
|
|
|
mSearchList = this.albumList
|
|
mSearchList = this.albumList
|
|
|
break;
|
|
break;
|
|
|
|
|
+ default :
|
|
|
|
|
+ mSearchList = this.videoLocalList
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
// 新增条件判断:空输入时显示所有数据
|
|
// 新增条件判断:空输入时显示所有数据
|
|
|
if (this.searchText === '') {
|
|
if (this.searchText === '') {
|
|
@@ -4412,7 +4417,7 @@ export struct LocalMusic {
|
|
|
Button({ type: ButtonType.Normal, stateEffect: false }) {
|
|
Button({ type: ButtonType.Normal, stateEffect: false }) {
|
|
|
Stack() {
|
|
Stack() {
|
|
|
Column() {
|
|
Column() {
|
|
|
- Image(StrUtil.isEmpty(item.pixelMapPath) ? Utility.getMusisBg2(index) : item.pixelMapPath)
|
|
|
|
|
|
|
+ Image(item.pixelMapPath)
|
|
|
.backgroundImageSize(ImageSize.Auto)
|
|
.backgroundImageSize(ImageSize.Auto)
|
|
|
.borderRadius({
|
|
.borderRadius({
|
|
|
topLeft: 12,
|
|
topLeft: 12,
|
|
@@ -4421,10 +4426,11 @@ export struct LocalMusic {
|
|
|
bottomRight: 0
|
|
bottomRight: 0
|
|
|
})
|
|
})
|
|
|
.draggable(false)// 禁止长按手势拖动
|
|
.draggable(false)// 禁止长按手势拖动
|
|
|
- // .autoResize(true) // 重采样,可减少内存占用
|
|
|
|
|
- // .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
|
|
|
|
+ .autoResize(true) // 重采样,可减少内存占用
|
|
|
|
|
+ .interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.height('auto')
|
|
.height('auto')
|
|
|
|
|
+ .alt(item.type==CommonConstants.TYPE_IS_DIR?$r('app.media.dir_alt'):$r('app.media.alt'))
|
|
|
.objectFit(ImageFit.Auto)
|
|
.objectFit(ImageFit.Auto)
|
|
|
.bindSheet(this.longItemFilePath== item.filePath, this.editSheet(item), {
|
|
.bindSheet(this.longItemFilePath== item.filePath, this.editSheet(item), {
|
|
|
height: '99%' ,
|
|
height: '99%' ,
|
|
@@ -4534,7 +4540,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.borderRadius(12)
|
|
.borderRadius(12)
|
|
|
- .backgroundImage(StrUtil.isEmpty(item.pixelMapPath)?Utility.getMusisBg2(index):item.pixelMapPath)
|
|
|
|
|
|
|
+ .backgroundImage(StrUtil.isEmpty(item.pixelMapPath) ? $r('app.media.alt') : item.pixelMapPath)
|
|
|
.backgroundImageSize({ height: '100%', width: '100%' })
|
|
.backgroundImageSize({ height: '100%', width: '100%' })
|
|
|
.backgroundBlurStyle(BlurStyle.BACKGROUND_ULTRA_THICK)
|
|
.backgroundBlurStyle(BlurStyle.BACKGROUND_ULTRA_THICK)
|
|
|
.animation({ curve: Curve.Sharp, duration: 300 })
|
|
.animation({ curve: Curve.Sharp, duration: 300 })
|
|
@@ -4561,6 +4567,11 @@ export struct LocalMusic {
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.height('auto')
|
|
.height('auto')
|
|
|
.padding({top:2})
|
|
.padding({top:2})
|
|
|
|
|
+ .shadow({
|
|
|
|
|
+ radius: 10,
|
|
|
|
|
+ type: ShadowType.BLUR,
|
|
|
|
|
+ color: 'on_primary'
|
|
|
|
|
+ })
|
|
|
.reuseId('card_item')
|
|
.reuseId('card_item')
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
if (this.isMultiSelect && item.type !== CommonConstants.TYPE_IS_DIR) {
|
|
if (this.isMultiSelect && item.type !== CommonConstants.TYPE_IS_DIR) {
|
|
@@ -4806,13 +4817,13 @@ export struct LocalMusic {
|
|
|
Button({ type: ButtonType.Normal, stateEffect: false }) {
|
|
Button({ type: ButtonType.Normal, stateEffect: false }) {
|
|
|
Stack() {
|
|
Stack() {
|
|
|
Column() {
|
|
Column() {
|
|
|
- Image(StrUtil.isEmpty(item.pixelMapPath) ? Utility.getMusisBg2(index) : item.pixelMapPath)
|
|
|
|
|
|
|
+ Image(item.pixelMapPath)
|
|
|
.height(this.getGridHeight())
|
|
.height(this.getGridHeight())
|
|
|
.width(this.getGridWight())
|
|
.width(this.getGridWight())
|
|
|
.draggable(false)
|
|
.draggable(false)
|
|
|
.interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
.interpolation(ImageInterpolation.High)// 用于重采样后的抗锯齿
|
|
|
.autoResize(true) // 重采样,可减少内存占用
|
|
.autoResize(true) // 重采样,可减少内存占用
|
|
|
- .alt($r('app.media.ic_avatar2'))
|
|
|
|
|
|
|
+ .alt(item.type==CommonConstants.TYPE_IS_DIR?$r('app.media.dir_alt'):$r('app.media.alt'))
|
|
|
.clip(true)
|
|
.clip(true)
|
|
|
.borderRadius({
|
|
.borderRadius({
|
|
|
topLeft: 12,
|
|
topLeft: 12,
|
|
@@ -4924,7 +4935,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
.width(this.getGridWight())
|
|
.width(this.getGridWight())
|
|
|
.borderRadius(12)
|
|
.borderRadius(12)
|
|
|
- .backgroundImage(StrUtil.isEmpty(item.pixelMapPath)?Utility.getMusisBg2(index):item.pixelMapPath)
|
|
|
|
|
|
|
+ .backgroundImage(StrUtil.isEmpty(item.pixelMapPath)?undefined:item.pixelMapPath)
|
|
|
.backgroundImageSize({ height: '100%', width: '100%' })
|
|
.backgroundImageSize({ height: '100%', width: '100%' })
|
|
|
.backgroundBlurStyle(BlurStyle.BACKGROUND_ULTRA_THICK)
|
|
.backgroundBlurStyle(BlurStyle.BACKGROUND_ULTRA_THICK)
|
|
|
.animation({ curve: Curve.Sharp, duration: 300 })
|
|
.animation({ curve: Curve.Sharp, duration: 300 })
|
|
@@ -5707,10 +5718,10 @@ export struct LocalMusic {
|
|
|
if (item.name === LocalMusic.STR_LOCK_VIDEO) {
|
|
if (item.name === LocalMusic.STR_LOCK_VIDEO) {
|
|
|
this.showVerifyDialog()
|
|
this.showVerifyDialog()
|
|
|
this.currentTitleName = '私密音频'
|
|
this.currentTitleName = '私密音频'
|
|
|
- this.currentTitleCover = $r('app.media.ic_avatar5')
|
|
|
|
|
|
|
+ this.currentTitleCover = $r('app.media.ic_avatar1')
|
|
|
} else if (item.name === LocalMusic.STR_HISTORY_MUSIC) {
|
|
} else if (item.name === LocalMusic.STR_HISTORY_MUSIC) {
|
|
|
this.titleName = '最近播放'
|
|
this.titleName = '最近播放'
|
|
|
- this.currentTitleCover = $r('app.media.ic_avatar2')
|
|
|
|
|
|
|
+ this.currentTitleCover = $r('app.media.alt')
|
|
|
this.currentTitleName = '最近播放'
|
|
this.currentTitleName = '最近播放'
|
|
|
//加载动画效果
|
|
//加载动画效果
|
|
|
this.updateListData(this.historyList, true)
|
|
this.updateListData(this.historyList, true)
|
|
@@ -5737,7 +5748,7 @@ export struct LocalMusic {
|
|
|
} else {
|
|
} else {
|
|
|
this.currentTitleName = item.name
|
|
this.currentTitleName = item.name
|
|
|
this.currentPath = item.filePath
|
|
this.currentPath = item.filePath
|
|
|
- this.currentTitleCover = $r('app.media.ic_avatar5')
|
|
|
|
|
|
|
+ this.currentTitleCover = $r('app.media.ic_avatar1')
|
|
|
this.getSortedFiles(this.currentPath)
|
|
this.getSortedFiles(this.currentPath)
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -8353,13 +8364,6 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
.indicator(false)
|
|
.indicator(false)
|
|
|
- // .indicator(this.currentBreakpoint === BreakpointTypeEnum.SM ?
|
|
|
|
|
- // new DotIndicator()
|
|
|
|
|
- // .top(this.isCoverOpacity()?0:10)
|
|
|
|
|
- //
|
|
|
|
|
- // .selectedColor($r('app.color.select_swiper'))
|
|
|
|
|
- // .color($r('app.color.slider_track')):false
|
|
|
|
|
- // )
|
|
|
|
|
.displayCount(new BreakpointType({
|
|
.displayCount(new BreakpointType({
|
|
|
sm: 1,
|
|
sm: 1,
|
|
|
md: 2,
|
|
md: 2,
|
|
@@ -8398,14 +8402,14 @@ export struct LocalMusic {
|
|
|
.margin({ bottom: 8 })
|
|
.margin({ bottom: 8 })
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- .backgroundImage(!this.isMusicBGCover?undefined:
|
|
|
|
|
- StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
|
|
|
|
+ .backgroundImage(!this.isMusicBGCover||StrUtil.isEmpty(this.cover)?null: this.cover)
|
|
|
.backgroundImageSize(this.isPuraWP()||!this.isMusicBGCover ? { width: '100%' } : { height: '150%', width: '100%' })
|
|
.backgroundImageSize(this.isPuraWP()||!this.isMusicBGCover ? { width: '100%' } : { height: '150%', width: '100%' })
|
|
|
.animation({
|
|
.animation({
|
|
|
duration: 666,
|
|
duration: 666,
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
|
})
|
|
})
|
|
|
- .backgroundBlurStyle(this.isPuraWP() && this.currentSwiperIndex === 0 ? BlurStyle.NONE :
|
|
|
|
|
|
|
+ .backgroundBlurStyle((this.isPuraWP() && this.currentSwiperIndex === 0) ||!this.isMusicBGCover
|
|
|
|
|
+ ? BlurStyle.NONE :
|
|
|
BlurStyle.BACKGROUND_ULTRA_THICK)
|
|
BlurStyle.BACKGROUND_ULTRA_THICK)
|
|
|
.hitTestBehavior(HitTestMode.Transparent)
|
|
.hitTestBehavior(HitTestMode.Transparent)
|
|
|
.backgroundBrightness({ rate: this.isPuraWP() ? 0.1 : 0, lightUpDegree: -0.1 })
|
|
.backgroundBrightness({ rate: this.isPuraWP() ? 0.1 : 0, lightUpDegree: -0.1 })
|
|
@@ -8493,8 +8497,6 @@ export struct LocalMusic {
|
|
|
private castSeek: boolean = false;
|
|
private castSeek: boolean = false;
|
|
|
private castItem: avSession.AVQueueItem | undefined = undefined;
|
|
private castItem: avSession.AVQueueItem | undefined = undefined;
|
|
|
// @State isBgPlayOpen:boolean = true //是否启用后台播放
|
|
// @State isBgPlayOpen:boolean = true //是否启用后台播放
|
|
|
- @State imageLabel: PixelMap | Resource = CommonConstants.musicBgList[0];
|
|
|
|
|
- @State imageLabelBg: PixelMap | Resource = CommonConstants.musicBgList[0];
|
|
|
|
|
@State rotateAngle2: number = -9
|
|
@State rotateAngle2: number = -9
|
|
|
@StorageLink('imageColor') imageColor: string = 'rgba(0, 0, 2, 1.00)';
|
|
@StorageLink('imageColor') imageColor: string = 'rgba(0, 0, 2, 1.00)';
|
|
|
@State cover: string | undefined = '';
|
|
@State cover: string | undefined = '';
|
|
@@ -8913,87 +8915,6 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * Get largest proportion color of an image.
|
|
|
|
|
- */
|
|
|
|
|
- getImageColor() {
|
|
|
|
|
- if (!this.context) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- let bg = Utility.getMusisBg()
|
|
|
|
|
- this.imageLabel = bg
|
|
|
|
|
-
|
|
|
|
|
- ColorConversion.setSysBarLightBackground(true);
|
|
|
|
|
- this.context.resourceManager.getMediaContent(bg)
|
|
|
|
|
- .then((value: Uint8Array) => {
|
|
|
|
|
- let buffer = value.buffer as ArrayBuffer;
|
|
|
|
|
- image.createImageSource(buffer).createPixelMap().then((pixelMap) => {
|
|
|
|
|
- effectKit.createColorPicker(pixelMap, (error, colorPicker) => {
|
|
|
|
|
- if (error) {
|
|
|
|
|
- Logger.error('Failed to create color picker.');
|
|
|
|
|
- } else {
|
|
|
|
|
- let color = colorPicker.getLargestProportionColor();
|
|
|
|
|
- let colorArr = ColorConversion.dealColor(color.red, color.green, color.blue);
|
|
|
|
|
- this.imageColor = `rgba(${colorArr[0]}, ${colorArr[1]}, ${colorArr[2]}, 1)`;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- let headFilter = effectKit.createEffect(pixelMap);
|
|
|
|
|
- if (headFilter !== null) {
|
|
|
|
|
- headFilter.blur(15);
|
|
|
|
|
- headFilter.getEffectPixelMap().then((value) => {
|
|
|
|
|
- this.imageLabelBg = value;
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch((error: BusinessError) => {
|
|
|
|
|
- Logger.error(`${error.code} + ${error.message}`)
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- .catch((error: BusinessError) => {
|
|
|
|
|
- Logger.error(`${error.code} + ${error.message}`)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- setImageColor(cover: string) {
|
|
|
|
|
-
|
|
|
|
|
- if (!this.context) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (cover === undefined) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- imagePathToPixelMap(cover).then((value) => {
|
|
|
|
|
- let headFilter = effectKit.createEffect(value);
|
|
|
|
|
- if (headFilter !== null) {
|
|
|
|
|
- headFilter.blur(15);
|
|
|
|
|
- headFilter.getEffectPixelMap().then((value) => {
|
|
|
|
|
- this.imageLabelBg = value;
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }).catch((error: BusinessError) => {
|
|
|
|
|
- Logger.error(`${error.code} + ${error.message}`)
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- setImageColor2(cover: string) {
|
|
|
|
|
- if (!this.context) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if (cover === undefined) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- LogUtils.getInstance().LOGI("setImageColor2--> cover ==" + cover);
|
|
|
|
|
- ImageUtils.getImageDealData(getContext(this), cover, this.videoUrl).then((data) => {
|
|
|
|
|
- this.imageColor = data.imageColor;
|
|
|
|
|
- if (data.blurPixelMap) {
|
|
|
|
|
- this.imageLabelBg = data.blurPixelMap;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
// 定义开始旋转的方法
|
|
// 定义开始旋转的方法
|
|
|
// 定时器用于一百毫秒执行一次旋转角度
|
|
// 定时器用于一百毫秒执行一次旋转角度
|
|
@@ -9070,10 +8991,10 @@ export struct LocalMusic {
|
|
|
Row() {
|
|
Row() {
|
|
|
Stack() {
|
|
Stack() {
|
|
|
|
|
|
|
|
- Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
|
|
|
|
+ Image(this.cover)
|
|
|
.height(58)
|
|
.height(58)
|
|
|
.width(58)
|
|
.width(58)
|
|
|
- .alt(this.imageLabel)
|
|
|
|
|
|
|
+ .alt($r('app.media.alt'))
|
|
|
.borderRadius(8)
|
|
.borderRadius(8)
|
|
|
.clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
.clickEffect({ level: ClickEffectLevel.HEAVY })
|
|
|
.margin({ left: this.currentLyricAlignMode === 0 ? 28 : -15 })
|
|
.margin({ left: this.currentLyricAlignMode === 0 ? 28 : -15 })
|
|
@@ -9269,6 +9190,8 @@ export struct LocalMusic {
|
|
|
.clickEffect({level:ClickEffectLevel.HEAVY})
|
|
.clickEffect({level:ClickEffectLevel.HEAVY})
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
}
|
|
}
|
|
|
|
|
+ .height(50)
|
|
|
|
|
+ .width(50)
|
|
|
.onClick(async () => {
|
|
.onClick(async () => {
|
|
|
await this.playPrevious()
|
|
await this.playPrevious()
|
|
|
})
|
|
})
|
|
@@ -9288,32 +9211,44 @@ export struct LocalMusic {
|
|
|
.clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
.clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.fillColor(Color.White)
|
|
.fillColor(Color.White)
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
- .onClick(async () => {
|
|
|
|
|
- console.info('onecold playOrPause 7651')
|
|
|
|
|
- this.playOrPause()
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ // .visualEffect(new hdsEffect.HdsEffectBuilder()
|
|
|
|
|
+ // .pressShadow(this.button_gradient_state)
|
|
|
|
|
+ // .pointLight({
|
|
|
|
|
+ // options: {
|
|
|
|
|
+ // color: Color.White,
|
|
|
|
|
+ // intensity: this.lightIntensity,
|
|
|
|
|
+ // height: 150
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .pressShadow(this.button_gradient_state)
|
|
|
|
|
+ // .buildEffect())
|
|
|
|
|
+ .onClick(async () => {
|
|
|
|
|
+ this.playOrPause()
|
|
|
|
|
+ // this.illuminatedType = hdsEffect.PointLightIlluminatedType.BORDER;
|
|
|
|
|
+ // this.button_gradient_state = hdsEffect.PressShadowType.BLEND_GRADIENT;
|
|
|
|
|
+ })
|
|
|
.backgroundColor(Color.Transparent)
|
|
.backgroundColor(Color.Transparent)
|
|
|
.layoutWeight(1)
|
|
.layoutWeight(1)
|
|
|
// .margin({ left: 38, right: 38 })
|
|
// .margin({ left: 38, right: 38 })
|
|
|
|
|
|
|
|
|
|
|
|
|
Row({ space: 20 }) {
|
|
Row({ space: 20 }) {
|
|
|
- Button({ type: ButtonType.Capsule, stateEffect: true }) {
|
|
|
|
|
|
|
+ Button({ type: ButtonType.Circle, stateEffect: true }) {
|
|
|
Image($r('app.media.ic_next'))
|
|
Image($r('app.media.ic_next'))
|
|
|
.width(33)
|
|
.width(33)
|
|
|
.clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
.clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
- .onClick(async () => {
|
|
|
|
|
-
|
|
|
|
|
- await this.playNext();
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ .height(50)
|
|
|
|
|
+ .width(50)
|
|
|
.backgroundColor(Color.Transparent)
|
|
.backgroundColor(Color.Transparent)
|
|
|
.margin({ right: 5 })
|
|
.margin({ right: 5 })
|
|
|
|
|
+ .onClick(async () => {
|
|
|
|
|
+ await this.playNext();
|
|
|
|
|
+ })
|
|
|
.width(33)
|
|
.width(33)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -9763,11 +9698,11 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
Column() {
|
|
Column() {
|
|
|
if (this.isCoverTop && !this.isCoverOpacity() && this.isCoverRectangle) {
|
|
if (this.isCoverTop && !this.isCoverOpacity() && this.isCoverRectangle) {
|
|
|
- Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
|
|
|
|
+ Image(this.cover)
|
|
|
.height(this.isHiCar()?(px2vp(this.windowHeight)*0.46):'auto')
|
|
.height(this.isHiCar()?(px2vp(this.windowHeight)*0.46):'auto')
|
|
|
.width(this.isHiCar()?'auto':this.isBigScreen() ? '72%' : this.isCoverTopBig ? '100%' : '88%')
|
|
.width(this.isHiCar()?'auto':this.isBigScreen() ? '72%' : this.isCoverTopBig ? '100%' : '88%')
|
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
|
- .alt(this.imageLabel)
|
|
|
|
|
|
|
+ .alt($r('app.media.alt'))
|
|
|
.margin({ right: 8, left: 8, top: 8 })
|
|
.margin({ right: 8, left: 8, top: 8 })
|
|
|
.aspectRatio(1)
|
|
.aspectRatio(1)
|
|
|
.opacity(this.opacityValueImage)
|
|
.opacity(this.opacityValueImage)
|
|
@@ -9789,7 +9724,7 @@ export struct LocalMusic {
|
|
|
color: 'on_primary'
|
|
color: 'on_primary'
|
|
|
})
|
|
})
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
- this.getImageColor()
|
|
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
// .visualEffect(new hdsEffect.HdsEffectBuilder()
|
|
// .visualEffect(new hdsEffect.HdsEffectBuilder()
|
|
|
// .shaderEffect({
|
|
// .shaderEffect({
|
|
@@ -9822,11 +9757,11 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
this.musicNameInfo(false)
|
|
this.musicNameInfo(false)
|
|
|
} else {
|
|
} else {
|
|
|
- Image(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
|
|
|
|
+ Image(this.cover)
|
|
|
.height(this.isHiCarSmall()?(this.isHiCarKuanBianPing()?140:px2vp(this.windowHeight)*0.38):
|
|
.height(this.isHiCarSmall()?(this.isHiCarKuanBianPing()?140:px2vp(this.windowHeight)*0.38):
|
|
|
(this.isCoverOpacity() ? (px2vp(this.windowHeight)*0.62) : this.isCoverRectangle ? 320 : 162))
|
|
(this.isCoverOpacity() ? (px2vp(this.windowHeight)*0.62) : this.isCoverRectangle ? 320 : 162))
|
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
.objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
|
|
|
- .alt(this.imageLabel)
|
|
|
|
|
|
|
+ .alt($r('app.media.alt'))
|
|
|
.margin({ right: 20, left: 20,top:this.isCoverRectangle||this.isLandscape?0:43 })
|
|
.margin({ right: 20, left: 20,top:this.isCoverRectangle||this.isLandscape?0:43 })
|
|
|
.aspectRatio(1)
|
|
.aspectRatio(1)
|
|
|
.opacity(this.opacityValueImage)
|
|
.opacity(this.opacityValueImage)
|
|
@@ -9848,7 +9783,7 @@ export struct LocalMusic {
|
|
|
angle: this.rotateAngle
|
|
angle: this.rotateAngle
|
|
|
})
|
|
})
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
- this.getImageColor()
|
|
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
if (this.isPhoneLan()) {
|
|
if (this.isPhoneLan()) {
|
|
|
Text(this.name)
|
|
Text(this.name)
|
|
@@ -12379,16 +12314,6 @@ export struct LocalMusic {
|
|
|
onPrepared: async () => {
|
|
onPrepared: async () => {
|
|
|
LogUtils.getInstance().LOGI("setOnPreparedListener-->go");
|
|
LogUtils.getInstance().LOGI("setOnPreparedListener-->go");
|
|
|
try {
|
|
try {
|
|
|
- // this.cover = this.songList[this.curIndex].pixelMapPath
|
|
|
|
|
- // this.artist = this.songList[this.curIndex].artist
|
|
|
|
|
- // this.videoUrl = this.songList[this.curIndex].filePath
|
|
|
|
|
-
|
|
|
|
|
- let isBgCover = PreferencesUtil.getBooleanSync(SettingPage.iS_MUSIC_BG_COVER, true)
|
|
|
|
|
- if (isBgCover && this.cover !== undefined && StrUtil.isNotEmpty(this.cover)) {
|
|
|
|
|
- this.setImageColor2(this.cover)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.getImageColor();
|
|
|
|
|
- }
|
|
|
|
|
//保存碰一碰分享的当前的歌曲
|
|
//保存碰一碰分享的当前的歌曲
|
|
|
AppStorage.setOrCreate('currentSong',this.currentSong) ;
|
|
AppStorage.setOrCreate('currentSong',this.currentSong) ;
|
|
|
|
|
|