- @agent
+ @agent.AgentName -> @agent.UserType.ToString()
-
@@ -42,7 +42,7 @@
@code{
- private List
agents = new List();
+ private IEnumerable agents = new List();
HubConnection connection;
string imageSource = null;
@@ -52,9 +52,9 @@
{
await _connection.InitConnection(ConnectionType.Server);
connection = await _connection.GetConnection();
-
+
connection.On>("RecData", OnStreamDataReceived);
-
+ agents = await connection.InvokeAsync>("GetListOfTypeUser",ConnectionType.Client);
//connection.On("NewScreenCastAgent", NewScreenCastAgent);
//connection.On("RemoveScreenCastAgent", RemoveScreenCastAgent);
//connection.On("OnStreamDataReceived", OnStreamDataReceived);
@@ -67,19 +67,6 @@
return agentName == CurrentViewCastAgent;
}
- void NewScreenCastAgent(string agentName)
- {
- agents.Add(agentName);
- StateHasChanged();
- }
-
- void RemoveScreenCastAgent(string agentName)
- {
- agents.Remove(agentName);
- imageSource = null;
- CurrentViewCastAgent = null;
- StateHasChanged();
- }
async void OnStreamDataReceived(IAsyncEnumerable streamData)
{
@@ -95,13 +82,13 @@
private async Task OnViewCastClicked(string agentName)
{
CurrentViewCastAgent = agentName;
- await connection.InvokeAsync("Start", agentName);
+ await connection.InvokeAsync("Startstream", agentName);
}
private async Task OnStopViewCastClicked(string agentName)
{
CurrentViewCastAgent = null;
- await connection.InvokeAsync("RemoveScreenCastViewer", agentName);
+ await connection.InvokeAsync("Stopstream", agentName);
imageSource = null;
StateHasChanged();
}
diff --git a/Squirrowse.Web/Properties/launchSettings.json b/Squirrowse.Web/Properties/launchSettings.json
index 220ace8..3c49e20 100644
--- a/Squirrowse.Web/Properties/launchSettings.json
+++ b/Squirrowse.Web/Properties/launchSettings.json
@@ -18,7 +18,7 @@
"Squirrowse.Web": {
"commandName": "Project",
"launchBrowser": true,
- "applicationUrl": "https://localhost:5001;http://localhost:5000",
+ "applicationUrl": "https://localhost:5003;http://localhost:5002",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
diff --git a/Squirrowse.Web/Squirrowse.Web.csproj b/Squirrowse.Web/Squirrowse.Web.csproj
index 13cf113..effcb92 100644
--- a/Squirrowse.Web/Squirrowse.Web.csproj
+++ b/Squirrowse.Web/Squirrowse.Web.csproj
@@ -12,4 +12,10 @@
+
+
+ Always
+
+
+