TxIceServer class

Represents an ICE server configuration for WebRTC peer connections.

This class mirrors the RTCIceServer structure used in JS and iOS SDKs to ensure cross-platform consistency for TURN/STUN server configuration.

Example usage:

final iceServer = TxIceServer(
  urls: ['turn:turn.example.com:3478?transport=tcp'],
  username: 'user',
  credential: 'password',
);

Constructors

TxIceServer({required List<String> urls, String? username, String? credential})
Creates an ICE server configuration.
const
TxIceServer.fromJson(Map<String, dynamic> json)
Creates a TxIceServer from a JSON map.
factory
TxIceServer.fromUrl(String url, {String? username, String? credential})
Creates a TxIceServer from a single URL string.
factory

Properties

credential String?
The credential (password) for TURN server authentication.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
urls List<String>
The list of STUN/TURN server URLs.
final
username String?
The username for TURN server authentication.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this ICE server to a JSON map.
toString() String
A string representation of this object.
override
toWebRTCMap() Map<String, dynamic>
Converts this ICE server to a map format compatible with flutter_webrtc.

Operators

operator ==(Object other) bool
The equality operator.
override