From e6ea885b42b7866b1985fa0e947cbe50ae13c270 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 19 十月 2021 13:27:43 +0800 Subject: [PATCH] 2021-10-19 1.更新萤石库,适配CTQ1P无法扫码配网问题;增加SoftAP热点适配处理前缀和提示。 --- HDL-ON_Android/LeChengVideoActivity.cs | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/HDL-ON_Android/LeChengVideoActivity.cs b/HDL-ON_Android/LeChengVideoActivity.cs index 7cff4e5..94cae4b 100644 --- a/HDL-ON_Android/LeChengVideoActivity.cs +++ b/HDL-ON_Android/LeChengVideoActivity.cs @@ -133,6 +133,8 @@ try { LCOpenSDK_ParamReal paramReal = new LCOpenSDK_ParamReal(AccessToken, DeviceId, 0, Psk, PlayToken, 1, false, true); + //PlayEventListener listener = new PlayEventListener();//瀹炵幇鎾斁浜嬩欢鐩戝惉鍥炶皟 2021-10-15 鐩墠涓嶈兘鐩戝惉锛岀洃鍚簡浼氱┖寮傚父 + //mPlayWindow.WindowListener = listener;//瀹炵幇鎾斁浜嬩欢鐩戝惉鍥炶皟 mPlayWindow.PlayRtspReal(paramReal); } catch (System.Exception e) @@ -147,6 +149,7 @@ public void Stop() { mPlayWindow.StopRtspReal(true);//鍏抽棴瑙嗛 + //mPlayWindow.WindowListener = null; } /// <summary> @@ -210,6 +213,18 @@ } } + ///// <summary> + ///// 鍙戦�佸箍鎾紝閫氱煡鍒锋柊鍥惧簱鐨勬樉绀� + ///// </summary> + ///// <param name="path"></param> + //void SendBroadcastScanFile(Context context, string path) + //{ + // // 鍙戦�佸箍鎾紝閫氱煡鍒锋柊鍥惧簱鐨勬樉绀� + // Intent scanIntent = new Intent(Intent.ActionMediaScannerScanFile); + // scanIntent.SetData(Android.Net.Uri.FromFile(new File(path))); + // context.SendBroadcast(scanIntent); + //} + /// <summary> /// 鎴浘 /// </summary> @@ -221,6 +236,9 @@ int code = mPlayWindow.SnapShot(path); if (code == 0) { + //2021-09-01 澧炲姞鍙戦�佸箍鎾紝閫氱煡鍒锋柊鍥惧簱鐨勬樉绀� + HDLONUtils.SendBroadcastScanFile(this, path); + //Android.Provider.MediaStore.Images.Media.InsertImage(this.getContentResolver(), path, "ss", "ss"); Toast.MakeText(this, Resources.GetString(Resource.String.screenshot_success), ToastLength.Short).Show(); } @@ -333,6 +351,7 @@ try { + System.Console.WriteLine("LC OnTalkResult error锛�" + error + " type:" + type); bool talkResult = false; if (type == 99 || error.Equals("-1000") || error.Equals("0") || error.Equals("1") || error.Equals("3")) { @@ -382,5 +401,19 @@ } } + /// <summary> + /// 鎾斁銆侀瑙堢粨鏋滃洖璋� + /// resultSource: 0--RTSP 1--HLS 5--DHHTTP 99--OPENAPI + /// </summary> + class PlayEventListener : LCOpenSDK_EventListener + { + public override void OnPlayerResult(int index, string code, int resultSource) + { + base.OnPlayerResult(index, code, resultSource); + System.Console.WriteLine("LC OnPlayerResult index锛�" + index + " code:" + code + " resultSource:"+ resultSource); + } + + + } } } -- Gitblit v1.8.0