interface TrackContextEvents {
    encodingChanged: (context: TrackContext) => void;
    voiceActivityChanged: (context: TrackContext) => void;
}

Properties

encodingChanged: (context: TrackContext) => void

Emitted each time track encoding has changed.

Track encoding can change in the following cases:

  • when user requested a change
  • when sender stopped sending some encoding (because of bandwidth change)
  • when receiver doesn't have enough bandwidth

Some of those reasons are indicated in TrackContext.encodingReason.

voiceActivityChanged: (context: TrackContext) => void

Emitted every time an update about voice activity is received from the server.