|
|
@@ -203,7 +203,7 @@ export struct LocalMusic {
|
|
|
@StorageProp('topRectHeight') topRectHeight: number = px2vp(AppUtil.getStatusBarHeight());
|
|
|
@StorageProp('windowWidth') windowWidth: number = 0;
|
|
|
@StorageProp('windowHeight') windowHeight: number = 0;
|
|
|
- @StorageProp('windowHeight') isHiCarStatus: boolean = false;
|
|
|
+ @StorageProp('isHiCarStatus') isHiCarStatus: boolean = false;
|
|
|
private listArea: Area = {
|
|
|
width: 0,
|
|
|
height: 0,
|
|
|
@@ -603,7 +603,7 @@ export struct LocalMusic {
|
|
|
this.longPressSpeed = PreferencesUtil.getNumberSync(SettingPage.LONG_PRESS_SPEED, 3)
|
|
|
this.isPlayListBgGrass = PreferencesUtil.getBooleanSync(SettingPage.IS_PLAYLIST_BG_GRASS, true)
|
|
|
this.isShowHeader = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_HEADER, true)
|
|
|
-
|
|
|
+ this.volume = PreferencesUtil.getNumberSync('DefalutVolume', this.volume)
|
|
|
//如果是hicar连接状态,这些都是false
|
|
|
if(this.isHiCarStatus){
|
|
|
this.isShowTitleBar = false//不显示导航栏
|
|
|
@@ -5918,7 +5918,7 @@ export struct LocalMusic {
|
|
|
private positionX: number = PlayConstants.POSITION_X;
|
|
|
private positionY: number = PlayConstants.POSITION_Y;
|
|
|
private windowClass: window.Window = globalThis.windowClass
|
|
|
- @State volume: number = 1;
|
|
|
+ @State volume: number = 0.5;
|
|
|
@State volumeShow: boolean = PlayConstants.VOLUME_SHOW;
|
|
|
@State bright: number = PlayConstants.BRIGHT;
|
|
|
@State brightShow: boolean = PlayConstants.BRIGHT_SHOW;
|
|
|
@@ -8301,6 +8301,7 @@ export struct LocalMusic {
|
|
|
.onChange((value: number) => {
|
|
|
this.volume = value;
|
|
|
this.mIjkMediaPlayer.setVolume(this.volume.toString(), this.volume.toString());
|
|
|
+ PreferencesUtil.putSync('DefalutVolume',this.volume)
|
|
|
})
|
|
|
.layoutWeight(1)
|
|
|
Blank()
|
|
|
@@ -9154,8 +9155,12 @@ export struct LocalMusic {
|
|
|
this.mIjkMediaPlayer.setDebug(false);
|
|
|
//初始化配置
|
|
|
this.mIjkMediaPlayer.native_setup();
|
|
|
- // 初始化配置后需要重新设置音频流音量,否则音量为默认值1.0
|
|
|
- this.mIjkMediaPlayer.setVolume(this.volume.toString(), this.volume.toString());
|
|
|
+ // 初始化配置后需要重新设置音频流音量,否则音量为默认值1.0 针对dsf格式设置最大值1.0
|
|
|
+ if(this.videoUrl.toLowerCase().endsWith('.dsf')){
|
|
|
+ this.mIjkMediaPlayer.setVolume('1', '1');
|
|
|
+ }else{
|
|
|
+ this.mIjkMediaPlayer.setVolume(this.volume.toString(), this.volume.toString());
|
|
|
+ }
|
|
|
//设置视频源
|
|
|
this.mIjkMediaPlayer.setDataSource(url);
|
|
|
//设置视频源http请求头
|