新增共享人取消共享屏幕

This commit is contained in:
youngq 2025-02-25 16:42:20 +08:00
parent 7a75025880
commit 505dd42294
2 changed files with 25 additions and 0 deletions

View File

@ -681,6 +681,25 @@ namespace WGShare.API.Controllers.Frontend
await _hubContext.Clients.Group(roomNum).ShowUser(UId, UserName, string.Empty, string.Empty);
}
/// <summary>
/// 共享人取消共享屏幕
/// </summary>
/// <returns></returns>
[HttpPost("stop-shared-screen")]
public async Task StopedSharedScreen([FromQuery] string roomNum)
{
if (RedisHelper.Instance.HGet(RedisKeyConstant.SessionManage.GetChannelShowUserKey(TenantId), roomNum) != ScreenShareId)
{
// 不是共享屏幕的人,不做处理
return;
}
// 设置新的共享屏幕
RedisHelper.Instance.HSet(RedisKeyConstant.SessionManage.GetChannelShowUserKey(TenantId), roomNum, UId);
await _hubContext.Clients.Group(roomNum).StopedSharedScreen(ScreenShareId);
}
#region
/// <summary>
/// 分享上传文件

View File

@ -61,6 +61,12 @@ namespace WGShare.API.Hubs
/// <returns></returns>
Task ShowUser(string uid, string uname, string operUid, string operUserName);
/// <summary>
/// 共享人取消共享屏幕
/// </summary>
/// <returns></returns>
Task StopedSharedScreen(string ScreenShareId);
/// <summary>
/// 用户加入频道回调
/// </summary>