Skip to content

Cannot setParameters on RTCRtpSender during a meeting #3081

@boussadkh

Description

@boussadkh

What happened and what did you expect to happen?

just reoppening the issue #2947 since i'm facing the same issue. Since the error is thrown by the Chime SDK, I can't confirm the exact cause, but I suspect it may be related to toggling the audio mute/unmute or the camera status

The error

Uncaught (in promise): InvalidStateError: Failed to execute 'setParameters' on 'RTCRtpSender': Failed to set parameters since getParameters() has never been called on this sender

here the code snippet if it can help

setMic(active: boolean) {
    if (!active || this.role === Role.ADMINISTRATOR) {
      this.audioVideo?.realtimeMuteLocalAudio();
    } else {
      // mute and unmute to reset the audio context
      this.audioVideo?.realtimeMuteLocalAudio();
      this.audioVideo?.realtimeUnmuteLocalAudio();
    }
    this._micActive = active;
  }

  toggleMic() {
    const newMicState = !this._micActive;
    this.storeInitialMicStatus(newMicState);
    this.setMic(newMicState);
    this.broadcastDeviceStatus(newMicState, InputDeviceType.MICROPHONE);
  }
```ts


### Have you reviewed our existing documentation?

- [x] GitHub [issues](https://github.com/aws/amazon-chime-sdk-js/issues)
- [x] FAQs [page](https://aws.github.io/amazon-chime-sdk-js/modules/faqs.html)
- [x] README [page](https://github.com/aws/amazon-chime-sdk-js#amazon-chime-sdk-for-javascript)
- [x] Feature-specific [guides](https://github.com/aws/amazon-chime-sdk-js#guides)

### Reproduction steps


create a meeting
Try to toggle mic with realtimeMuteLocalAudio() or realtimeUnmuteLocalAudio()
Try to toggle camera with startLocalVideoTile() or stopLocalVideoTile()
Send the value of the mic / camera with the realtimeSendDataMessage
The error appears randomly 


### Amazon Chime SDK for JavaScript version

3.22.0

### What browsers are you seeing the problem on?

chrome

### Browser version

123

### Meeting and Attendee ID Information.

_No response_

### Browser console logs

Uncaught (in promise): InvalidStateError: Failed to execute 'setParameters' on 'RTCRtpSender': Failed to set parameters since getParameters() has never been called on this sender

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions