Prerequisites
- Add
cn.seastart.meeting:meeting:2.0.39as described in Integration. - Get a
meetTokenfrom your backend. Don’t store the secret key used to generate tokens in the client. - Request the camera and audio recording runtime permissions in your app.
- Prepare the
streamVendoragreed for your deployment. The example useswangsucdn; the actual value depends on your backend configuration.
1. Create and initialize the Engine
Your app should hold a singleMeetingEngine in one place. Callbacks stay on the thread they actually come from; switch to the main thread before any UI operation.
2. Create a meeting
When an instant meeting is created successfully,MeetingCreatedBean is returned directly; the Data<T> network wrapper is no longer exposed.
createScheduleMeeting(), where planTime is a Unix timestamp in seconds and planDur is in minutes.
3. Register in-meeting events
Assign room, member, message, and media events before entering the meeting so you don’t miss the initial events; they are cleared automatically after you exit the meeting.4. Enter and exit the meeting
A successful entry returnsMeetingEnterInfo. In-meeting APIs are still called on MeetingEngine; don’t reference the SDK’s internal MeetingSession.
enterMeetingByMeetingId(); the other parameters are the same. To exit the meeting, call:
5. Open and publish the camera and mic
openCamera() / openMic() only do local capture before the meeting; after entering, you must use openCameraAndPublish() / openMicAndPublish() to publish to the meeting.
VcsPlayerGlTextureView or VcsPlayerGlSurfaceView; a plain Android TextureView / SurfaceView doesn’t work.
6. Subscribe to remote video
Look up the track fromInfosManager, then get the RemoteVideoTrack through the asynchronous result callback.
Next steps
- MeetingEngine (Chinese): all public methods, parameters, and return values
- Model types (Chinese): configuration and result models
- Error codes: handling
202xxxand passed-through errors - Camera presets (Chinese): choosing resolution and bitrate
- Audio routing (Chinese): speaker, earpiece, Bluetooth, and wired headsets