|
@@ -208,6 +208,7 @@ export struct LocalMusic {
|
|
|
@StorageProp('windowWidth') windowWidth: number = 0;
|
|
@StorageProp('windowWidth') windowWidth: number = 0;
|
|
|
@StorageProp('windowHeight') windowHeight: number = 0;
|
|
@StorageProp('windowHeight') windowHeight: number = 0;
|
|
|
@StorageProp('isHiCarStatus') isHiCarStatus: boolean = false;
|
|
@StorageProp('isHiCarStatus') isHiCarStatus: boolean = false;
|
|
|
|
|
+ @StorageProp('curDisplayIsHiCar') curDisplayIsHiCar: boolean = false;
|
|
|
private UNKONWN:string = '';
|
|
private UNKONWN:string = '';
|
|
|
private listArea: Area = {
|
|
private listArea: Area = {
|
|
|
width: 0,
|
|
width: 0,
|
|
@@ -550,7 +551,7 @@ export struct LocalMusic {
|
|
|
let viewHeight = px2vp(size.height);
|
|
let viewHeight = px2vp(size.height);
|
|
|
if(this.isPhoneLan()){
|
|
if(this.isPhoneLan()){
|
|
|
this.is_auto_hide_progress = false
|
|
this.is_auto_hide_progress = false
|
|
|
- if(this.isHiCarStatus){
|
|
|
|
|
|
|
+ if(this.isHiCar()){
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -571,7 +572,7 @@ export struct LocalMusic {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
startAutoHide() {
|
|
startAutoHide() {
|
|
|
- if(this.isHiCarStatus){
|
|
|
|
|
|
|
+ if(this.isHiCar()){
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if(PreferencesUtil.getBooleanSync(SettingPage.IS_AUTO_HIDE_PROGRESS,false)){
|
|
if(PreferencesUtil.getBooleanSync(SettingPage.IS_AUTO_HIDE_PROGRESS,false)){
|
|
@@ -627,7 +628,7 @@ export struct LocalMusic {
|
|
|
this.isSwipe = PreferencesUtil.getBooleanSync(SettingPage.IS_SWIPE, true)
|
|
this.isSwipe = PreferencesUtil.getBooleanSync(SettingPage.IS_SWIPE, true)
|
|
|
this.openSkipSongAnimate = PreferencesUtil.getBooleanSync(SettingPage.OPEN_SKIPSONG_ANIMATE, true)
|
|
this.openSkipSongAnimate = PreferencesUtil.getBooleanSync(SettingPage.OPEN_SKIPSONG_ANIMATE, true)
|
|
|
//如果是hicar连接状态,这些都是false
|
|
//如果是hicar连接状态,这些都是false
|
|
|
- if(this.isHiCarStatus){
|
|
|
|
|
|
|
+ if(this.isHiCar()){
|
|
|
this.isShowTitleBar = false//不显示导航栏
|
|
this.isShowTitleBar = false//不显示导航栏
|
|
|
if(!(this.windowWidth>1800&&this.windowHeight>=1200))//小屏幕不可以Grid
|
|
if(!(this.windowWidth>1800&&this.windowHeight>=1200))//小屏幕不可以Grid
|
|
|
{
|
|
{
|
|
@@ -5942,7 +5943,7 @@ export struct LocalMusic {
|
|
|
LogUtil.info('hicar isPhoneLan height= ' + this.windowHeight);
|
|
LogUtil.info('hicar isPhoneLan height= ' + this.windowHeight);
|
|
|
LogUtil.info(`twocold hicarWindow size: ${this.windowWidth}x${this.windowHeight}, this.isHiCarStatus: ${this.isHiCarStatus}`);
|
|
LogUtil.info(`twocold hicarWindow size: ${this.windowWidth}x${this.windowHeight}, this.isHiCarStatus: ${this.isHiCarStatus}`);
|
|
|
LogUtil.info(`twocold hicar Window size: ${this.windowWidth}x${this.windowHeight}, isHiCarSmall: ${this.isHiCarSmall()}`);
|
|
LogUtil.info(`twocold hicar Window size: ${this.windowWidth}x${this.windowHeight}, isHiCarSmall: ${this.isHiCarSmall()}`);
|
|
|
- if (this.isHiCarStatus) {
|
|
|
|
|
|
|
+ if (this.isHiCar()) {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -5971,7 +5972,7 @@ export struct LocalMusic {
|
|
|
LogUtil.info('twocold Math.abs(currentRatio - hiCarRatio.ratio)= ' + Math.abs(currentRatio - hiCarRatio.ratio))
|
|
LogUtil.info('twocold Math.abs(currentRatio - hiCarRatio.ratio)= ' + Math.abs(currentRatio - hiCarRatio.ratio))
|
|
|
if (Math.abs(currentRatio - hiCarRatio.ratio) <= RATIO_TOLERANCE) {
|
|
if (Math.abs(currentRatio - hiCarRatio.ratio) <= RATIO_TOLERANCE) {
|
|
|
// LogUtil.info(`HiCar detected: ${hiCarRatio.name}, actual: ${this.windowWidth}x${this.windowHeight}`);
|
|
// LogUtil.info(`HiCar detected: ${hiCarRatio.name}, actual: ${this.windowWidth}x${this.windowHeight}`);
|
|
|
- return true&&this.isHiCarStatus;
|
|
|
|
|
|
|
+ return true&&this.isHiCar();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -6009,31 +6010,8 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
isHiCar() {
|
|
isHiCar() {
|
|
|
|
|
|
|
|
- return this.isHiCarStatus;
|
|
|
|
|
-
|
|
|
|
|
- // const hiCarAspectRatios: HiCarAspectRatio[] = [
|
|
|
|
|
- // { ratio: 800 / 480, name: "800x480" },
|
|
|
|
|
- // { ratio: 762 / 752, name: "762x752" },
|
|
|
|
|
- // { ratio: 968 / 1280, name: "968x1280" },
|
|
|
|
|
- // { ratio: 1200 / 1200, name: "1200x1200" },
|
|
|
|
|
- // { ratio: 1280 / 720, name: "1280x720" },
|
|
|
|
|
- // { ratio: 1920 / 720, name: "1920x720" },
|
|
|
|
|
- // { ratio: 1920 / 1080, name: "1920x1080" }
|
|
|
|
|
- // ];
|
|
|
|
|
- // const currentRatio: number = this.windowWidth / this.windowHeight;
|
|
|
|
|
- // const RATIO_TOLERANCE: number = 0.18; // 宽高比容差
|
|
|
|
|
- // LogUtil.info('twocold currentRatio = ' + currentRatio)
|
|
|
|
|
- //
|
|
|
|
|
- // for (const hiCarRatio of hiCarAspectRatios) {
|
|
|
|
|
- // LogUtil.info('twocold hiCarRatio= ' + hiCarRatio.ratio)
|
|
|
|
|
- // LogUtil.info('twocold Math.abs(currentRatio - hiCarRatio.ratio)= ' + Math.abs(currentRatio - hiCarRatio.ratio))
|
|
|
|
|
- // if (Math.abs(currentRatio - hiCarRatio.ratio) <= RATIO_TOLERANCE) {
|
|
|
|
|
- // // LogUtil.info(`HiCar detected: ${hiCarRatio.name}, actual: ${this.windowWidth}x${this.windowHeight}`);
|
|
|
|
|
- // return true&&this.isHiCarStatus;
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- //
|
|
|
|
|
- // return false;
|
|
|
|
|
|
|
+ return this.isHiCarStatus&&this.curDisplayIsHiCar;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -6217,7 +6195,7 @@ export struct LocalMusic {
|
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
|
|
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
// this.startAutoHide()
|
|
// this.startAutoHide()
|
|
|
- if(this.isHiCarStatus)
|
|
|
|
|
|
|
+ if(this.isHiCar())
|
|
|
return
|
|
return
|
|
|
if(this.is_auto_hide_progress){
|
|
if(this.is_auto_hide_progress){
|
|
|
this.is_auto_hide_progress = false
|
|
this.is_auto_hide_progress = false
|