One task, three capabilities
task_type is a bit mask. Each of the three independent capabilities takes one bit; add the values of the ones you want at the same time:
So
3 = video recording + stream mixing, and 7 = all three.
The former type
8 (live stream) has been removed; passing 8 or a combination that includes 8 returns parameter error 10070 (invalid request parameters). For live streaming, use 2 (stream mixing) plus Media output to pull or push. At upgrade time, the task_type of historical tasks has 8 replaced with 2 (for example, 9 → 3).Some tasks start automatically
This is where SMeeting differs most from the underlying SRTC: not every recording needs you to call start manually. When the first person enters the meeting, the server decides whether to start a task based on the meeting’s own settings:
If live streaming is enabled in your deployment, a regular meeting with
auto_record on also mixes streams and actually starts 3 (video recording + stream mixing),
so the composite video can be pulled or pushed directly. This switch is set by the deployment, not by the API. If you’re not sure, ask us.
Automatically started tasks use the meeting’s own layout_data (passed when creating or modifying the meeting) for the layout; if none is set, the server’s default layout is used (auto by default).
So: set auto_record to true when you create the meeting, and you don’t need to manage starting and stopping recording in your business logic.
Calling start manually is for cases like “deciding to record partway through the meeting”.
Calling start again for the same meeting updates the task instead of creating one
A meeting has only one in-progress task per type. Callingstart again with different parameters changes the existing task
(for example, switching the layout). It doesn’t create another task or a second recording file.
Key differences between video recording and live streaming
For live pulling and pushing, see the Media output guide. The
layout_data.push_url push parameters of mcu/start have been removed; use stream/push/start instead.
To get playback URLs, wait for the
mcu_record_done callback. Don’t request them as soon as the task ends—transcoding usually isn’t finished yet.Choosing a layout
layout_data.layout determines the video layout. There are two kinds:
auto(automatic layout): only members with video get a view; the grid is picked by headcount and switches as people come and go. Works for most cases.div_listhas no effect underauto- Fixed layouts: the structure does not change with headcount, and you can use
div_listto pin specific people to specific views (see the next section)
layout is omitted, the server’s default layout is used (auto by default; the deployer can change it).
Fixed layouts at a glance (the number in each view is its index
idx; blue marks the large view):
The watermark and name labels can fall back to defaults; the layout cannot. When
layout_data omits watermark / tag,
watermark_type / window_tag_type from the recording settings are used. The layout, however, is not taken from that configuration—if you need a fixed layout,
pass it in layout_data.layout every time you start a task.
Pinning members to specific views
layout_data.div_list only works with fixed layouts. Each element pins one view:
cells[0].idx: the view index, starting at0, in the same order as<td>cells in an HTML table (left to right, top to bottom); see the table above for the index of the large view. It must be less than the layout’s view countuids[0]: the person pinned to this view (use theuser_id). If that person is not in the meeting, the view stays empty for them- When
cells[0].bind_shareistrue, the view always shows the current screen share (regardless of who is sharing;uidsis ignored). When no one is sharing, the view stays empty - Only the first entry of
cellsand ofuidsin an element is used; extras are ignored. To pin several views, put several elements indiv_list
polling_dur:
So if you want a fixed layout with “a few people pinned and everyone else arranged automatically”, you must set
polling_dur; otherwise only the pinned views show video.
Typical use: “main speaker pinned to the large view, screen share pinned to one small view, everyone else rotating through the remaining small views”:
Active speaker view and speaker highlight
Two switches, both set per task (pass them when starting the task or when changing the layout mid-session). They are independent and can be used together:- Active speaker view: mark a view in
div_listwith"bind_speaker": true, and that view automatically shows whoever is currently speaking, switching as the speaker changes. Only works with fixed layouts; at most one such view per layout; it cannot be the same view asbind_share; nouidsneeded for it - Speaker highlight: when
layout_data.speaker_borderistrue, the view of the person currently speaking gets a green border. Works with both automatic and fixed layouts
- A person must keep speaking for about 1.5 seconds before being switched in; coughs and short interjections do not trigger a switch
- Once switched in, they stay for at least 3 seconds; while the person in the view is still speaking, no one else can replace them
- It usually takes 2–3 seconds from someone starting to speak to their video appearing (a person not shown in any other view needs their video pulled first; until then the view keeps showing the previous person, so there is no black flash)
- Before anyone has spoken, the view shows an “Active speaker” placeholder; after that it keeps the last person who spoke until the next speaker is switched in. If that person leaves the meeting, the view returns to the placeholder
- If the speaker is also pinned to another view, both views show them; without a camera, their avatar and name are shown
Who is speaking is determined by the server from the speech levels reported by each client. Requires server v1.14.0 and compositing service 1.4.0 or later; SIP / H.323 endpoints joining through the device gateway need device gateway 1.8.0 or later to be recognized as speakers. Apps whose media route is a third-party CDN do not support these two features.
Behavior when no one is in the meeting
layout_data.nobody_text determines what happens when no one is in the meeting:
- Empty → recording pauses (recommended, to avoid long stretches of black video)
- Text set → recording continues and shows the text
Watermark and member name labels
watermark.type:0default,1none,2single row,3multiple rows. Ifwatermark.textis empty, the meeting title is used as the watermark- The position of member name labels is written as a combination of letters:
Lleft,Rright,Ttop,Bbottom, which can be combined (LB= bottom left). Empty means no labels - Leave font size, color, and outline at their defaults; set them only when you have specific visual requirements
Full sequence
One recording produces multiple files
Recording is not “one recording, one file”. Two situations split it into multiple files:- The recording is longer than the segment limit (1 hour by default): when transcoding after the task ends, it is split into rolling segments by duration, with continuous time between segments
- The underlying recording stops automatically partway through because there has been no audio or video for 30 seconds, and is then restarted: a new segment starts, with a time gap between segments
- Get URLs by
record_id, nottask_id. Themcu_record_donecallback is sent per file, so one recording sends several, each with its ownrecord_id.task_ididentifies the whole task and only locates the task. vods-urlreturns all segments of the meeting in one call, sorted by segment number. Each segment includesrecord_id/seq/began_at/duration/offset_ms. For continuous playback, play inseqorder and useoffset_msto build the progress bar.- There is a time gap between a
reason=2segment and the previous one (recording was interrupted). Continuous playback jumps there, so it’s worth showing a hint in your UI.
vods-url fields url / size / mcu_at / mcu_dur keep their meaning (mcu_at is this segment’s start time,
mcu_dur is this segment’s duration). If you already integrated with these fields, you don’t need to change anything.
Recording files start transcoding and uploading only after the task ends. So there is a wait between stopping the recording and being able to play it,
and longer for long recordings. To tell when a recording is playable, rely on the
mcu_record_done callback (is_last is true on the last one),
not on the task status changing to “ended”.Billing note
Video recording, stream mixing, and audio recording (as well as pushes) are server-side capabilities that incur ongoing costs. Leavingauto_record on means every meeting is recorded—
confirm that’s what you want before going live. For manually started tasks, it’s best to explicitly call stop in your meeting-ending flow.