producers/socket_receive_methods/session_replaced library

Constants

sessionReplacedMessage → const String
Message shown when a newer connection of this participant took over.

Functions

sessionReplaced(SessionReplacedOptions options) → Future<void>
Handles the media server's session-replaced event (servers with participant-rejoin-v1): another tab, device or a reload of this participant took over, and the server closes this connection right after. Shows "You joined from another tab or device." with a "Use this one" action, and never rejoins on its own.
wasSessionReplaced({Duration within = const Duration(seconds: 15)}) → bool
True shortly after session-replaced arrived. The disconnect that follows is then expected: no generic "disconnected" alert, and never an automatic rejoin (which would push the other connection out in turn).

Typedefs

SessionReplacedType = Future<void> Function(SessionReplacedOptions options)