From 075c87d832e3eaaf393d533b0a6fd840d0d9fc42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=BD=87=E9=98=B3?= Date: Fri, 28 Jun 2024 09:38:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=8E=9F=E8=A7=86=E9=A2=91=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E4=B8=8A=E9=9D=A2=20=E4=BF=AE=E6=94=B9=E6=88=90?= =?UTF-8?q?=E5=85=A8=E5=B1=8F=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CPF_Cef/AksVideoPlayer.cs | 31 ++++++++++--------- .../Common/WebSocketClientWithHeartbeat.cs | 2 -- CPF_Cef/MainModel.cs | 25 +++++++-------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/CPF_Cef/AksVideoPlayer.cs b/CPF_Cef/AksVideoPlayer.cs index ff482c4..622548d 100644 --- a/CPF_Cef/AksVideoPlayer.cs +++ b/CPF_Cef/AksVideoPlayer.cs @@ -24,13 +24,15 @@ namespace AksWebBrowser { Name = "player", PresenterFor = this, - MarginTop = 50, + MarginTop = 750, Size = SizeField.Fill, - Background = Color.Silver + Background = Color.Silver, + Height=600, }; videoTitle = _videoTitle; url = _url; this.window = window; + window.Children.Add(mask); window.Children.Add(this); mask.TransitionValue(a => a.Background, "0,0,0,100", TimeSpan.FromSeconds(0.3), null, AnimateMode.Linear); @@ -47,10 +49,11 @@ namespace AksWebBrowser { IsAntiAlias = true; CornerRadius = "3,3,3,3"; - Height = "320"; - Width = "640"; + Height = "1920"; + Width = "1080"; Background = "#2c2c2c"; ZIndex = 100; + //WindowState = WindowState = WindowState.FullScreen; Children.Add(new TextBlock { MarginRight = 12f, @@ -80,16 +83,16 @@ namespace AksWebBrowser } }); - //Children.Add(new TextBlock - //{ - // FontSize = 16f, - // MarginLeft = 12.6f, - // MarginTop = 9.6f, - // Classes = "imgAndText", - // Foreground = Color.White, - // // Text = videoTitle, - // FontFamily = "微软雅黑", - //}); + Children.Add(new TextBlock + { + FontSize = 16f, + MarginLeft = 12.6f, + MarginTop = 9.6f, + Classes = "imgAndText", + Foreground = Color.White, + Text = videoTitle, + FontFamily = "微软雅黑", + }); Children.Add(vplayer); } diff --git a/CPF_Cef/Common/WebSocketClientWithHeartbeat.cs b/CPF_Cef/Common/WebSocketClientWithHeartbeat.cs index 3bb5e60..9050adf 100644 --- a/CPF_Cef/Common/WebSocketClientWithHeartbeat.cs +++ b/CPF_Cef/Common/WebSocketClientWithHeartbeat.cs @@ -199,8 +199,6 @@ namespace AksWebBrowser.Common } } - - //打开串口 private void OnTimedEvent(Object source, ElapsedEventArgs e) { diff --git a/CPF_Cef/MainModel.cs b/CPF_Cef/MainModel.cs index 24a4d64..43984c7 100644 --- a/CPF_Cef/MainModel.cs +++ b/CPF_Cef/MainModel.cs @@ -1116,17 +1116,17 @@ namespace AksWebBrowser } else { - //Parame.frm.Invoke(() => - //{ - // new AksVideoPlayer(Parame.frm, param.title, param.url); - //}); - Task.Run(() => + Parame.frm.Invoke(() => { - string command = $"pkill vlc"; - ShllCommad(command); - command = $"vlc --overlay --video-on-top --fullscreen --video-title={param.title} {param.url}"; - ShllCommad(command); + new AksVideoPlayer(Parame.frm, param.title, param.url); }); + //Task.Run(() => + //{ + // //string command = $"pkill ffplay "; + // //ShllCommad(command); + // string command = $"ffplay -autoexit -showmode 0 -x 800 -y 600 -fs -window-title {param.title} {param.url}"; + // ShllCommad(command); + //}); string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + "播放成功" + "\"}"; SubmitLogs(result, "playVideo"); return result; @@ -1648,7 +1648,6 @@ namespace AksWebBrowser //Log.Error("签字版异常:" + ex.Message); } } - private static string ttsStr = string.Empty; /// /// 文字转语音 @@ -2033,6 +2032,7 @@ namespace AksWebBrowser } return tempFile; } + /// /// 是否已获取收取 /// @@ -2241,8 +2241,7 @@ namespace AksWebBrowser process.WaitForExit(); } } - - + public static string ReadByBody() { Task.Run(async () => @@ -2252,7 +2251,7 @@ namespace AksWebBrowser @event11.WaitOne(); return body; } - + /// /// 读取业务数据 ///