|
@@ -7198,50 +7198,59 @@ export struct LocalMusic {
|
|
|
@Builder
|
|
@Builder
|
|
|
TopPlayProgressView(){
|
|
TopPlayProgressView(){
|
|
|
Row() {
|
|
Row() {
|
|
|
- Row(){
|
|
|
|
|
- Text(this.currentTime)
|
|
|
|
|
- .fontSize($r('app.float.slider_font_size'))
|
|
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
- .margin({ right: 3,left:33 })
|
|
|
|
|
- Slider({
|
|
|
|
|
- value: this.progressValue,
|
|
|
|
|
- min: 0,
|
|
|
|
|
- max: this.PROGRESS_MAX_VALUE,
|
|
|
|
|
- step: 1,
|
|
|
|
|
- style: SliderStyle.OutSet
|
|
|
|
|
- })
|
|
|
|
|
- .blockColor('rgba(255,255,255,1)')
|
|
|
|
|
- .trackColor('rgba(255,255,255,0.3)')
|
|
|
|
|
- .selectedColor(Color.White)
|
|
|
|
|
- .trackThickness(PlayConstants.PROGRESS_TRACK_THICKNESS)
|
|
|
|
|
- .layoutWeight(1)
|
|
|
|
|
- .showSteps(false)
|
|
|
|
|
- .showTips(true)
|
|
|
|
|
- .enabled(this.slideEnable)
|
|
|
|
|
- .onChange((value: number, mode: SliderChangeMode) => {
|
|
|
|
|
- // if (mode == 2) {
|
|
|
|
|
- this.isSeekTo = true;
|
|
|
|
|
- this.mDestroyPage = false;
|
|
|
|
|
- this.showLoadIng();
|
|
|
|
|
- LogUtils.getInstance().LOGI("slider-->seekValue start:" + value);
|
|
|
|
|
- let seekValue = value * (this.mIjkMediaPlayer.getDuration() / 100);
|
|
|
|
|
- this.seekTo(seekValue + "");
|
|
|
|
|
- // this.setProgress()
|
|
|
|
|
- LogUtils.getInstance().LOGI("slider-->seekValue end:" + seekValue);
|
|
|
|
|
- this.isSeekTo = false;
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ Column(){
|
|
|
|
|
+ Row(){
|
|
|
|
|
+ Slider({
|
|
|
|
|
+ value: this.progressValue,
|
|
|
|
|
+ min: 0,
|
|
|
|
|
+ max: this.PROGRESS_MAX_VALUE,
|
|
|
|
|
+ step: 1,
|
|
|
|
|
+ style: SliderStyle.InSet
|
|
|
})
|
|
})
|
|
|
- Text(this.totalTime)
|
|
|
|
|
- .fontSize($r('app.float.slider_font_size'))
|
|
|
|
|
- .fontColor(Color.White)
|
|
|
|
|
- .margin({ left:1,right:20 })
|
|
|
|
|
|
|
+ .blockColor('rgba(255,255,255,1)')
|
|
|
|
|
+ .trackColor('rgba(255,255,255,0.3)')
|
|
|
|
|
+ .selectedColor(Color.White)
|
|
|
|
|
+ .trackThickness(4)
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ .showSteps(false)
|
|
|
|
|
+ .showTips(true)
|
|
|
|
|
+ .enabled(this.slideEnable)
|
|
|
|
|
+ .onChange((value: number, mode: SliderChangeMode) => {
|
|
|
|
|
+ // if (mode == 2) {
|
|
|
|
|
+ this.isSeekTo = true;
|
|
|
|
|
+ this.mDestroyPage = false;
|
|
|
|
|
+ this.showLoadIng();
|
|
|
|
|
+ LogUtils.getInstance().LOGI("slider-->seekValue start:" + value);
|
|
|
|
|
+ let seekValue = value * (this.mIjkMediaPlayer.getDuration() / 100);
|
|
|
|
|
+ this.seekTo(seekValue + "");
|
|
|
|
|
+ // this.setProgress()
|
|
|
|
|
+ LogUtils.getInstance().LOGI("slider-->seekValue end:" + seekValue);
|
|
|
|
|
+ this.isSeekTo = false;
|
|
|
|
|
+ // }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ .padding({ right: 7,left:28 })
|
|
|
|
|
+ Row(){
|
|
|
|
|
+ Text(this.currentTime)
|
|
|
|
|
+ .fontSize(10)
|
|
|
|
|
+ .fontColor(Color.White)
|
|
|
|
|
+ Blank()
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ Text(this.totalTime)
|
|
|
|
|
+ .fontSize(10)
|
|
|
|
|
+ .fontColor(Color.White)
|
|
|
|
|
+ }
|
|
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
|
|
+ .padding({ right: 18,left:35 })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
//x5的竖屏模式需要99%
|
|
//x5的竖屏模式需要99%
|
|
|
.width('95%')
|
|
.width('95%')
|
|
|
.justifyContent(FlexAlign.Center)
|
|
.justifyContent(FlexAlign.Center)
|
|
|
- .margin({bottom:13})
|
|
|
|
|
|
|
+ .margin({bottom:5})
|
|
|
.animation({
|
|
.animation({
|
|
|
duration: 666,
|
|
duration: 666,
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
curve: 'ease-in-out' // 可选动画曲线
|