famedlysdk/lib/src/utils/turn_server_credentials.dart

24 lines
600 B
Dart
Raw Normal View History

2020-01-04 18:36:17 +00:00
/// Credentials for the client to use when initiating calls.
class TurnServerCredentials {
/// The username to use.
final String username;
/// The password to use.
final String password;
/// A list of TURN URIs
final List<String> uris;
/// The time-to-live in seconds
final int ttl;
const TurnServerCredentials(
this.username, this.password, this.uris, this.ttl);
TurnServerCredentials.fromJson(Map<String, dynamic> json)
: username = json['username'],
password = json['password'],
uris = json['uris'].cast<String>(),
ttl = json['ttl'];
}