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

simple and easy flutter sdk for real time communication using WebRTC

Omnitalk FLUTTER SDK #


옴니톡은 webRTC 표준 기술을 이용하여 app에서 쉽고 간편하게 실시간 통신을 구현할 수 있는 SDK입니다.



Feature Overview #

feature implemented ios android
Audio Call ✔️ ✔️ ✔️
Video Call ✔️ ✔️ ✔️
Sip Call ✔️ ✔️ ✔️
Chatting ✔️ ✔️ ✔️
Audio Conference ✔️ ✔️ ✔️
Video Conference ✔️ ✔️ ✔️
AudioMute ✔️ ✔️ ✔️
VideoMute ✔️ ✔️ ✔️
Video Switch ✔️ ✔️ ✔️

Pre-Requisite #

  • 서비스 아이디 & 옴니톡 서비스 키

    • 옴니톡 홈페이지 를 방문하여 서비스 id와 서비스 key를 발급받아야 합니다.
    • 혹은 이곳 에서 1시간 동안 무료로 사용 가능한 테스트용 id, key를 발급받을 수 있습니다.

  • 최소 지원 사양

    • Flutter >= 3.1.0
    • Dart >= 2.19
    • Android API >=21
    • IOS>= 11


Getting Started #

상세한 사용법은 여기를 참고하시면 됩니다.

  1. Installation

    import 'package:omnitalk_sdk/omnitalk_sdk.dart';
    
  2. 옴니톡 객체 생성

    발급받은 Service Id와 Service Key로 omnitalk 객체를 생성합니다.

    Omnitalk.sdkInit(
        serviceId: 'Service Id', serviceKey: 'Service Key');
    Omnitalk omnitalk = Omnitalk.getInstance();
    
  3. 세션 생성

    await omnitalk.createSession(userId: userId);
    
  4. 룸 생성

    인수로 전달한 룸 타입의 방을 생성합니다.

    await omnitalk.createRoom(roomType: RoomType.videoroom);
    
  5. 룸 참여

    룸에 참여하게 되면 자동으로 오디오 방송을 시작하고 채팅 메시지를 주고 받을 수 있는 상태가 됩니다.

    await omnitalk.joinRoom(roomId: roomId);
    
  6. 방송 시작 (video)

    오디오 방송은 룸에 참여하는 것만으로 시작 가능하며 영상 방송은 자신의 방송 영상 스트림을 담을 객체를 전달해 방송을 발행하는 것으로 시작합니다.

    await omnitalk.publish(localRenderer: localVideo);
    
  7. 이벤트 메시지 수신 옴니톡 SDK에서 전달하는 이벤트 메시지 규격과 메시지 수신 방법은 여기를 참고하시기 바랍니다.

    omnitalk.on('event', eventListener);
    
    
  8. 방송 구독 구독하고자는 방송의 세션 id를 인수로 전달하면 해당 방송을 구독할 수 있습니다.

    await omnitalk.subscribe(
          publisherSession: publisherSession!, remoteRenderer: remoteVideo);
    
  9. 음성 통화 1:1 음성 통화를 구현하기 위한 발신 기능은 offerCall API와 answerCall API를 이용하여 간단히 구현할 수 있습니다. 상세 구현 가이드는 여기를 참조바랍니다.

    await omnitalk.offerCall(
       callType: CallType.audiocall,callee: callee);
       
    await omnitalk.answerCall();
      
    
  10. 영상 통화 1:1 영상 통화를 구현하기 위한 발신 기능은 offerCall API와 answerCall API를 이용하여 간단히 구현할 수 있습니다. 상세 구현 가이드는 여기를 참조바랍니다.

    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);
    
  11. 채팅 메시지

    룸(타입 무관)에 참여하게 되면 채팅 메시지를 주고 받을 수 있습니다.

    await omnitalk.sendMessage(action: MessageAction.send, message: message!);
    
    
  12. 방송 종료

    await omnitalk.leave();
    

Documentation #

쉽고 자세한 문서를 제공하고 있습니다.


Issue #

옴니톡을 사용하면서 발생하는 이슈나 궁금점은 issue 페이지를 이용해 주세요.

Example Projects #

옴니톡 SDK로 구현된 간단한 기능 테스트 데모를 제공합니다.