Agora-Unreal-RTC-SDK icon indicating copy to clipboard operation
Agora-Unreal-RTC-SDK copied to clipboard

Disable screen share when joining/leaving

Open Shumaro211 opened this issue 2 years ago • 5 comments

Hello and thank you so much for helping!, I could share my computer's audio without my mic.

But now I notice that when someone joins and leaves while sharing, the video widget stops or freeze and I need to stop sharing and share again to fix it.

I can code something to share again, but is it normal? I guess is related to the AgoraVideoWidget class, because there is only one client using the ScreenShareVideo.

Is there something you think I can check to make sure the clients are not running something that might interfer with the connection? I just run the project in the editor to share the video and in a build in another computer to make sure is not related to a replication problem running code in the machine is sharing.

Shumaro211 avatar Sep 01 '23 22:09 Shumaro211

  1. 【When someone joins and leaves】: you can check what you did in the onUserJoined or onUserOffline functions. I ran the examples with UE4.27, and the Video Widget won't freeze.
  2. You can check the example link here: https://github.com/AgoraIO-Extensions/Agora-Unreal-RTC-SDK/tree/main/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/Advanced/ScreenShare ↗
  3. Make sure you use the right frame, you could check onCaptureVideoFrame in VideoObserverInternal.h to debug

WinterPu avatar Sep 04 '23 09:09 WinterPu

well I don't have those funtions, I'm using a version from the beggining of this year: image These are the functions I have, I hope to be able to replace the code without any problems, and that can solve my problem.

Shumaro211 avatar Sep 05 '23 19:09 Shumaro211

I could compile with the new code and plugin.

But now is crashing when I play or I try to build, I tried to run the template you provide some days ago and the same happened, the crash log when playing doesn't say that much (unhandled exception) but this is the build crash. image

But let me ask, not sure if my problem about the disconnection is because of using an old version, maybe if you changed something in the backed, if you think using the new code would help I just need to solve those errors, if not I don't know what would be the problem with the old code.

Shumaro211 avatar Sep 06 '23 00:09 Shumaro211

Let's solve this one by one. Firstly, it's better to compile the project with UE4.27 for now. The shader-related case is currently not compatible with UE5. Secondly, you can try to find the agorasdk.log file at the following path: C:\Users\admin\AppData\Local\Agora\UE4Editor-Win64-DebugGame.

WinterPu avatar Sep 08 '23 02:09 WinterPu

Using the 4.27 is not the best option. It was working with the old code, are those problems related to something new? or is it possible to disable something? I just need the audio, screen share and video widget functionalities, nothing else, the only issue is when someone leaves and join a video channel the video freezes.

I have many folders in that path with older dates, I'm gonna run everything to see if a new log is created.

Shumaro211 avatar Sep 08 '23 02:09 Shumaro211