From 7b94710517b4d66d28a88dab3b02af63e7c9bc5c Mon Sep 17 00:00:00 2001 From: wpp <58198665+879356503@users.noreply.github.com> Date: Mon, 26 May 2025 23:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=BB=E4=B8=AD=E7=94=BB=E4=B8=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81PC=EF=BC=8C=E6=B7=BB=E5=8A=A0toast?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/VideoPlay.ets | 13 ++++++++++++- entry/src/main/resources/base/element/string.json | 4 ++++ entry/src/main/resources/en_US/element/string.json | 4 ++++ entry/src/main/resources/zh_CN/element/string.json | 4 ++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/entry/src/main/ets/pages/VideoPlay.ets b/entry/src/main/ets/pages/VideoPlay.ets index c587f60..5afe211 100644 --- a/entry/src/main/ets/pages/VideoPlay.ets +++ b/entry/src/main/ets/pages/VideoPlay.ets @@ -13,10 +13,11 @@ * limitations under the License. */ -import { PiPWindow } from '@kit.ArkUI'; +import { PiPWindow, promptAction } from '@kit.ArkUI'; import { Constants } from '../constants/Constants'; import { AVPlayer } from './AVPlayer'; import Logger from '../utils/Logger'; +import { deviceInfo } from '@kit.BasicServicesKit'; const TAG = Constants.NAV_DESTINATION_NAME; @@ -416,6 +417,16 @@ export struct PlayVideo { this.startPip(); this.hintMsgVisibility = true; } + if (deviceInfo.productSeries === 'HYM' || deviceInfo.productSeries === 'HAD') { + try { + promptAction.showToast(({ + message: '', + duration: 2000 + })) + } catch (error) { + Logger.error(`showToast args error code is ${error.code}, message is ${error.message}}`); + } + } }) } } diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index 272977c..a52d21f 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -99,6 +99,10 @@ { "name": "current_error_hint", "value": "Without" + }, + { + "name": "notsupport", + "value": "PC Does Not Support Picture-in-picture" } ] } \ No newline at end of file diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json index 272977c..a52d21f 100644 --- a/entry/src/main/resources/en_US/element/string.json +++ b/entry/src/main/resources/en_US/element/string.json @@ -99,6 +99,10 @@ { "name": "current_error_hint", "value": "Without" + }, + { + "name": "notsupport", + "value": "PC Does Not Support Picture-in-picture" } ] } \ No newline at end of file diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json index a06655a..1790767 100644 --- a/entry/src/main/resources/zh_CN/element/string.json +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -99,6 +99,10 @@ { "name": "current_error_hint", "value": "无" + }, + { + "name": "notsupport", + "value": "PC暂时不支持画中画" } ] } \ No newline at end of file -- Gitee