Description
When my video client connects and other users are already in the room,
I want to display their camera streams, of course.
If I get more than 1 user, I’ll want to rearrange the video position on canvas.
PROBLEM
if there are 2+ streams already running when a new client joins, that new
client will have to run stream.adjustRenderedVideoPosition
However, doing so right after connecting results in an error.
**Only after the console says **
Open_Audio_WebSocket_Connect
consume interval 3
does it work.
Is there a way for me to detect that?
Browser Console Error
here is the error that’s caught attempting to run stream.adjustRenderedVideoPosition
reason: "userId is not correct"
type: "INVALID_PARAMETERS"
The thing is, after the console says
http://localhost:8081/public/zoomlib/video_mtsimd.min.js
js_media.min.js:1 sharing decode fileURL: http://localhost:8081/public/zoomlib/sharing_mtsimd.min.js
ready to start!
ready to start!
ready to dec video!
ready to dec video!
Open_Sharing_WebSocket_Connect
Open_Sharing_WebSocket_Connect
Open_Video_WebSocket_Connect
Open_Video_WebSocket_Connect
JsAudioDec.js receive startMedia
JsAudioDec.js receive startMedia
Open_Audio_WebSocket_Connect
Open_Audio_WebSocket_Connect
consume interval 3
the same code runs without problems.
Which Web Video SDK version?
1.1.5
Video SDK Code Snippets
The code snippets that are causing the error / issue so we can reproduce.
(running VueJS)
initClient() {
this.client = ZoomVideo.createClient();
this.client.init('en-US', window.location.origin + '/public/zoomlib');
this.addClientEventHandlers();
},
this.initClient();
let signature = await this.fetchToken();
this.client.join(this.topic, signature, this.username, this.password)
.then( async (data) => {
// this.addClientEventHandlers();
this.stream = this.client.getMediaStream();
this.chat = this.client.getChatClient();
this.ses.info = this.client.getSessionInfo();
})
.catch((error) => {
});
from here: client.on(‘user-updated’)
if new user to render > start render
right after render, I call stream.adjustRenderedVideoPosition
with the correct coordinates
To Reproduce(If applicable)
Screenshots
If applicable, add screenshots to help explain your problem.
Device (please complete the following information):
- Device: Mac Mini, PC, Macbook, other PC
- OS: MacOS11, Windows 10
- Browser: Chrome
- Browser Version 95
Additional context
Add any other context about the problem here.