omnitalk_sdk 2.0.3 copy "omnitalk_sdk: ^2.0.3" to clipboard
omnitalk_sdk: ^2.0.3 copied to clipboard

simple and easy flutter sdk for real time communication using WebRTC

example/omnitalk_sdk_example.dart

import 'package:omnitalk_sdk/omnitalk_sdk.dart';

Omnitalk.sdkInit(
        serviceId: 'Service Id', serviceKey: 'Service Key');
Omnitalk omnitalk = Omnitalk.getInstance();

await omnitalk.getPermission();

await omnitalk.createSession(userId: userId);

await omnitalk.createRoom(roomType: RoomType.videoroom);

await omnitalk.joinRoom(roomId: roomId);

await omnitalk.publish(localRenderer: localVideo);

await omnitalk.subscribe(
          publisherSession: publisherSession!, remoteRenderer: remoteVideo);

await omnitalk.offerCall(
       callType: CallType.videocall,callee: callee!,record: false, localRenderer: localVideo, remoteRenderer: remoteVideo);

await omnitalk.answerCall(
      callType:  CallType.videocall,caller: caller,localRenderer: localVideo,remoteRenderer: remoteVideo);
   
await omnitalk.makeSipNum();

await omnitalk.offerCall(callType: CallType.sipcall,callee: SipCallee);

await omnitalk.sendMessage(action: MessageAction.send, message: message!);

await omnitalk.leave();

await omnitalk.kickout(target);