ServerClient class
Server client for fetching configuration and tokens from the server
Constructors
- ServerClient({required String baseUrl})
Properties
Methods
-
clearCache(
) → void - Clear cached configuration
-
generateToken(
{required String appId, required String apiKey, required String roomName, required String userId, String? username, String? avatarUrl, Map< String, dynamic> ? metadata, bool canPublish = true, bool canSubscribe = true, bool canPublishData = true, int expiresIn = 21600}) → Future<Map< String, dynamic> > - Generate a token from the server
-
getActiveSessions(
{String? appId}) → Future< List< Map< >String, dynamic> > -
Get active sessions/rooms
appId- Optional appId to filter sessions (for future SaaS use) -
getConfig(
{bool forceRefresh = false}) → Future< Map< String, String> > - Get server configuration (serverUrl and apiKey) Caches the result for subsequent calls
-
getRoomAnalytics(
String roomName) → Future< Map< String, dynamic> > -
Get detailed analytics for a specific room
roomName- Name of the room -
getRoomsAnalytics(
{String? appId}) → Future< Map< String, dynamic> > -
Get analytics summary for all active rooms
appId- Optional appId to filter rooms (for future SaaS use) -
muteParticipantAudio(
String roomName, String participantId) → Future< Map< String, dynamic> > -
Mute a participant's audio track (server-side authorization)
roomName- Name of the roomparticipantId- Identity of the participant to mute -
muteParticipantVideo(
String roomName, String participantId) → Future< Map< String, dynamic> > -
Mute a participant's video track (server-side authorization)
roomName- Name of the roomparticipantId- Identity of the participant to mute -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
terminateAllSessions(
{String? appId}) → Future< Map< String, dynamic> > -
Terminate all active sessions
appId- Optional appId to filter sessions before terminating (for future SaaS use) -
terminateSession(
String roomName) → Future< void> -
Terminate a specific session/room
roomName- Name of the room to terminate -
toString(
) → String -
A string representation of this object.
inherited
-
unmuteParticipantAudio(
String roomName, String participantId) → Future< Map< String, dynamic> > -
Unmute a participant's audio track (server-side authorization)
roomName- Name of the roomparticipantId- Identity of the participant to unmute -
unmuteParticipantVideo(
String roomName, String participantId) → Future< Map< String, dynamic> > -
Unmute a participant's video track (server-side authorization)
roomName- Name of the roomparticipantId- Identity of the participant to unmute
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited