|
@@ -1,5 +1,5 @@
|
|
|
import TitleBar from './TitleBar'
|
|
import TitleBar from './TitleBar'
|
|
|
-import { curves, display, MenuModifier,PiPWindow, promptAction, router, SymbolGlyphModifier, window } from '@kit.ArkUI';
|
|
|
|
|
|
|
+import { curves, display, MenuModifier, PiPWindow, promptAction, router, SymbolGlyphModifier, window } from '@kit.ArkUI';
|
|
|
import { VideoItem } from '../viewmodel/VideoItem';
|
|
import { VideoItem } from '../viewmodel/VideoItem';
|
|
|
import { LengthMetrics, SegmentButton,SegmentButtonOptions } from '@kit.ArkUI';
|
|
import { LengthMetrics, SegmentButton,SegmentButtonOptions } from '@kit.ArkUI';
|
|
|
import { getWebdavVideoItems, getWebdavCurrentPlayIndex } from '../pages/WebDavMainPage';
|
|
import { getWebdavVideoItems, getWebdavCurrentPlayIndex } from '../pages/WebDavMainPage';
|
|
@@ -1206,6 +1206,8 @@ export struct LocalMusic {
|
|
|
context.getApplicationContext().setColorMode(colorMode)
|
|
context.getApplicationContext().setColorMode(colorMode)
|
|
|
}
|
|
}
|
|
|
initSetting() {
|
|
initSetting() {
|
|
|
|
|
+ this.isShowSpectrum = PreferencesUtil.getBooleanSync('isShowSpectrum', false)
|
|
|
|
|
+ this.spectrumModeIndex = PreferencesUtil.getNumberSync('spectrumModeIndex', 0)
|
|
|
this.enablePointLight = PreferencesUtil.getBooleanSync('enablePointLight', true)
|
|
this.enablePointLight = PreferencesUtil.getBooleanSync('enablePointLight', true)
|
|
|
AppStorage.setOrCreate('EnablePointLight', this.enablePointLight);
|
|
AppStorage.setOrCreate('EnablePointLight', this.enablePointLight);
|
|
|
this.showSimple = PreferencesUtil.getBooleanSync('showSimple', true)
|
|
this.showSimple = PreferencesUtil.getBooleanSync('showSimple', true)
|
|
@@ -1829,10 +1831,7 @@ export struct LocalMusic {
|
|
|
this.historyPath = this.rootPath + '/' + LocalMusic.STR_HISTORY_MUSIC
|
|
this.historyPath = this.rootPath + '/' + LocalMusic.STR_HISTORY_MUSIC
|
|
|
Logger.info('onecold rootPath = ' + this.rootPath)
|
|
Logger.info('onecold rootPath = ' + this.rootPath)
|
|
|
|
|
|
|
|
- Logger.info('onecold lockPath = ' + this.lockPath)
|
|
|
|
|
- if (!FileUtil.accessSync(this.lockPath)) {
|
|
|
|
|
- FileUtil.mkdirSync(this.lockPath)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
if (!FileUtil.accessSync(this.favPath)) {
|
|
if (!FileUtil.accessSync(this.favPath)) {
|
|
|
FileUtil.mkdirSync(this.favPath)
|
|
FileUtil.mkdirSync(this.favPath)
|
|
|
}
|
|
}
|
|
@@ -10771,6 +10770,9 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
if (this.isPhoneLan()) {
|
|
if (this.isPhoneLan()) {
|
|
|
Column() {
|
|
Column() {
|
|
|
|
|
+ if (this.isShowSpectrum) {
|
|
|
|
|
+ this.InlineSpectrumView()
|
|
|
|
|
+ }
|
|
|
this.playProgressView()
|
|
this.playProgressView()
|
|
|
}
|
|
}
|
|
|
.margin({ bottom: 32, right: this.currentLyricAlignMode == 0 ? 0 : 30 })
|
|
.margin({ bottom: 32, right: this.currentLyricAlignMode == 0 ? 0 : 30 })
|
|
@@ -10807,6 +10809,9 @@ export struct LocalMusic {
|
|
|
@Builder
|
|
@Builder
|
|
|
BottomControl() {
|
|
BottomControl() {
|
|
|
Column() {
|
|
Column() {
|
|
|
|
|
+ if (this.isShowSpectrum) {
|
|
|
|
|
+ this.InlineSpectrumView()
|
|
|
|
|
+ }
|
|
|
this.TopPlayProgressView()
|
|
this.TopPlayProgressView()
|
|
|
//播放 暂停,下一首,上一首
|
|
//播放 暂停,下一首,上一首
|
|
|
this.playCenterView()
|
|
this.playCenterView()
|
|
@@ -11401,16 +11406,8 @@ export struct LocalMusic {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
- if (this.isPhonePortrait() ) {
|
|
|
|
|
- Stack(){
|
|
|
|
|
- if (true) {
|
|
|
|
|
- this.InlineSpectrumView()
|
|
|
|
|
- }
|
|
|
|
|
- if (this.isShowSingleLineLyric) {
|
|
|
|
|
- this.SingleLyricView()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if (this.isShowSingleLineLyric&&this.isPhonePortrait()) {
|
|
|
|
|
+ this.SingleLyricView()
|
|
|
}
|
|
}
|
|
|
if (this.isPhoneLan()) {
|
|
if (this.isPhoneLan()) {
|
|
|
Column() {
|
|
Column() {
|
|
@@ -12820,14 +12817,25 @@ export struct LocalMusic {
|
|
|
.id('AVCastPicker')
|
|
.id('AVCastPicker')
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
- Image(more.image)
|
|
|
|
|
- .width(24)
|
|
|
|
|
- .height(24)
|
|
|
|
|
- .fillColor(Color.White)
|
|
|
|
|
- .margin({ left: 10, right: 10 })
|
|
|
|
|
- .onClick(() => {
|
|
|
|
|
- this.doMore(more.id)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if(more.id >= 22){
|
|
|
|
|
+ SymbolGlyph(more.image)
|
|
|
|
|
+ .fontSize(24)
|
|
|
|
|
+ .fontColor([Color.White])
|
|
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
|
|
+ .margin({ left: 10, right: 10 })
|
|
|
|
|
+ .onClick(() => {
|
|
|
|
|
+ this.doMore(more.id)
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ Image(more.image)
|
|
|
|
|
+ .width(24)
|
|
|
|
|
+ .height(24)
|
|
|
|
|
+ .fillColor(Color.White)
|
|
|
|
|
+ .margin({ left: 10, right: 10 })
|
|
|
|
|
+ .onClick(() => {
|
|
|
|
|
+ this.doMore(more.id)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
Text(more.id == 17 ? (this.isLandscape ? '竖屏模式' : '横屏模式') : more.title)
|
|
Text(more.id == 17 ? (this.isLandscape ? '竖屏模式' : '横屏模式') : more.title)
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
|
|
|
|
@@ -12964,6 +12972,49 @@ export struct LocalMusic {
|
|
|
.width(48)
|
|
.width(48)
|
|
|
.height(24);
|
|
.height(24);
|
|
|
|
|
|
|
|
|
|
+ Toggle({ type: ToggleType.Switch, isOn: this.isShowSpectrum })
|
|
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
|
|
+ .switchPointColor(Color.White)
|
|
|
|
|
+ .clickEffect({ level: ClickEffectLevel.LIGHT, scale: 0.5 })
|
|
|
|
|
+ .margin({ right: 15 })
|
|
|
|
|
+ .visibility(more.id == 25 ? Visibility.Visible : Visibility.None)
|
|
|
|
|
+ .onChange((checked: boolean) => { // 选择开关状态变化时触发事件
|
|
|
|
|
+ if (more.id == 25) {
|
|
|
|
|
+ this.isShowSpectrum = checked;
|
|
|
|
|
+ PreferencesUtil.put("isShowSpectrum", this.isShowSpectrum)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ .width(48)
|
|
|
|
|
+ .height(24);
|
|
|
|
|
+
|
|
|
|
|
+ // 频谱特效类型选择器
|
|
|
|
|
+ Select([
|
|
|
|
|
+ { value: '柱状' },
|
|
|
|
|
+ { value: '波形' },
|
|
|
|
|
+ { value: '圆形' },
|
|
|
|
|
+ { value: '粒子' },
|
|
|
|
|
+ { value: '脉冲' },
|
|
|
|
|
+ { value: '镜像柱' },
|
|
|
|
|
+ { value: '影子柱' },
|
|
|
|
|
+ { value: '轨道线' },
|
|
|
|
|
+ { value: '点阵' },
|
|
|
|
|
+ { value: '星爆' }
|
|
|
|
|
+ ])
|
|
|
|
|
+ .font({ size: 14, weight: FontWeight.Medium })
|
|
|
|
|
+ .fontColor(Color.White)
|
|
|
|
|
+ .margin({ left: 25 })
|
|
|
|
|
+ .visibility(more.id === 26 ? Visibility.Visible : Visibility.None)
|
|
|
|
|
+ .selected(this.spectrumModeIndex)
|
|
|
|
|
+ .value(['柱状', '波形', '圆形', '粒子', '脉冲', '镜像柱', '影子柱', '轨道线', '点阵', '星爆'][this.spectrumModeIndex])
|
|
|
|
|
+ .onSelect(async (index: number, _text?: string) => {
|
|
|
|
|
+ this.spectrumModeIndex = index;
|
|
|
|
|
+ PreferencesUtil.put('spectrumModeIndex', this.spectrumModeIndex);
|
|
|
|
|
+ AppStorage.setOrCreate<number>('spectrumMode', this.spectrumModeIndex);
|
|
|
|
|
+ const modeNames = ['柱状', '波形', '圆形', '粒子', '脉冲', '镜像柱', '影子柱', '轨道线', '点阵', '星爆'];
|
|
|
|
|
+ Logger.info('heanup-LocalMusic', '频谱特效已切换为: ' + modeNames[index]);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
Toggle({ type: ToggleType.Switch, isOn: this.showSimple })
|
|
Toggle({ type: ToggleType.Switch, isOn: this.showSimple })
|
|
|
.selectedColor(this.themeColor)
|
|
.selectedColor(this.themeColor)
|
|
|
.switchPointColor(Color.White)
|
|
.switchPointColor(Color.White)
|
|
@@ -13056,12 +13107,13 @@ export struct LocalMusic {
|
|
|
.justifyContent(FlexAlign.Start)
|
|
.justifyContent(FlexAlign.Start)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
private moreItems: MoreItem[] = [
|
|
private moreItems: MoreItem[] = [
|
|
|
{ id: 1, image: $r('app.media.speed'), title: '倍速' },
|
|
{ id: 1, image: $r('app.media.speed'), title: '倍速' },
|
|
|
|
|
|
|
|
{ id: 2, image: $r('app.media.lyric'), title: '歌词' },
|
|
{ id: 2, image: $r('app.media.lyric'), title: '歌词' },
|
|
|
|
|
|
|
|
- { id: 24, image: $r('app.media.equalizer'), title: '均衡器' },
|
|
|
|
|
|
|
+ { id: 24, image: $r('sys.symbol.slider_vertical_3'), title: '均衡器' },
|
|
|
|
|
|
|
|
{ id: 17, image: $r('app.media.full_4'), title: '横屏模式' },
|
|
{ id: 17, image: $r('app.media.full_4'), title: '横屏模式' },
|
|
|
|
|
|
|
@@ -13087,15 +13139,16 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
{ id: 9, image: $r('app.media.volume_white'), title: '调整音量' },
|
|
{ id: 9, image: $r('app.media.volume_white'), title: '调整音量' },
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ { id: 25, image: $r('sys.symbol.ranking'), title: '音乐频谱' },
|
|
|
|
|
+ { id: 26, image: $r('sys.symbol.eight_diagram'), title: '频谱类型' },
|
|
|
// { id: 6, image: $r('app.media.memory'), title: '记忆播放' },
|
|
// { id: 6, image: $r('app.media.memory'), title: '记忆播放' },
|
|
|
|
|
|
|
|
|
|
|
|
|
{ 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('sys.symbol.satellite_map'), title: '沉浸式' },
|
|
|
|
|
|
|
|
- { id : 23, image: $r('app.media.more_do'), title: '点光源效果' },
|
|
|
|
|
|
|
+ { id : 23, image: $r('sys.symbol.lightbulb'), title: '点光源效果' },
|
|
|
|
|
|
|
|
{ id : 21, image: $r('app.media.kp_music'), title: '背景双边流光' },
|
|
{ id : 21, image: $r('app.media.kp_music'), title: '背景双边流光' },
|
|
|
|
|
|
|
@@ -13116,6 +13169,8 @@ export struct LocalMusic {
|
|
|
@State isJumpSetting: boolean = false
|
|
@State isJumpSetting: boolean = false
|
|
|
@State isShowEdit: boolean = false
|
|
@State isShowEdit: boolean = false
|
|
|
@State showPipLyric: boolean = false
|
|
@State showPipLyric: boolean = false
|
|
|
|
|
+ @State isShowSpectrum: boolean = false//是否显示频谱
|
|
|
|
|
+ @State spectrumModeIndex: number = 0 //选中的频谱特效索引
|
|
|
|
|
|
|
|
async setRingTone() {
|
|
async setRingTone() {
|
|
|
if (StrUtil.isEmpty(this.videoUrl) || StrUtil.isEmpty(this.name)) {
|
|
if (StrUtil.isEmpty(this.videoUrl) || StrUtil.isEmpty(this.name)) {
|
|
@@ -15302,9 +15357,9 @@ export struct LocalMusic {
|
|
|
isVisible: this.currentSwiperIndex === 0,
|
|
isVisible: this.currentSwiperIndex === 0,
|
|
|
isPlaying: this.CONTROL_PlayStatus === PlayStatus.PLAY
|
|
isPlaying: this.CONTROL_PlayStatus === PlayStatus.PLAY
|
|
|
})
|
|
})
|
|
|
- .width(this.isLandscape ? '82%' : '90%')
|
|
|
|
|
- .height(this.isCoverOpacity() ? 120 : 150)
|
|
|
|
|
- .margin({ top: 3, bottom: 12 })
|
|
|
|
|
|
|
+ .width( '84%')
|
|
|
|
|
+ .height(this.isCoverOpacity() ? 80 : 100)
|
|
|
|
|
+ .margin({bottom: 3 })
|
|
|
.clip(true)
|
|
.clip(true)
|
|
|
}
|
|
}
|
|
|
|
|
|