onPlayersCreated property
Called whenever a player is created, or when a new agent joins and receives a list of active players. If an agent is restored, it will receive the full list of player ids and all events again.
Implementation
Stream<List<PlayerId>> get onPlayersCreated => _client.onEvent
.where((event) => event.name == 'Media.playersCreated')
.map((event) => (event.parameters['players'] as List)
.map((e) => PlayerId.fromJson(e as String))
.toList());