Help Center/ SparkRTC/ SDK Reference/ Web SDK/ Basic Usage Logic
Updated on 2023-11-01 GMT+08:00

Basic Usage Logic

9.4.1-checkSystemRequirements checkSystemRequirements createClient createClient getCameras getMicrophones getSpeakers createStream initialize play join peer-join publish stream-added subscribe stream-subscribed play camera-changed playback-device-changed recording-device-changed setVideoProfile unpublish stream-updated stream-removed leave peer-leave
  1. Create a project. After the SDK is imported, create a client and obtain the local audio and video device information.
  2. Create and initialize local streams.
  3. After a user joins a room, the system notifies other users in the room through callback. After receiving the callback message, other users can perform other operations such as subscribing to or unsubscribing from audio and video streams.
  4. Configure local recording or playback devices during the meeting.
  5. After a user leaves a room, other users in the room receive a callback message indicating that the user leaves the room. Resources related to the user need to be destroyed.

In the sequence diagram, click the name of an API to view how it is used.