黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using System;
 
namespace Shared.Phone.VideoPhone
{
    public static class ESVideo
    {
 
        public static void InitESVideoSDK()
        {
            //ESVideo.InitESVideoSDK();
        }
 
        /// <summary>
        /// 监控页面
        /// </summary>
        /// <param name="mESVideoInfo"></param>
        public static void ShowESVideoMonitor(ESVideoInfo mESVideoInfo)
        {
#if Android
            Android.Content.Intent intent = new Android.Content.Intent(Application.Activity, typeof(GateWay.Droid.VideoActivity));
            intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);//室外机的名称,例,室外机
            intent.PutExtra("ESRoomID", mESVideoInfo.ESRoomID);//当前用户的房间 ID
            intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);//室外机UUID,例:JJY000007FSEYX
            intent.PutExtra("IsCollect", mESVideoInfo.IsCollect);//是否收藏
            intent.PutExtra("RoomName", mESVideoInfo.RoomName);//房间命名,例 8栋1单元0801
            intent.AddFlags(Android.Content.ActivityFlags.NewTask);
            intent.PutExtra("Type", 0);//类型,0 监控,1反呼
            Application.Activity.StartActivity(intent);
#endif
        }
 
        /// <summary>
        /// 被呼叫页面
        /// </summary>
        /// <param name="mESVideoInfo"></param>
        public static void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo)
        {
#if Android
            Android.Content.Intent intent = new Android.Content.Intent(Application.Activity, typeof(GateWay.Droid.VideoActivity));
            intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);//室外机的名称,例,室外机
            intent.PutExtra("ESRoomID", mESVideoInfo.ESRoomID);//当前用户的房间 ID
            intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);//室外机UUID,例:JJY000007FSEYX
            intent.PutExtra("IsCollect", mESVideoInfo.IsCollect);//是否收藏
            intent.PutExtra("RoomName", mESVideoInfo.RoomName);//房间命名,例 8栋1单元0801
            intent.PutExtra("Type", 1);//类型,0 监控,1反呼
            Application.Activity.StartActivity(intent);
#endif
        }
    }
 
    public class ESVideoInfo
    {
        /// <summary>
        /// 室外机的UUID
        /// 例:JJY000007FSEYX
        /// </summary>
        public string ESVideoUUID = string.Empty;
        /// <summary>
        /// 当前用户的房间ID
        /// 例:0801
        /// </summary>
        public int ESRoomID;
        /// <summary>
        /// 室外机的名称
        /// 例:室外机
        /// </summary>
        public string DeviceName = string.Empty;
        /// <summary>
        /// 房间命名
        /// 例:8栋1单元0801
        /// </summary>
        public string RoomName = string.Empty;
        /// <summary>
        /// 是否收藏
        /// </summary>
        public bool IsCollect;
 
    }
 
 
}