Skip to content

Commit cff5cb4

Browse files
committed
feat: 增加实例方法
1 parent 0a57f30 commit cff5cb4

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

src/components/BootstrapBlazor.HikVision/Components/HikVision.razor.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected override void OnParametersSet()
8484
/// <param name="password"></param>
8585
/// <param name="loginType"></param>
8686
/// <returns></returns>
87-
public async Task Login(string ip, string port, string userName, string password, LoginType loginType = LoginType.Http)
87+
public async Task Login(string ip, int port, string userName, string password, LoginType loginType = LoginType.Http)
8888
{
8989
await InvokeVoidAsync("login", Id, ip, port, userName, password, (int)loginType);
9090
}
@@ -97,4 +97,22 @@ public async Task Logout()
9797
{
9898
await InvokeVoidAsync("logout", Id);
9999
}
100+
101+
/// <summary>
102+
/// 开始实时预览方法
103+
/// </summary>
104+
/// <returns></returns>
105+
public async Task StartRealPlay()
106+
{
107+
await InvokeVoidAsync("startRealPlay", Id);
108+
}
109+
110+
/// <summary>
111+
/// 停止实时预览方法
112+
/// </summary>
113+
/// <returns></returns>
114+
public async Task StopRealPlay()
115+
{
116+
await InvokeVoidAsync("stopRealPlay", Id);
117+
}
100118
}

0 commit comments

Comments
 (0)