Key capability

Voice & video

Add one-to-one voice and video calls using Lanying chat for signalling and the platform voice & video SDK for media.

A call has two coordinated paths: chat carries call, answer, and hang-up signalling; the voice & video engine joins the room and publishes or subscribes to media streams. Integrate and test chat first, then add the media SDK for your platform.

Integration sequence

  1. Enable voice & video for the application in the Lanying console.
  2. Complete the platform chat quick start and verify sign-in plus message delivery.
  3. Add floo-rtc-ios or floo-rtc-android; on Web, add webrtc-adapter and jquery alongside floo-web.
  4. Create the local and remote render surfaces and register engine callbacks.
  5. Send call signalling through the SDK's voice & video service, then join the room with the returned authorization data.
  6. Publish local audio or video, subscribe to the remote stream, and always leave and release listeners when the call ends.

Responsibilities by layer

LayerResponsibilities
Chat signallingCall invitation, answer, rejection, hang-up, offline notification, call ID, and room metadata.
Voice & video engineDevice access, room join/leave, publish/unpublish, subscribe/unsubscribe, mute, rendering, and media callbacks.
Your UIPermission prompts, ringing state, timers, route changes, device controls, reconnection, and error recovery.

Web API lifecycle

PhasertcManage methods
Set upinitRTCEngine(params), joinRoom(params)
Mediapublish(type, hasVideo, hasAudio), subscribe(sources)
ControlsmuteLocalAudio(mute), muteLocalVideo(mute), muteRemoteAudio(stream, mute), muteRemoteVideo(stream, mute)
Tear downunPublish(), unSubscribe(id), leaveRoom(), destroy()
Request microphone and camera permission before joining a room, and release tracks, render views, listeners, and engine resources on every exit path—including rejection, timeout, navigation, and network failure.

Production checklist

  • Handle permission denial and audio-only fallback explicitly.
  • Prevent duplicate answers by treating the call ID as the stable identity of a call.
  • Test interruption by phone calls, Bluetooth changes, backgrounding, and network handover.
  • Keep signalling state and media-engine state separate so either side can recover cleanly.
  • Use physical devices for final audio-route, echo, camera, and notification testing.