| fields | type | description |
|---|---|---|
| streamId | string | stream id |
| segmentDuration | int | portion of stream to save in seconds. Returns error if duration less than 30 seconds |
| secondsBeforeStart | int | save video before start saving in seconds (optional, if not specified, then 0) |
| segmentsLimit | int | limit segments that will be recorded to specified amount (optional, if not specified or 0, no limit is set). When limit is set after start_stream_saving_to_cloud is called saving will stop after specified segments count finished or stop_stream_saving_to_cloud (what happens first) |
| format | string | Specify format of recorded file. Supported formats: , . Optional, if not specified or empty, format is used. |
local cameras = require("cameras")
cameras.create_stream_saving_to_cloud( "588b7eb528b12d03be86f36f",
30,
5
)