diff --git a/windowpiplibrary/src/main/ets/component/VideoPlayComponent.ets b/windowpiplibrary/src/main/ets/component/VideoPlayComponent.ets index 5e59bb04020dc5dfabcd25bdb10e49dc36fdc235..1f40f0519e2462abe49de825152baf8c0afb341f 100644 --- a/windowpiplibrary/src/main/ets/component/VideoPlayComponent.ets +++ b/windowpiplibrary/src/main/ets/component/VideoPlayComponent.ets @@ -219,18 +219,20 @@ export struct VideoPlayComponent { .height($r('app.integer.auto_button_height')) .selectedColor($r('sys.color.brand')) .onChange(async (isOn: boolean) => { - this.isAutoPull = isOn; if (isOn) { if (this.curBp === 'xl') { this.showToast(); return; } - if (!this.pipController) { - await this.createPipController(); - } - this.pipController?.setAutoStartEnabled(this.isAutoPull); - this.hintMsgVisibility = true; } + + this.isAutoPull = isOn; + if (!this.pipController) { + await this.createPipController(); + } + this.pipController?.setAutoStartEnabled(this.isAutoPull); + this.hintMsgVisibility = true; + }) } .width(CommonConstants.FULL_PERCENT)