Case study · MTS Link, Media Core · renegotiation

Fixed the “black screen” and a connection leak

A renegotiation race blanked out video and connections leaked. A top recurring Sentry error is gone.

Outcome A top recurring Sentry error — gone

Context

The same client WebRTC library at MTS Link, Media Core team. The error was widespread and kept piling up in Sentry.

Problem

Participants lost video: instead of the other person they saw a “black screen”. The cause was a race condition during renegotiation. On top of that, connections were leaking.

What renegotiation is

It’s a fresh offer/answer exchange on an already established WebRTC connection, triggered when the set of media tracks changes. If two of these exchanges overlap, the connection state can drift away from what the UI expects. This is a general explanation of the mechanism, not a description of the company’s code.

What I did

Eliminated the renegotiation race and the connection leak.

Result

A top recurring Sentry error — gone.

Implementation details are the company’s internal code. Happy to talk through the approach in person.

Talk it through · Telegram