Is it possible to affect these items? Is there a way to speed these processes up?
Is the Zoom team going to improve these processes in the next releases?
Related:
After connecting to the room, the user sees the black screen for 1-3 seconds, and only after that, the stream starts opening.
How can we understand that on the user side, everything is loaded and ready to display the stream?
We tried using the following condition:
We recommend determining the loading state based on the connection-change event. If state='Connected', it indicates that the session has been successfully joined.
We recommend determining the loading state based on the connection-change event. If state='Connected', it indicates that the session has been successfully joined.
We do all this, but this still doesnât work perfectly. After rendering, the user sees a black screen for several seconds, and only after this, the stream starts being displayed. We need a way to determine when everything is loaded on the userâs side and the stream can be displayed immediately, until that, weâll display an animation with the loader to them
Am I getting right that the âpreloadDependentAssetsâ should be called before initializing the client?
Yes. Thatâs correct. Make sure the preloaded assets path is the same as the path used in client.init method.
Any advice on how to do that?
Microphone or camera capture may take some time, especially if it involves granting permissions, making the timing unpredictable.
Therefore, in our implementation, we typically show the userâs display name by default and replace it with their video once the media stream is captured.
Please feel free to reach out to me with any concerns about this.
Hi @vic.yang ,
Could you please watch the video I recorded from Zoom Video SDK web sample?
It shows that after the Safari user gives permission to capture video from the camera, both users on stage see a black screen for a few seconds before the stream starts. We need ways to improve this. The goal is to not display a black screen. That is, after the userâs initials disappear, the stream should immediately start.
We should not show a black screen for a few seconds while the stream is loading
Hi @vic.yang ,
I tried testing Safari in the official WebRTC demo, and got a delay of 4-5 seconds there too.
We need a way to trace when the camera is completely ready and the stream is loaded and ready for being immediately displayed. That is, to show a loader animation to the user instead of a black screen
// Display a loading animation before calling the `stream.startVideo` method
loadingElement.style.display = "block";
try {
await stream.startVideo();
} finally {
// Remove the animation when this method is resolved or rejected.
loadingElement.style.display = "none";
}
Hi @vic.yang ,
This makes sense on the side of the user who uses Safari, but we also need to have a solution on the side of the user who receives the stream from the second user (who uses Safari)
Currently, we do not have a built-in method to achieve this, but it can be done using the command channel. Here is a pseudocode implementation for this requirement:
// On the sender side
const commandChannel = client.getCommandClient();
// Display a loading animation before calling the `stream.startVideo` method
loadingElement.style.display = "block";
commandChannel.send(JSON.stringify({ action: "send video start" }));
try {
await stream.startVideo();
} finally {
// Remove the animation when this method is resolved or rejected.
loadingElement.style.display = "none";
commandChannel.send(JSON.stringify({ action: "send video successfully" }));
}
// On the receive side
client.on("command-channel-message", (payload) => {
const { senderId, text } = payload;
const command = JSON.parse(text ?? "{}");
//Find the user video area corresponding to the senderID; this element has a loading child element.
const loadingElement = document.querySelector(`[video_${senderId}]>.loading`);
if (command.action === "send video start") {
// Display a loading animation
loadingElement.style.display = "block";
} else if (command.action === "send video successfully") {
// Remove the animation
loadingElement.style.display = "none";
}
});