|
|
|
@ -3,6 +3,8 @@ using AksWebBrowser.Common;
|
|
|
|
|
using AksWebBrowser.Devices; |
|
|
|
|
using AKSWebBrowser.Commen; |
|
|
|
|
using CPF; |
|
|
|
|
using CPF.Cef; |
|
|
|
|
using CPF.Controls; |
|
|
|
|
using CPF.Linux; |
|
|
|
|
using CPF.Windows; |
|
|
|
|
using Fleck; |
|
|
|
@ -170,6 +172,10 @@ namespace AksWebBrowser
|
|
|
|
|
case "aks100118": |
|
|
|
|
result = SendSQ(content); |
|
|
|
|
break; |
|
|
|
|
//{"code":"aks100119"} |
|
|
|
|
case "aks100119": |
|
|
|
|
result = ReadByBody(); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"无效指令\"}"; |
|
|
|
|
break; |
|
|
|
@ -671,7 +677,7 @@ namespace AksWebBrowser
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// aks100106指纹 (已国产化,未完成测试) |
|
|
|
|
/// aks100106指纹 (已国产化) |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="paramsString"></param> |
|
|
|
|
/// <returns></returns> |
|
|
|
@ -1075,7 +1081,8 @@ namespace AksWebBrowser
|
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
Task.Run(() => { |
|
|
|
|
Task.Run(() => |
|
|
|
|
{ |
|
|
|
|
// 在你的窗口或应用程序需要时调用 |
|
|
|
|
Bash("/usr/bin/python3 /usr/bin/onboard"); |
|
|
|
|
}); |
|
|
|
@ -1110,9 +1117,16 @@ namespace AksWebBrowser
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
Parame.frm.Invoke(() => |
|
|
|
|
//Parame.frm.Invoke(() => |
|
|
|
|
//{ |
|
|
|
|
// new AksVideoPlayer(Parame.frm, param.title, param.url); |
|
|
|
|
//}); |
|
|
|
|
Task.Run(() => |
|
|
|
|
{ |
|
|
|
|
new AksVideoPlayer(Parame.frm, param.title, param.url); |
|
|
|
|
string command = $"pkill ffplay"; |
|
|
|
|
ShllCommad(command); |
|
|
|
|
command = $"ffplay -fs -autoexit -window_title {param.title} -i {param.url}"; |
|
|
|
|
ShllCommad(command); |
|
|
|
|
}); |
|
|
|
|
string result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"message\":\"success\",\"code\":\"200\",\"status\":true,\"suffix\":\"jpg\",\"data\":\"" + "播放成功" + "\"}"; |
|
|
|
|
SubmitLogs(result, "playVideo"); |
|
|
|
@ -2228,5 +2242,48 @@ namespace AksWebBrowser
|
|
|
|
|
process.WaitForExit(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static string ReadByBody() |
|
|
|
|
{ |
|
|
|
|
Task.Run(async () => |
|
|
|
|
{ |
|
|
|
|
GetReadBody(); |
|
|
|
|
}); |
|
|
|
|
@event11.WaitOne(); |
|
|
|
|
return body; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 读取业务数据 |
|
|
|
|
/// </summary> |
|
|
|
|
private static string body = string.Empty; |
|
|
|
|
private static AutoResetEvent @event11 = new AutoResetEvent(false); |
|
|
|
|
private static async void GetReadBody() |
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
var httpClient = new HttpClient(); |
|
|
|
|
var uploader = new ChunkedUpload(httpClient); |
|
|
|
|
body = await uploader.ReadBody(); |
|
|
|
|
@event11.Set(); |
|
|
|
|
} |
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
Log.Error("读取业务数据异常:" + ex.Message); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[JSFunction] |
|
|
|
|
public void test33(string code) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parame.frm.Invoke(() => |
|
|
|
|
{ |
|
|
|
|
new AksVideoPlayer(Parame.frm, "rrr", "http://192.168.0.34:92/CaseFile/card/2024-06-03/20240603120112952.mp4"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|