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
- Enable voice & video for the application in the Lanying console.
- Complete the platform chat quick start and verify sign-in plus message delivery.
- Add floo-rtc-ios or floo-rtc-android; on Web, add webrtc-adapter and jquery alongside floo-web.
- Create the local and remote render surfaces and register engine callbacks.
- Send call signalling through the SDK's voice & video service, then join the room with the returned authorization data.
- Publish local audio or video, subscribe to the remote stream, and always leave and release listeners when the call ends.
Responsibilities by layer
| Layer | Responsibilities |
|---|---|
| Chat signalling | Call invitation, answer, rejection, hang-up, offline notification, call ID, and room metadata. |
| Voice & video engine | Device access, room join/leave, publish/unpublish, subscribe/unsubscribe, mute, rendering, and media callbacks. |
| Your UI | Permission prompts, ringing state, timers, route changes, device controls, reconnection, and error recovery. |
Web API lifecycle
| Phase | rtcManage methods |
|---|---|
| Set up | initRTCEngine(params), joinRoom(params) |
| Media | publish(type, hasVideo, hasAudio), subscribe(sources) |
| Controls | muteLocalAudio(mute), muteLocalVideo(mute), muteRemoteAudio(stream, mute), muteRemoteVideo(stream, mute) |
| Tear down | unPublish(), 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.