famedlysdk/lib/src/utils/turn_server_credentials.dart

24 lines
603 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
2020-03-19 14:39:18 +00:00
final double ttl;
2020-01-04 18:36:17 +00:00
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'];
}