Platform

Platform

  • Getting Started
  • API

›Android 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

Rtc555 Android SDK supports ANONYMOUS VIDEO calls between its users. 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 accepting a Anonymous Video call, you have to logged in anonymously to 555 platform.

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. Pass application context to the API.

        Rtc555Sdk.initializeLibrary(getApplication());
ParametersDescription
appContextApplication context

Adding SDK configuration

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

        Rtc555Config config = Rtc555Sdk.getInstance().getConfig();
        config.routingId = "<random uuid used for anonymous login>@<appdomain>" 
        config.url = "<EVM_URL>" // Event manager URL
        config.token = "<555 JWT token>" // JWT token for accessing the 555 SDK/backend APIs. Token can be access from the 555 anonymous login response. 
        config.domain = "uciris12.comcast.net"
        config.isAnonymous = true // Set it to true for anonymous video call.

        Rtc555Sdk.setConfig(config);

Create Stream

To make video call first you need to create stream which will provide you the local stream id that is used in video call APIs. We need to pass Rtc555VideoObserver as parameter.

On calling createStream API, user will get local stream id on onLocalStream callback.

 Rtc555Video.createStream(Rtc555VideoObserver observer);
ParametersDescription
observerRtc555VideoObserver

Make Anonymous Video Call

To make an Anonymous call first you need to login anonymously and set SDK configuration. Then you need to pass a target id which can be any room name as given by the user and stream id to anonymousCall API. For two users to join the same call the target id has to be same.

The API also needs an instance of RTC555Result observer which provides onSuccess and onError callbacks.

anonymousCall API returns a single value response. Success case of response will return call-Id (Unique identifier for the call). On failure it returns Rtc555Exception object.

Rtc555Video.anonymousCall("<room-name>",streamId, observer, new Rtc555Result() {
            @Override
            public void onSuccess(String callId) {
                Log.d(TAG, callId);
            }

            @Override
            public void onError(Rtc555Exception e) {
                Log.d(TAG, e.getMessage());
                e.printStackTrace();
            }
        });
ParametersDescription
roomNameRoom name given by the user
streamIdLocal Stream Id
observerRtc555VideoObserver
Rtc555ResultInstance of observer which gives success or failue callback

End an Active Video Call

Users need to invoke hangup API to end the active call.

  Rtc555Video.hangup(String callId);
ParametersDescription
callIdcallId is unique id for this call which was returned from call/accept API

Clean up the session.

Call below API in Rtc555Sdk to release all the resources used by SDK. This call also allows the client to disconnect with 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();

Video On-call Features

Features offered by Android SDK for Video call are:

  • Toggle Audio Mute
  • Toggle Video Mute
  • Flip Camera

Toggle Audio Mute

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

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

Toggle Video Mute

This API call allows users to mute and unmute its video stream in the ongoing call.

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

Flip Camera

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

    Rtc555Video.flipCamera();

Video Call Callbacks

To get local stream, remote stream, call status or error report implement Rtc555VideoObserver interface and initialize the observer and pass in call / anonymousCall / accept API

onLocalStream

This callback gets is used to get local stream id which is required to make call and accept call. This stream can be used to render in the device screen using Rtc555Renderer

    public void onLocalStream(String s);
ParametersDescription
streamIdLocal Stream Id

onRemoteStream

This callback gets is used to get stream id of remote participant which is used to render remote video in the current user's screen using Rtc555Renderer

    public void onRemoteStream(String s);
ParametersDescription
streamIdRemote Stream Id

onParticipantJoined

This callback is used to get stream id and participant id when a remote participant joined the room.

    public void onParticipantJoined(String streamId, String id);
ParametersDescription
streamIdRemote Stream Id
idParticipant Id

onParticipantLeft

This callback is used to get participant id when a remote participant left the room.

    public void onParticipantLeft(String id);
ParametersDescription
idParticipant Id

onDominantSpeakerChanged

This callback is used to get participant id when a remote participant is actively speaking.

    public void onDominantSpeakerChanged(String id);
ParametersDescription
idParticipant Id

onStatus

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

    void onStatus(Rtc555Sdk.CallStatus callStatus, String callId);
ParametersDescription
statusstatus of ongoing call
callIdCall id for the ongoing call

Call Status:

  • connected    -   When the call is connected and media(video stream) started transffering.
  • disconnected  -   When the call is disconnected i.e. when remote side hang up the call.

onError

This callback gets invoked when we receives Rtc555Exception from an ongoing Video call.

    void onError(Rtc555Exception rtc555Exception, String callId);
ParametersDescription
rtc555Exceptionerror object consists of error code and error message
callIdcallId received from backend

Video Call Renderer

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

To initialize you need to pass the height and width of the View where we need to render the video stream. After that you have to add the rootView variable of Rtc555Renderer in the layout View of the UI (Use FrameLayout for best result). You need to create two instances of Rtc555Renderer, one for Local and one for Remote.

Rtc555Renderer renderer = new Rtc555Renderer(width, height);
yourFrameLayout.addView(renderer.rootView);
ParametersDescription
widthWidth of the rendering View
heightHeight of the rendering View

addStream

This API is used to add the Stream id receive from Local Stream and Remote Stream in the Rtc555Renderer

void addStream(streamId, activity); 
ParametersDescription
streamIdStream Id
activityAndroid Activity
← How to intiate or accept Video CallRelease Notes →
  • SDK initialization
  • Adding SDK configuration
  • Create Stream
  • Make Anonymous Video Call
  • End an Active Video Call
  • Clean up the session.
  • Video On-call Features
    • Toggle Audio Mute
    • Toggle Video Mute
    • Flip Camera
  • Video Call Callbacks
    • onLocalStream
    • onRemoteStream
    • onParticipantJoined
    • onParticipantLeft
    • onDominantSpeakerChanged
    • onStatus
    • onError
  • Video Call Renderer
    • addStream
Docs
Getting StartedGuidesAPI Reference
More
BlogGitHub
555 Platform
Copyright © 2024 555 Platform ™
555docs-v0.0.94