Understood.
Facing one issue in the command channel,
Calling the send function with the userId in the user-added event throws an error of
can’t find userId 33555456
but the given userId is already in the session.
Understood.
Facing one issue in the command channel,
Calling the send function with the userId in the user-added event throws an error of
can’t find userId 33555456
but the given userId is already in the session.
Hey @vk-jangid
Thanks for reporting this issue.
We will fix this issue in the next release.
For now, wrapping the commandChannel.send()
into a setTimeout callback will be the workaround. This only applies to the case of sending the message in the user-added
event callback.
Thanks
Vic
I tried with setTimeout for 1 second and it still threw an error of “can’t find userId”
Then I tried setTimeout with 2 seconds and now it’s working.
can this be varied depending on the network speed and the laptop configuration?
As if someone who has a low network speed and low laptop configuration, then will this send function require more time to be successfully sent to the other participants?
How to handle the case, when a user is on speakerOnly mode and sharing the screen with the tab audio, how can we switch from tab audio to microphone audio?
Cannot stop audio during sharing with audio
Hey @vk-jangid
Yes. It depends on the network speed.
In the next release, we will handle inside Video SDK. For now, in my opinion, 3 seconds is enough as the workaround.
Thanks
Vic
Ok, What about this?
Hey @vk-jangid
Things got a bit complex when involving the speakerOnly
option. But there are still solutions for this case.
As our document mentioned, tab audio and microphone cannot work at the same time, So when in the sharing tab audio mode, first you should mute the shared audio. The Video SDK will recover the computer audio(microphone and speaker) automatically, but before starting sharing, the audio was connected without the microphone, thus, if you would like to speak, you should call stopAudio()
and startAudio()
one after another. Following are the codes about this process:
// join the audio without mic
await stream.startAudio({speakerOnly:true});
//start screen share with tab audio
await stream.startShareScreen(....)
// First, mute the shared audio
await stream.muteShareAudio();
// Then rejoin the audio to speak
await stream.stopAudio();
await stream.startAudio();
Thanks
Vic
Ok, will try this.
Also, why peer-video-state-change events are coming with { action: ‘Stop’ } when the users are joining the session?
Hey @vk-jangid
Regarding the “Stop” events as the redundancy events, “Stop” means “OFF” in some measure.
Thanks
Vic
I am just asking that when the users are joining, the default state of the camera is off only, then why the events are coming?
In reality, there are no changes with camera, that’s why I am asking.
Hey @vk-jangid
Sorry for not explaining very well.
I mean this event will be more redundant, not only when the video state changes will trigger the event. You can diff with the local state or just call the client.getAllUser()
to get the latest user state.
Thanks
Vic
Started testing on iPad now and till now faced 2 issues -
TypeError: Right side of an assignment cannot be destructured
Hey @vk-jangid
On iPadOS, it’s unnecessary to listen to the media-sdk-change
event to take care of the initialization of the media workers, only in the case of the desktop Safari, we need to pay attention to it. so we don’t trigger the event.
I cannot reproduce the issue. Could you share the code snippets if convenient? By the way, on iPadOS or iOS, sharing tab audio is not supported.
Thanks
Vic
Hi @vic.yang
Got it, will handle the media-sdk-change event accordingly.
Yes, I am aware that on iOS, the sharing tab audio doesn’t work, but the function shouldn’t throw an error as well, so just thought that I should let you know.
This below statement creates an error of TypeError: Right side of an assignment cannot be destructured
const shareAudioData = mediaStream.getShareAudioStatus();
Hey @vk-jangid
Which version of the Video SDK Web are you using? I cannot reproduce the issue in the latest version(1.5.1).
Thanks
Vic
I am using version 1.5.0 . I just checked, and this update was released only yesterday.
Will update and check again for that issue.
Also, are any of the issues I reported recently fixed in this release?
Hey @vk-jangid
I just checked version 1.5.0. It works.
Did you miss the brackets when calling the getShareAudioStatus
method? So it returns the function itself, and cannot be destructured.
Thanks
Vic
No, I didn’t miss any brackets.
As I added a snippet in the above chat, that is the same statement from my code. Also I tested it with the updated version as well on iPad but still it is throwing an error.
Also, calling startAudio with or without speakerOnly key is throwing an error in the iPad after joining the session.
{type: “INVALID_OPERATION”, reason: “Module:audio is not enabled”}
I am using the 15.5 version and the browser is Safari.