Platform

Platform

  • Getting Started
  • API

›IOS SDK

Getting Started

  • Create Your App

Quick Starts

  • 555 Samples

Mobile SDK (v1.0)

  • Overview
  • IOS SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to initiate or accept video call
    • How to set log level for SDK
    • Release Notes

    Android SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to initiate or accept video call
    • How to set log level for SDK
    • Release Notes

Mobile SDK (v2.0)

  • Overview
  • IOS SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to initiate or accept VIDEO call
    • How to initiate or join ANONYMOUS VIDEO call
    • Release Notes
    • Reference code - How to initiate or accept PSTN Call
    • Reference code - How to initiate or accept Video Call
    • Reference code - How to initiate or join Anonymous Video Call

    Android SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to intiate or accept Video Call
    • How to intiate or accept ANONYMOUS VIDEO Call
    • Release Notes
    • Reference code - How to initiate or accept PSTN Call
    • Reference code - How to initiate or accept Video Call
    • Reference code - How to initiate or join Anonymous Video Call

    React Native SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • Release Notes

WebRTC JS SDK

  • Overview
  • Getting Started
  • How to do user authentication
  • How to subscribe for notifications
  • How to initialize SDK
  • How to initiate or accept PSTN call
  • How to initiate or accept video call
  • How to create a screen share session
  • Release Notes

ANONYMOUS VIDEO Call

RTC 555 iOS SDK supports ANONYMOUS VIDEO call. It supports Multi-party video conference feature, where multiple participants can join the same call. Also supports on-call features such as mute/unmute audio/video, and flip camera.

Before initiating or joining an Anonymous VIDEO call, you need to login anonymously.

SDK initialization

Below API initializes and sets the context for the SDK. It is advisable to call this API at the launch of the application.

Rtc555Sdk.initializeLibrary()

Adding SDK configuration.

To make anonymous video related API call, SDK should have below mentioned mandatory configuration data to establish a connection with the 555 platform backend.

let config:Rtc555Config = Rtc555Sdk.sharedInstance.getConfig()
config.routingId = "<random uuid used for anonymous login>@<appdomain>" 
config.url = "https://evm.iris.comcast.net" // Event manager URL
config.token = "<555 JWT token>" // JWT token for accessing the 555 SDK/backend APIs. Token can be accessed from the 555 anonymous login response. 
config.domain = "uciris12.comcast.net" // *Optional 
config.isAnonymous = true // Set it to true for anonymous video call.

Rtc555Sdk.setConfig(config: config)

Create Stream

To make a anonymous video related API call, you need to create a stream that will provide you with the local stream id required for anonymous video call APIs. To create stream, pass callType & Rtc555VideoDelegate to createStream API.

Rtc555Video.createStream(callType: callType, rtcVideoDelegate: self)
ParametersTypeDescription
callTypestringPass any non-empty string for anonymous video call
rtcVideoDelegateRtc555VideoDelegateDelegate object for getting local stream Id

Initiate or Join Anonymous Video Call

To initiate or join an anonymous video call, pass a target room name which can be any name provided by the user, local stream id & Rtc555VideoDelegate to anonymousCall API.

NOTE: For multiple users to join the same call, the target room name has to be the same.

anonymousCall API returns enum Result. Success case of result will return call id and failure case return error code and reason for the error.

Rtc555Video.anonymousCall(targetRoomName: roomName, streamId: localStreamId, rtcVideoDelegate: self) { result in
            switch(result){
            case .success(let callId):
                print("Anonymous call Success. \(callId)")
            case .failure(let error):
                print("Anonymous call Failed with error \(error)")
            }
        }
ParametersTypeDescription
targetRoomNamestringRoom name provided by the user
streamIdstringlocal stream ID received from onLocalStream delegate
rtcVideoDelegateRtc555VideoDelegateDelegate object for getting remote stream Id, call status and error callback

Leave an Active Anonymous Video Call

Users need to call hangup API to leave the anonymous call.

Rtc555Video.hangup(callId: callId)
ParametersDescription
callIdcallId is a unique id for the call which was returned from anonymousCall API

Clean up the session.

Call the below API in Rtc555Sdk to release all the resources used by SDK. This call also allows the client to disconnect from the 555 platform backend. The app developer should call this API if the app goes to the background or kill state to release the SDK resource. Client need to call setConfig API again before attempting to initiate/accept the call.

Rtc555Sdk.cleanup()

Callkit Support

Callkit in client requires below API calls from SDK

Initialize Audio Unit

This API call allows users to manually initialize Audio Unit while using CallKit. The user needs to call this before starting/joining the call.

Rtc555Voice.initilizeManualAudio(audioManual: Bool)
ParametersTypeDescription
audioManualBoolPass Yes to initilize Audio unit Manually

Activate/Deactive Audio Unit

This API is only effective if initilizeManualAudio is YES. This API call allows users to activate/deactivate audio while using callkit. Need to call this API in provider(:didActivate:) delegate and provider(:didDeactivate:) delegate.

Rtc555Voice.enableAudio(enableAudio: Bool)

//Usage :: Callkit delegates
func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) {
    Rtc555Voice.enableAudio(enableAudio: false)
}

func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) {
    Rtc555Voice.enableAudio(enableAudio: true)
}
ParametersTypeDescription
enableAudioBoolPass Yes or No to start /stop the Audio unit

Video On-call Features

Features offered by iOS SDK for Video call are:

  • Toggle Audio Mute
  • Toggle Video Mute
  • Flip Camera

Toggle Audio Mute

This API call allows the users to mute and unmute its audio in the call.

Rtc555Video.audioMuteToggle(callId: callId)
ParametersDescription
callIdcallId is a unique id for this call which was returned from call/accept API

Toggle Video Mute

This API call allows the user to mute and unmute its video in the call.

Rtc555Video.videoMuteToggle(callId: callId)
ParametersDescription
callIdcallId is a unique id for this call which was returned from call/accept API

Flip Camera

This API call allows users to flip between the front and rear camera of the device. ​

Rtc555Video.flipCamera()

Video Call Delegates

To get local stream Id, remote stream Id, and call status or error report during the call, Rtc555VideoDelegate is passed to the call/accept API call. This delegate provides the below callbacks.

onLocalStream

This callback gets invoked when we receive the local stream id which is required to make/accept the call. This local stream can be used to render local video on the device screen using RtcRenderer.

    func onLocalStream(streamId mediastreamId: String) {
    }
ParametersDescription
streamIdLocal Stream Id

onParticipantJoined

This callback gets invoked when the participant joins the call. Stream ID can be used to render the remote video on the device screen using RtcRenderer.

    func onParticipantJoined(streamId:streamId, participantId: participantId) {
    }
ParametersDescription
streamIdRemote Stream Id
participantIdId of participant who joined the call

onParticipantLeft

This callback gets invoked when the participant leaves the call.

    func onParticipantLeft(participantId: participantId) {
    }
ParametersDescription
participantIdId of participant who left the call

onDominantSpeakerChanged

This callback gets invoked when the participant is actively speaking.

    func onDominantSpeakerChanged(participantId: participantId) {
    }
ParametersDescription
participantIdId of actively speaking particiapnt in the call

onStatus

This callback gets invoked when we receive the status of the ongoing call.

    func onStatus(status callStatus: CallStatus,id callId:String) {
         
     }
ParametersDescription
callStatusstatus of ongoing call
callIdCall id for the ongoing call

Call Status:

  • initializing   -   When the call is initializing
  • connecting   -   When the call is connecting i.e. when remote party is ringing.
  • connected    -   When the call is connected and media(video) started transferring.
  • disconnected  -   When the call is disconnected i.e. when remote side hang up the call.

onError

This callback gets invoked when we receive an error from an ongoing video call.

    func onError(error errorInfo: Error,id callId:String) {
         
     }
ParametersDescription
errorInfoerror object consists of error code and error message
callIdcallId received from backend

Video Call Renderer

The video call renderer referred to as RtcRenderer provided by the Rtc555Sdk is used to render the video on the UI using stream id from Local Stream and Remote Stream.

Initilize RtcRenderer

To initialize, you need to pass the size of the View which needs to render the video stream. After that, you need to add the videoView variable of RtcRenderer to the UIView.

//Local
var localRenderer = RtcRenderer(frameSize: self.localView.bounds)
self.localView.insertSubview(localRenderer.videoView)

//Remote
var remoteRenderer = RtcRenderer(frameSize: self.remoteView.bounds)
self.remoteView.insertSubview(remoteRenderer.videoView)
ParametersDescription
frameSizesize of the rendering UIView

Add Stream

This API adds the Stream id received from Local Stream and Remote Stream to local/remote RtcRenderer.

self.localRenderer.addStream(streamId: localStreamId)
self.remoteRenderer.addStream(streamId: remoteStreamId)
ParametersDescription
streamIdStream Id received from onLocalStream/onRemoteStream
← How to initiate or accept VIDEO callRelease Notes →
  • SDK initialization
  • Adding SDK configuration.
  • Create Stream
  • Initiate or Join Anonymous Video Call
  • Leave an Active Anonymous Video Call
  • Clean up the session.
  • Callkit Support
    • Initialize Audio Unit
    • Activate/Deactive Audio Unit
  • Video On-call Features
    • Toggle Audio Mute
    • Toggle Video Mute
    • Flip Camera
  • Video Call Delegates
    • onLocalStream
    • onParticipantJoined
    • onParticipantLeft
    • onDominantSpeakerChanged
    • onStatus
    • onError
  • Video Call Renderer
    • Initilize RtcRenderer
    • Add Stream
Docs
Getting StartedGuidesAPI Reference
More
BlogGitHub
555 Platform
Copyright © 2024 555 Platform ™
555docs-v0.0.94