Skip to content

Backup codec publish robustness follow-ups (from #1159 review) #1162

Description

@hiroshihorie

Deferred items from the #1159 review, none urgent since #1159 removed the paths that made the first two reachable.

  • No rollback when backup codec publish fails mid flight. addSimulcastTrack inserts into simulcastCodecs before createSimulcastTransceiverSender, a failure leaves the entry with a null sender and the codec will not retry until unpublish or full reconnect. Same structure exists in JS.
  • addSimulcastTrack throws on duplicate where JS logs and skips. Porting JS behavior means a nullable return (breaking API per dart-apitool) or an idempotent skip, needs a small design decision and its own test.
  • Consider restartTrack() during rePublishAllTracks like JS, to recover capture after device sleep.
  • Integration test that unpublish and full reconnect actually invoke clearSimulcastState (needs mock e2e container video publish support).

Cross SDK findings worth reporting upstream while porting this cleanup:

  • JS gates its simulcast cleanup on trackSender non null and PC state, so the stale state fixed by Clear simulcast codec state on unpublish and full reconnect #1159 is reachable there too (LocalParticipant.ts unpublishTrack).
  • Android never clears simulcastCodecs at all.
    Both fail silently because their duplicate handling skips instead of throwing, the backup codec just never republishes.

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