From 20b87386ddf5d0ec138d4242f85b473c53010c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=BD=87=E9=98=B3?= Date: Tue, 4 Jun 2024 13:54:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=84=AA=E5=8C=96=E8=A6=96=E9=A0=BB=E6=92=AD?= =?UTF-8?q?=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CPF_Cef/AKS.EnterpriseLibrary.WebBrowser.csproj | 1 + CPF_Cef/AksVideoPlayer.cs | 4 ++-- CPF_Cef/MainModel.cs | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CPF_Cef/AKS.EnterpriseLibrary.WebBrowser.csproj b/CPF_Cef/AKS.EnterpriseLibrary.WebBrowser.csproj index a9873f8..1146162 100644 --- a/CPF_Cef/AKS.EnterpriseLibrary.WebBrowser.csproj +++ b/CPF_Cef/AKS.EnterpriseLibrary.WebBrowser.csproj @@ -43,6 +43,7 @@ + diff --git a/CPF_Cef/AksVideoPlayer.cs b/CPF_Cef/AksVideoPlayer.cs index 5448a83..4d3db6b 100644 --- a/CPF_Cef/AksVideoPlayer.cs +++ b/CPF_Cef/AksVideoPlayer.cs @@ -60,8 +60,8 @@ namespace AKS.EnterpriseLibrary.WebBrowser { IsAntiAlias = true; CornerRadius = "3,3,3,3"; - Height = "80%"; - Width = "70%"; + Height = "600"; + Width = "800"; Background = "#2c2c2c"; ZIndex = 100; Children.Add(new TextBlock diff --git a/CPF_Cef/MainModel.cs b/CPF_Cef/MainModel.cs index 46a51b2..f8b63b1 100644 --- a/CPF_Cef/MainModel.cs +++ b/CPF_Cef/MainModel.cs @@ -658,12 +658,15 @@ namespace AKS.EnterpriseLibrary.WebBrowser }); if (!isFuncisFuncObject("playVideo")) { - + return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "视频播放设备未授权使用" + "\"}"; } else { - new AksVideoPlayer(Parame.frm, param.title, param.url); + Parame.frm.Invoke(() => + { + new AksVideoPlayer(Parame.frm, param.title, param.url); + }); string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + "播放成功" + "\"}"; SubmitLogs(result, "playVideo"); return result;