Hi, in my app I create several video containers and video elements within them. When the meeting enters “MEETING_STATUS_DISCONNECTING” state, I destroy all my elements in this order:
I call DestroyAllVideoElement() to remove all elements within a container
I call DestroyVideoContainer() on all containers
This works well when I end the meeting with the SDK call to Leave().
If I instead I end the meeting with an API call to “DELETE /meetings/{meetingId}” I receive a “MEETING_STATUS_DISCONNECTING” state notification, and as explained above I call “DestroyAllVideoElement()”. This freezes my app and causes an exception.
Apart from signaling the bug, I have a question:
If I want to destroy the container do I need to destroy all elements before or can I directly destroy the container without causing leaks/problems?
Thanks for the post. The DestroyAllVideoElement() only deletes the corresponding objects inside our SDK, it won’t cause app freeze. Please note that: using DestroyVideoContainer() will not trigger DestroyAllVideoElement() so you will need to call them separately. If any of them is missing, then it could cause issues.
Ok thanks @carson.zoom, so I need to understand how to make the call to “DestroyAllVideoElement()” work. As said, the call works when the meeting is terminated with a call to Leave(). It instead does not work when the meeting is terminated by a call to the Zoom API.
Thanks for the reply. Please try not to use Zoom API to end/delete Zoom meetings when using Zoom SDK. If you would like to delete a meeting, please end the meeting using Zoom SDK, and then you could call the Zoom API to delete the meeting.
Hi @carson.zoom,
I’m not sure I can do what I need using just the SDK. I want to stop “unused” sessions from my back-end. This cover several cases, ex: the service administrator wants to terminate a meeting (but he’s not a host), the meeting exceeded the time we want to allow, etc. In this case, I use this API endpoint:
PUT /meetings/{meetingId}/status <-- end
I think this is the exact scope the API has been created for…
In any case I think it should behave well with people in meeting using the SDK.
Thanks for the reply. For the use case you are mentioning, such as the admin would like to end the meeting remotely or the meeting exceeded the allowed time, you could have a try to have a listener listening to a call from your backend. Once the callback is triggered and the current user is a host, call the leave meeting interface to end the meeting.
Ok, but it is a bit more complex have a mobile app listen for an event from API. It’s not impossible but requires some more infrastructure and have no guarantee that the mobile app will actually receive the message. Ex: the app crashed, is suspended, etc.
Understand. Thanks for sharing this. However, using the API to terminate a meeting is not recommended since they are not designed to be used in this way. So we cannot guarantee results and there might be issues happening such as the one you are mentioning in this topic.
I do not want to make this longer than needed, but I think there is a specific API endpoint for terminating a training:
The status can only be set to “end” and this terminates a meeting. What’s its correct use case than if not to end a meeting? It seems to be its only purpose. Also you cannot know reliably how many people are still in.
Hi @tommy, thanks for answering. Given that the purpose of that API call is to end a running meeting, the fact that is causes clients connected with Windows SDK to misbehave as described above can be considered a bug of the SDK? I think so…
@tommy I have to beg your pardon. I re-read my first post and noticed the error. In my backend code, first I call the “Update Meeting Status (End Meeting)” then the “Delete Meeting” (for scheduled meetings that will not be automatically deleted).
No, still not working. I just made a wrong initial post, but the code I use is as described. My backend calls “Update Meeting Status”, then “Delete Meeting” (the call to “Delete Meeting” is irrilevant here, just told about it to give some context).
The main problem is that the call to “Update Meeting Status” does cause all my connected clients to disconnect, but the all clients crash since the call to “DestroyAllVideoElement” fails with this exception:
System.AccessViolationException: ‘Attempted to read or write protected memory. This is often an indication that other memory is corrupt.’
Notice that the same call has not problem if the meeting is terminated by another participant. The code calls exactly the same method, but without errors.
I will have our engineering team look into this. So I have enough information to send to them, can you share which SDK you are using, as well as the version number?