diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 0d332c6a5669c2e0bd3706139e08060a42206446..10d85025cfcf935fb73dccf93b71e2f787138385 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -31,8 +31,10 @@ export default class EntryAbility extends UIAbility { newBp = 'sm'; } else if (windowWidthVp < 840) { newBp = 'md'; - } else { + } else if (windowWidthVp < 1440) { newBp = 'lg'; + } else { + newBp = 'xl'; } if (this.curBp !== newBp) { this.curBp = newBp; diff --git a/entry/src/main/ets/pages/VideoPlay.ets b/entry/src/main/ets/pages/VideoPlay.ets index ea461d1e0749e2333662ca25be5b1a62af11a3d2..4558d9502b1305224eedcc625b0383922774be19 100644 --- a/entry/src/main/ets/pages/VideoPlay.ets +++ b/entry/src/main/ets/pages/VideoPlay.ets @@ -194,6 +194,19 @@ export struct PlayVideo { Logger.info(`[${TAG}] onActionEvent: ${this.buttonAction} status:${status}}`); } + showToast() { + if (this.curBp === 'xl') { + try { + promptAction.showToast(({ + message: $r('app.string.notsupport'), + duration: 2000 + })); + } catch (error) { + Logger.error(`showToast args error code is ${error.code}, message is ${error.message}}`); + } + } + } + @Builder AutoPip() { Row() { @@ -205,6 +218,7 @@ export struct PlayVideo { .height($r('app.integer.auto_button_height')) .selectedColor($r('sys.color.brand')) .onChange(async (isOn: boolean) => { + this.showToast(); this.isAutoPull = isOn; if (!this.pipController) { await this.createPipController(); @@ -417,16 +431,7 @@ export struct PlayVideo { this.startPip(); this.hintMsgVisibility = true; } - if (deviceInfo.productSeries === 'HYM' || deviceInfo.productSeries === 'HAD') { - try { - promptAction.showToast(({ - message: $r('app.string.notsupport'), - duration: 2000 - })); - } catch (error) { - Logger.error(`showToast args error code is ${error.code}, message is ${error.message}}`); - } - } + this.showToast(); }) } }