Skip to content

Commit

Permalink
(fix): macos and iphone worked
Browse files Browse the repository at this point in the history
  • Loading branch information
adwpc committed Oct 21, 2021
1 parent faa17e9 commit e1a038b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/controllers/ion_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,35 @@ class IonController extends GetxController {
{required String host,
required String room,
required String name}) async {
print('IonController setup');
_connector = new Connector(host);
_room = new Room(_connector!);
_rtc = new RTC(_connector!);
_sid = room;
_name = name;
print('IonController setup ok');
}

connect() async {
await _room!.connect();
await _rtc!.connect();
print('IonController connect()');
}

joinROOM() async {
// _room!.join(sid: _sid, uid: _uid, info: {'name': '$_name'});
_room!.join(
peer: Peer()
..sid = _sid
..uid = _uid);
..uid = _uid
..displayname = _uid
..extrainfo = []
..destination = ''
..role = Role.HOST
..direction = Direction.BILATERAL
..protocol = Protocol.WEBRTC
..avatar = ''
..vendor = '');
print('joinROOM ' + 'sid=' + sid + ' uid=' + uid);
}

joinRTC() async {
Expand Down

0 comments on commit e1a038b

Please sign in to comment.