### StartWebcast API Source: https://www.volcengine.com/docs/6348/1188207 This API is used to start a webcast. It returns metadata about the operation and a result indicating success or failure. ```APIDOC ## POST /websites/volcengine_6348/StartWebcast ### Description Starts a webcast. This operation returns metadata including a request ID, action, version, service, and region, along with a result status. ### Method POST ### Endpoint /websites/volcengine_6348/StartWebcast ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "some_request_field": "some_value" } ``` ### Response #### Success Response (200) - **ResponseMetadata** (object) - Metadata about the API response. - **RequestId** (string) - The unique identifier for the request. - **Action** (string) - The name of the action performed. - **Version** (string) - The API version used. - **Service** (string) - The service the request was made to. - **Region** (string) - The region the request was processed in. - **Result** (string) - The result of the operation, typically "ok" for success. #### Response Example ```json { "ResponseMetadata": { "RequestId": "20230****10420", "Action": "StartWebcast", "Version": "2023-11-01", "Service": "rtc", "Region": "cn-north-1" }, "Result": "ok" } ``` ## Error Codes Refer to public error codes for more information. ``` -------------------------------- ### 特效素材缺失或SDK版本不匹配错误日志 Source: https://www.volcengine.com/docs/6348/114717 此日志表明特效素材文件丢失或SDK版本与素材资源版本不兼容。通常发生在资源文件路径错误或版本更新不同步的情况下。检查文件路径和SDK版本匹配是解决此问题的关键。 ```cpp [FileUtil.cpp 112] FileUtil: readFile: file /****/cvlab/ModelResource.bundle/ttfacemodel/tt_face_v10.0.model is not exist -1... ``` -------------------------------- ### 素材文件损坏或授权文件不匹配错误日志 Source: https://www.volcengine.com/docs/6348/114717 此日志指示素材文件可能已损坏,或者用于验证素材的授权文件与素材本身不匹配。这可能导致效果渲染失败。需要验证素材文件的完整性以及授权文件的有效性和匹配性。 ```cpp RenderManager::_buildComposerEffect: effectParser->parse fail, path: /****/cvlab/StickerResource.bundle/stickers/**** ``` -------------------------------- ### StartSegment API Request Example (POST) Source: https://www.volcengine.com/docs/6348/155129 This example demonstrates how to make a POST request to the StartSegment API to initiate audio slicing. It includes essential parameters like Action, Version, AppId, RoomId, and TaskId, along with optional configurations for storage and advanced features. Ensure all required parameters are correctly provided for successful execution. ```http POST https://rtc.volcengineapi.com?Action=StartSegment&Version=2022-06-01 Host: rtc.volcengineapi.com X-Amz-Date: 20200302T100200Z Authorization: X-Amz-Algorithm=AWS4-HMAC-SHA256,X-Amz-Credential=AKIDEXAMPLE/20200302/cn-north-1/rtc/aws4_request,X-Amz-Expires=3600,X-Amz-SignedHeaders=host Content-Type: application/json { "AppId": "You****pId", "RoomId": "Your_RoomId", "TaskId": "Your_TaskId", "StorageConfig": { "Type": 0, "TosConfig": { "Bucket": "your-tos-bucket", "Region": "your-tos-region", "Path": "your-path" } }, "Duration": 20, "Control": { "Align": false, "Mixed": false } } ``` -------------------------------- ### User Start Audio Capture Callback Source: https://www.volcengine.com/docs/6348/70090 Callback received when a visible user in the room starts audio capture. Notifies other users in the room. ```Objective-C rtcEngine:onUserStartAudioCapture:uid:; ``` -------------------------------- ### User Start Video Capture Callback Source: https://www.volcengine.com/docs/6348/70090 Callback received when a visible user in the room starts internal video capture. Notifies other users in the room. ```Objective-C rtcEngine:onUserStartVideoCapture:uid:; ``` -------------------------------- ### ASR Configuration Examples Source: https://www.volcengine.com/docs/6348/1807450 Provides examples of ASR configuration, including settings for Volcano Engine's streaming ASR large model and standard streaming ASR. ```json { "Provider": "volcano", "ProviderParams": { "Mode": "bigmodel", "StreamMode": 0, "context": "{\"hotwords\": [{\"word\": \"热词1\"}] }" } } ``` ```json { "Provider": "volcano", "ProviderParams": { "Mode": "smallmodel", "Cluster": "volcengine_streaming_common" } } ``` -------------------------------- ### Update Snapshot Response Example Source: https://www.volcengine.com/docs/6348/1188224 This example shows a successful response from the UpdateSnapshot API call. It includes 'Result' indicating success and 'ResponseMetadata' with details about the request. ```json { "Result": "ok", "ResponseMetadata": { "RequestId": "20230****10420", "Action": "UpdateSnapshot", "Version": "2023-11-01", "Service": "rtc", "Region": "cn-north-1" } } ``` -------------------------------- ### Video Capture Management Source: https://www.volcengine.com/docs/6348/70094 Controls the starting, stopping, and configuration of video capture devices. ```APIDOC ## startVideoCapture ### Description Immediately starts internal video capture. Defaults to off. ### Method POST ### Endpoint /startVideoCapture ### Parameters #### Request Body - **None** ### Response #### Success Response (200) - **Success**: Indicates the operation was successful. ### Response Example ```json { "Success": true } ``` ``` ```APIDOC ## stopVideoCapture ### Description Immediately stops internal video capture. Defaults to off. ### Method POST ### Endpoint /stopVideoCapture ### Parameters #### Request Body - **None** ### Response #### Success Response (200) - **Success**: Indicates the operation was successful. ### Response Example ```json { "Success": true } ``` ``` ```APIDOC ## setVideoCaptureConfig ### Description Sets the video capture parameters for RTC SDK internal capture, including mode, resolution, and frame rate. ### Method POST ### Endpoint /setVideoCaptureConfig ### Parameters #### Request Body - **mode** (string) - Optional - Capture mode (e.g., 'AUTO', 'CUSTOM'). - **resolution** (object) - Optional - Video resolution. - **width** (integer) - Required - **height** (integer) - Required - **frameRate** (integer) - Optional - Video frame rate. ### Response #### Success Response (200) - **Success**: Indicates the operation was successful. ### Response Example ```json { "Success": true } ``` ``` ```APIDOC ## enumerateVideoCaptureDevices ### Description Retrieves a list of available video capture devices on the system. ### Method GET ### Endpoint /enumerateVideoCaptureDevices ### Parameters #### None ### Response #### Success Response (200) - **devices** (array) - List of video capture devices. - **deviceId** (string) - Unique identifier for the device. - **deviceName** (string) - Name of the device. ### Response Example ```json { "devices": [ { "deviceId": "device1", "deviceName": "Integrated Camera" } ] } ``` ``` ```APIDOC ## setVideoCaptureDevice ### Description Sets the current video capture device to be used by the SDK. ### Method POST ### Endpoint /setVideoCaptureDevice ### Parameters #### Request Body - **deviceId** (string) - Required - The ID of the device to set. ### Response #### Success Response (200) - **Success**: Indicates the operation was successful. ### Response Example ```json { "Success": true } ``` ``` ```APIDOC ## getVideoCaptureDevice ### Description Retrieves information about the currently used video capture device by the SDK. ### Method GET ### Endpoint /getVideoCaptureDevice ### Parameters #### None ### Response #### Success Response (200) - **deviceId** (string) - The ID of the current video capture device. - **deviceName** (string) - The name of the current video capture device. ### Response Example ```json { "deviceId": "device1", "deviceName": "Integrated Camera" } ``` ``` -------------------------------- ### Notify User Started Video Capture Source: https://www.volcengine.com/docs/6348/70096 Notifies other users in the room when a visible user starts internal video capture via `startVideoCapture`. Includes the room ID and the user ID of the user who started capture. ```cpp virtual void bytertc::IRTCVideoEventHandler::onUserStartVideoCapture( const char* room_id, const char* user_id ) ``` -------------------------------- ### Start Recording Source: https://www.volcengine.com/docs/6348/1188215 Initiates a cloud recording task for a specified WebRTC room. You can configure various parameters like recording mode, streams to record, encoding settings, and layout. ```APIDOC ## POST /websites/volcengine_6348 ### Description Initiates a cloud recording task for a specified WebRTC room. You can configure various parameters like recording mode, streams to record, encoding settings, and layout. ### Method POST ### Endpoint /websites/volcengine_6348 ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **AppId** (String) - Required - Your unique identifier for the video application. - **BusinessId** (String) - Optional - Business identifier. - **RoomId** (String) - Required - The unique identifier for the room. - **TaskId** (String) - Required - The unique identifier for the cloud recording task. Must be unique within an AppId and RoomId. - **RecordMode** (Integer) - Optional - Recording mode: `0` for mixed stream, `1` for single stream. Defaults to `0`. - **TargetStreams** (Object) - Optional - Specifies streams to record. If empty, records all streams (up to 17). - **StreamList** (Object[]) - Optional - List of streams to subscribe to. If empty, subscribes to all streams in the room. - **ExcludeStreams** (Object) - Optional - Blacklist of streams not to record. - **Encode** (Object) - Optional - Audio and video encoding parameters. - **VideoWidth** (Integer) - Optional - Video width in pixels. Defaults to `640`. - **VideoHeight** (Integer) - Optional - Video height in pixels. Defaults to `480`. - **VideoFps** (Integer) - Optional - Video frames per second. Defaults to `15`. - **VideoBitrate** (Integer) - Optional - Video bitrate in Kbps. `0` means adaptive bitrate. Defaults to `0`. - **VideoCodec** (Integer) - Optional - Video codec: `0` for H.264, `1` for ByteVC1. Defaults to `0`. - **VideoGop** (Integer) - Optional - Video GOP in seconds. Defaults to `4`. - **AudioCodec** (Integer) - Optional - Audio codec. Only `0` (AAC) is supported. - **AudioProfile** (Integer) - Optional - Audio profile: `0` (LC), `1` (HE-AAC v1), `2` (HE-AAC v2). Defaults to `0`. - **AudioBitrate** (Integer) - Optional - Audio bitrate in Kbps. Defaults to `64`. - **AudioSampleRate** (Integer) - Optional - Audio sample rate in Hz. Defaults to `48000`. - **AudioChannels** (Integer) - Optional - Audio channels: `1` for mono, `2` for stereo. Defaults to `2`. - **Layout** (Object) - Optional - Layout parameters for mixed stream recording. - **LayoutMode** (Integer) - Optional - Layout mode: `0` (adaptive), `1` (vertical), `2` (custom), `3` (side-by-side). Defaults to `0`. - **MainVideoStream** (Object) - Optional - Main video stream properties for vertical layout. - **CustomLayout** (Object) - Optional - Parameters for custom layout. - **Control** (Object) - Optional - Advanced configuration options. - **MediaType** (Integer) - Optional - Media type: `0` for audio/video, `1` for audio only. Defaults to `0`. - **FrameInterpolationMode** (Integer) - Optional - Frame interpolation mode: `0` (last frame), `1` (black frame). Defaults to `0`. - **MaxSilenceSeconds** (Integer) - Optional - Maximum silence duration in seconds for single stream recording. Defaults to `3600`. - **MaxIdleTime** (Integer) - Optional - Maximum idle time in seconds before task termination. Defaults to `180`. - **MaxRecordTime** (Integer) - Optional - Maximum recording duration in seconds. `0` means no limit. Defaults to `0`. - **EnableSyncUpload** (Boolean) - Optional - Enable recording and uploading simultaneously. Defaults to `false`. - **FileFormatConfig** (Object) - Optional - Recording file format settings. - **FileFormat** (String[]) - Optional - Storage file formats: `MP4`, `HLS`, `FLV`, `MP3`, `AAC`, `M4A`. Defaults to `["HLS"]`. - **FileNameConfig** (Object) - Optional - Recording file naming settings. ### Request Example ```json { "AppId": "661e****543cf", "RoomId": "Room1", "TaskId": "Task1", "RecordMode": 0, "Encode": { "VideoWidth": 1280, "VideoHeight": 720, "VideoFps": 30, "VideoBitrate": 2000, "AudioSampleRate": 48000, "AudioChannels": 2 }, "Layout": { "LayoutMode": 3 }, "FileFormatConfig": { "FileFormat": ["MP4", "HLS"] } } ``` ### Response #### Success Response (200) - **Result** (Object) - Operation result. - **Code** (String) - Result code. - **Message** (String) - Result message. #### Response Example ```json { "Result": { "Code": "Success", "Message": "Operation successful." } } ``` ``` -------------------------------- ### Recording API Source: https://www.volcengine.com/docs/6348/85530 APIs for managing local audio and video recording, including starting, stopping, and receiving status and progress updates. ```APIDOC ## Recording ### startFileRecording **Description**: Records the audio and video data during a call to a local file. ### stopFileRecording **Description**: Stops the local recording. ### startAudioRecording **Description**: Starts recording the voice call and generates a local file. ### stopAudioRecording **Description**: Stops the audio file recording. ### onRecordingStateUpdate **Description**: Callback to get the local recording state. ### onRecordingProgressUpdate **Description**: Callback for the local recording progress. ### onAudioRecordingStateUpdate **Description**: Callback received when the audio file recording state changes after calling `startAudioRecording` or `stopAudioRecording`. ``` -------------------------------- ### Setup Mixing Video Source: https://www.volcengine.com/docs/6348/85532 Binds a local view to the client-side media stream mixing for CDN push. Call this after `startPushMixedStreamToCDN`. Use `removeMixingVideo` to unbind. ```typescript setupMixingVideo(task_id: string, view: HTMLDivElement, renderOptions?: RenderOptions): number; ``` -------------------------------- ### CDN Mixed Stream Management Source: https://www.volcengine.com/docs/6348/85532 Manages live streaming tasks with mixed audio and video, including starting, updating, and binding/unbinding views. ```APIDOC ## POST startPushMixedStreamToCDN ### Description Initiates a new live streaming task with mixed audio and video. Configures the layout and audio properties for the mixed stream. ### Method POST ### Endpoint /startPushMixedStreamToCDN ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **task_id** (string) - Required - The ID for the push stream task, max 126 bytes. Use an empty string for a single task. - **config** (IMixedStreamConfig) - Required - Configuration parameters for the mixed stream, including layout and audio settings. ### Request Example ```json { "task_id": "your_task_id", "config": { "layout": { "area": [ { "userId": "user1", "x": 0, "y": 0, "width": 0.5, "height": 0.5 } ] }, "audio": { "mixing": true } } } ``` ### Response #### Success Response (200) - **code** (number) - 0 for success, non-zero for failure. #### Response Example ```json { "code": 0 } ``` ## POST updatePushMixedStreamToCDN ### Description Updates the parameters for an ongoing live streaming task with mixed audio and video. ### Method POST ### Endpoint /updatePushMixedStreamToCDN ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **task_id** (string) - Required - The ID of the push stream task to update. - **config** (IMixedStreamConfig) - Required - The updated configuration parameters for the mixed stream. ### Request Example ```json { "task_id": "your_task_id", "config": { "layout": { "area": [ { "userId": "user1", "x": 0.25, "y": 0.25, "width": 0.5, "height": 0.5 } ] } } } ``` ### Response #### Success Response (200) - **code** (number) - 0 for success, non-zero for failure. #### Response Example ```json { "code": 0 } ``` ## POST setupMixingVideo ### Description Binds a local view to a client-side mixed stream. Must be called after `startPushMixedStreamToCDN`. ### Method POST ### Endpoint /setupMixingVideo ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **task_id** (string) - Required - The ID of the task. - **view** (HTMLDivElement) - Required - The view element to bind. - **renderOptions** (RenderOptions) - Optional - Rendering options, defaults to `{ render_mode: RenderMode.FIT, mirror: false }`. ### Request Example ```javascript setupMixingVideo("your_task_id", document.getElementById("localVideo")); ``` ### Response #### Success Response (200) - **code** (number) - `0` for success, `-1` for failure. #### Response Example ```json { "code": 0 } ``` ## POST removeMixingVideo ### Description Unbinds a local view from a mixed stream push. Call this when stopping mixed stream reception. ### Method POST ### Endpoint /removeMixingVideo ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **task_id** (string) - Required - The ID of the task. ### Request Example ```json { "task_id": "your_task_id" } ``` ### Response #### Success Response (200) - **code** (number) - `0` for success, `-1` for failure. #### Response Example ```json { "code": 0 } ``` ``` -------------------------------- ### Configure Cloud Recording Source: https://www.volcengine.com/docs/6348/1163741 This API allows you to configure and start cloud recording tasks. You can specify recording mode, select streams, set encoding parameters, and define layout options. ```APIDOC ## POST /websites/volcengine_6348 ### Description This endpoint is used to configure and start cloud recording tasks for audio and video streams. It supports various parameters to control the recording process, including stream selection, encoding settings, and layout. ### Method POST ### Endpoint /websites/volcengine_6348 ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **AppId** (String) - Required - Your application's unique identifier. - **BusinessId** (String) - Optional - Business identifier. - **RoomId** (String) - Required - The unique identifier for the room. - **TaskId** (String) - Required - The unique ID for the cloud recording task. TaskId must be unique within an AppId and RoomId. - **RecordMode** (Integer) - Optional - Recording mode: 0 for mixed stream, 1 for single stream. Defaults to 0. - **TargetStreams** (Object) - Optional - Specifies the audio/video streams to record. If empty, all streams in the room are recorded. Maximum 17 streams. Must not overlap with ExcludeStreams. - **StreamList** (Object[]) - Optional - List of streams to record. If empty, all streams are subscribed. Stream.Index must be unique within StreamList. - **Index** (Integer) - Optional - Identifier for the stream in custom layouts. - **UserId** (String) - Required - The user ID associated with the stream. - **StreamType** (Integer) - Optional - Type of stream: 0 for normal, 1 for screen. Defaults to 0. - **ExcludeStreams** (Object) - Optional - Blacklist of streams not to record. Maximum 17 streams. Cannot include screen streams. Must not overlap with TargetStreams. - **StreamList** (Object[]) - Optional - List of streams to exclude. If empty, no streams are excluded. Stream.Index must be unique within StreamList. - **Index** (Integer) - Optional - Identifier for the stream in custom layouts. - **UserId** (String) - Required - The user ID associated with the stream. - **StreamType** (Integer) - Optional - Type of stream: 0 for normal, 1 for screen. Defaults to 0. - **Encode** (Object) - Optional - Audio/video encoding parameters. - **VideoWidth** (Integer) - Optional - Output video width in pixels. Range: [2, 1920], must be even. Defaults to 640. Ignored in custom layouts. - **VideoHeight** (Integer) - Optional - Output video height in pixels. Range: [2, 1920], must be even. Defaults to 480. Ignored in custom layouts. - **VideoFps** (Integer) - Optional - Output video frame rate. Range: [1, 60]. Defaults to 15. - **VideoBitrate** (Integer) - Optional - Output video bitrate in Kbps. Range: [1, 10000]. Defaults to adaptive. - **VideoCodec** (Integer) - Optional - Video codec: 0 for H.264, 1 for ByteVC1. Defaults to 0. - **VideoGop** (Integer) - Optional - Output video GOP in seconds. Range: [1, 5]. Defaults to 4. - **AudioCodec** (Integer) - Optional - Audio codec. Defaults to 0 (AAC). - **AudioProfile** (Integer) - Optional - Audio profile for AAC: 0 (LC), 1 (HE-AAC v1), 2 (HE-AAC v2). Defaults to 0. - **AudioBitrate** (Integer) - Optional - Audio bitrate in Kbps. Range: [32, 192]. Defaults to 64. - **AudioSampleRate** (Integer) - Optional - Audio sample rate in Hz. Allowed values: [32000, 44100, 48000]. Defaults to 48000. - **AudioChannels** (Integer) - Optional - Audio channels: 1 for mono, 2 for stereo. Defaults to 2. - **Layout** (Object) - Optional - Layout parameters. Only applicable in mixed stream mode. - **LayoutMode** (Integer) - Optional - Layout mode: 0 (adaptive), 1 (vertical), 2 (custom), 3 (side-by-side). Defaults to 0. - **MainVideoStream** (Object) - Optional - Specifies the main stream in vertical layout mode. Required for vertical layout. - **Index** (Integer) - Optional - Identifier for the stream in custom layouts. - **UserId** (String) - Required - The user ID associated with the stream. - **StreamType** (Integer) - Optional - Type of stream: 0 for normal, 1 for screen. Defaults to 0. - **CustomLayout** (Object) - Optional - Specific settings for custom layout mode. - **Canvas** (Object) - Optional - Canvas (screen) dimensions and background color. - **Width** (Integer) - Optional - Canvas width in pixels. Range: [2, 1920], must be even. Defaults to 640. - **Height** (Integer) - Optional - Canvas height in pixels. Range: [2, 1920], must be even. Defaults to 480. - **Background** (String) - Optional - Canvas background color in hex format. Defaults to #000000. - **BackgroundImage** (String) - Optional - URL of the background image. Max length 1024 bytes. - **Regions** (Object[]) - Optional - Layout settings for each video stream in custom layout mode. Must correspond to streams in TargetStreams.StreamList. - **StreamIndex** (Integer) - Required - Identifier for the stream, corresponding to TargetStreams.StreamList.Stream.Index. ### Request Example ```json { "AppId": "You****pId", "RoomId": "Your_RoomId", "TaskId": "Your_TaskId", "RecordMode": 0, "TargetStreams": { "StreamList": [ { "UserId": "User1", "StreamType": 0 }, { "UserId": "User2", "StreamType": 1 } ] }, "Encode": { "VideoWidth": 1280, "VideoHeight": 720, "VideoFps": 30, "VideoBitrate": 2000, "AudioBitrate": 128 }, "Layout": { "LayoutMode": 2, "CustomLayout": { "Canvas": { "Width": 1280, "Height": 720, "Background": "#FFFFFF" }, "Regions": [ { "StreamIndex": 0, "X": 0, "Y": 0, "Width": 640, "Height": 720 }, { "StreamIndex": 1, "X": 640, "Y": 0, "Width": 640, "Height": 720 } ] } } } ``` ### Response #### Success Response (200) - **Data** (Object) - Response data. - **TaskId** (String) - The Task ID of the recording task. - **CreateTime** (String) - The creation time of the recording task. #### Response Example ```json { "ResponseMetadata": { "RequestId": "your-request-id", "Action": "CreateRecordTask", "Version": "2020-12-01", "Service": "live" }, "Data": { "TaskId": "Your_TaskId", "CreateTime": "2023-10-27T10:00:00Z" } } ``` ### Error Handling - **InvalidParameter**: Returned when input parameters are invalid. - **ServiceError**: Returned for general service errors. - **RequestTooLarge**: Returned if the request payload exceeds the limit. ``` -------------------------------- ### Video Capture Management Source: https://www.volcengine.com/docs/6348/104477 APIs to control the internal video capture process, including starting, stopping, and setting placeholder images. ```APIDOC ## POST startVideoCapture ### Description Starts the internal video capture process. By default, it is in a closed state. When a user joins a room and calls this method, other users in the room will receive the onUserStartVideoCapture callback. ### Method POST ### Endpoint /startVideoCapture ## POST stopVideoCapture ### Description Stops the internal video capture process. After publishing a stream, calling this method will result in other users in the room receiving the onUserStopVideoCapture callback. ### Method POST ### Endpoint /stopVideoCapture ## POST setDummyCaptureImagePath ### Description When the internal camera capture is stopped, a static image is used to fill the locally pushed video stream. ### Method POST ### Endpoint /setDummyCaptureImagePath ### Parameters #### Request Body - **imagePath** (string) - Required - The path to the static image to be used. ### Request Example { "imagePath": "/path/to/static/image.jpg" } ### Response #### Success Response (200) - **message** (string) - Indicates the success of the operation. #### Response Example { "message": "Dummy capture image path set successfully." } ``` -------------------------------- ### Video Capture Management API Source: https://www.volcengine.com/docs/6348/85515 APIs for managing the SDK's internal video capture, including starting, stopping, configuring, and selecting capture devices. ```APIDOC ## startVideoCapture ### Description Immediately starts internal video capture. Defaults to the off state. Internal video capture refers to capturing using the RTC SDK's built-in video capture module. After this method is called, the local user will receive an onVideoDeviceStateChanged callback. If the local user calls this method while not in incognito mode, other users in the room will receive an onUserStartVideoCapture callback. ### Method POST ### Endpoint /startVideoCapture ## stopVideoCapture ### Description Immediately stops internal video capture. Defaults to the off state. Internal video capture refers to capturing using the RTC SDK's built-in video capture module. After this method is called, the local user will receive an onVideoDeviceStateChanged callback. If a visible user calls this method after joining the room, other users in the room will receive an onUserStopVideoCapture callback. ### Method POST ### Endpoint /stopVideoCapture ## setVideoCaptureConfig ### Description Sets the video capture parameters for the RTC SDK's internal capture. If your project uses the SDK's internal capture module, you can use this interface to specify video capture parameters, including mode, resolution, and frame rate. ### Method POST ### Endpoint /setVideoCaptureConfig ## enumerateVideoCaptureDevices ### Description Retrieves the list of video capture devices currently in the system. ### Method GET ### Endpoint /enumerateVideoCaptureDevices ## getVideoCaptureDevice ### Description Retrieves information about the video capture device currently in use by the SDK. ### Method GET ### Endpoint /getVideoCaptureDevice ## setVideoCaptureDevice ### Description Sets the current video capture device. ### Method POST ### Endpoint /setVideoCaptureDevice ``` -------------------------------- ### Set Sticker Nodes Source: https://www.volcengine.com/docs/6348/114717 Applies sticker effects by setting the sticker resource path. ```APIDOC ## Set Sticker Nodes ### Description Applies sticker effects by setting the sticker resource path. ### Method POST ### Endpoint `/api/video_effect/set_sticker_nodes` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **effect_node_paths** (array of strings) - Required - Paths to the sticker effect nodes (e.g., "../StickerResource.bundle/stickers/stickers_zhaocaimao"). - **nodeNum** (number) - Required - The number of sticker nodes. ### Request Example ```json { "effect_node_paths": [ "../StickerResource.bundle/stickers/stickers_zhaocaimao" ], "nodeNum": 1 } ``` ### Response #### Success Response (200) - **ret** (number) - Return value indicating success. #### Response Example ```json { "ret": 0 } ``` ``` -------------------------------- ### Screen Sharing API Source: https://www.volcengine.com/docs/6348/85530 APIs for managing screen sharing, including starting and stopping video capture, configuring encoders, publishing streams, and handling remote streams. ```APIDOC ## Screen Sharing ### startScreenVideoCapture **Description**: Captures screen video stream for sharing. Supports capturing desktop, application windows, or virtual screens (Windows only). ### stopScreenVideoCapture **Description**: Stops screen video stream capture. ### updateScreenCaptureMouseCursor **Description**: Updates mouse cursor handling settings when capturing screen video using the RTC SDK's capture module. Mouse capture is enabled by default. ### setScreenVideoEncoderConfig **Description**: Configures desired encoding parameters for the published screen sharing video stream, including resolution, frame rate, bitrate, and fallback strategies for poor network conditions. ### publishScreen **Description**: Publishes the local screen sharing audio and video stream to the current room. ### updateScreenCaptureRegion **Description**: Updates the screen sharing region. ### unpublishScreen **Description**: Stops publishing the local screen sharing audio and video stream to the current room. ### updateScreenCaptureHighlightConfig **Description**: Updates border highlighting settings when capturing screen video using the RTC SDK's capture module. Borders are displayed by default. ### updateScreenCaptureFilterConfig **Description**: Sets windows to be filtered when capturing screen video using the RTC SDK's capture module. ### getScreenCaptureSourceList **Description**: Retrieves the list of screen capture objects. ### getThumbnail **Description**: Gets the thumbnail of a shared object. ### getWindowAppIcon **Description**: Retrieves the icon for the application owning a window. ### subscribeScreen **Description**: Subscribes to a specified remote screen sharing audio and video stream within the room, or updates subscription options for a specific remote user. ### unsubscribeScreen **Description**: Unsubscribes from a specified remote screen sharing audio and video stream within the room. ### startScreenAudioCapture **Description**: Starts capturing screen audio using the RTC SDK's internal capture method during screen sharing. ### onUserPublishScreen **Description**: Callback received when a new remote screen sharing audio and video stream is published in the room. ### stopScreenAudioCapture **Description**: Stops capturing screen audio using the RTC SDK's internal capture method during screen sharing. ### onUserUnpublishScreen **Description**: Callback received when a remote screen sharing audio and video stream is removed from the room. ### onScreenVideoFrameSendStateChanged **Description**: Callback for changes in the send state of the first screen sharing video frame. ### onScreenVideoFramePlayStateChanged **Description**: Callback for changes in the play state of the first screen sharing video frame. ### onScreenAudioFrameSendStateChanged **Description**: Callback for changes in the send state of the first screen sharing audio frame. ### onScreenAudioFramePlayStateChanged **Description**: Callback for changes in the play state of the first screen sharing audio frame. ### onLocalScreenFrame **Description**: Receives the local screen video frame upon successful capture for custom processing or rendering. ### onRemoteScreenFrame **Description**: Receives the remote screen video frame upon successful capture for custom processing or rendering. ### setScreenAudioChannel **Description**: Sets the number of channels for the screen audio stream during screen sharing. ### setScreenAudioStreamIndex **Description**: Sets the mixing method for the screen audio stream and the microphone captured audio stream during screen sharing. ``` -------------------------------- ### Unity: Start and stop audio recording Source: https://www.volcengine.com/docs/6348/110078 Introduces functionality to record local calls and provides callbacks for recording state updates. ```C# StartAudioRecording(...); StopAudioRecording(...); OnAudioRecordingStateUpdateEventHandler(...); ``` -------------------------------- ### GetSegmentTask API Request Example Source: https://www.volcengine.com/docs/6348/1188227 Example of a GET request to the GetSegmentTask API for retrieving audio slicing task information. It includes common query parameters like Action, Version, AppId, RoomId, and TaskId. ```http GET https://rtc.volcengineapi.com?Action=GetSegmentTask&Version=2023-11-01&AppId=661e****543cf&RoomId=Room1&TaskId=Task1 ``` -------------------------------- ### TypeScript Example: sendTTSMessage Source: https://www.volcengine.com/docs/6348/1359441 Example implementation in TypeScript for sending a TTS message. ```APIDOC ## TypeScript: sendTTSMessage ### Description This TypeScript example demonstrates sending a text-to-speech (TTS) command to an agent using the Volcengine RTC SDK. ### Method Internal Call (uses `engine.sendUserBinaryMessage`) ### Endpoint N/A (Internal function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **userId** (string) - Required - The ID of the intelligent agent. - **content** (string) - Required - The text content to be spoken by the agent. ### Request Example ```typescript const BotName = 'RobotMan_'; // 自定义智能体名称 const CommandKey = 'ctrl'; const engine = VERTC.createEngine('Your AppID'); // 你的 RTC 应用 APPId enum COMMAND { EXTERNAL_TEXT_TO_SPEECH = 'ExternalTextToSpeech', } enum INTERRUPT_PRIORITY { MEDIUM, } function stringToTLV(inputString: string, type = '') { const typeBuffer = new Uint8Array(4); for (let i = 0; i < type.length; i++) { typeBuffer[i] = type.charCodeAt(i); } const lengthBuffer = new Uint32Array(1); const valueBuffer = new TextEncoder().encode(inputString); lengthBuffer[0] = valueBuffer.length; const tlvBuffer = new Uint8Array(typeBuffer.length + 4 + valueBuffer.length); tlvBuffer.set(typeBuffer, 0); tlvBuffer[4] = (lengthBuffer[0] >> 24) & 0xff; tlvBuffer[5] = (lengthBuffer[0] >> 16) & 0xff; tlvBuffer[6] = (lengthBuffer[0] >> 8) & 0xff; tlvBuffer[7] = lengthBuffer[0] & 0xff; tlvBuffer.set(valueBuffer, 8); return tlvBuffer; } // Example usage: // const userId = 'some_user_id'; // const textToSpeak = 'Hello, this is a test message.'; // const message = JSON.stringify({ // Command: COMMAND.EXTERNAL_TEXT_TO_SPEECH, // Message: textToSpeak, // InterruptMode: INTERRUPT_PRIORITY.MEDIUM // }); // const tlvMessage = stringToTLV(message, CommandKey); // engine.sendUserBinaryMessage(userId, tlvMessage); ``` ### Response #### Success Response (200) Indicates the message was sent successfully. #### Response Example N/A (Internal function) ### Error Handling Assumed to be handled by the RTC SDK. ``` -------------------------------- ### Initialize Video Effect Source: https://www.volcengine.com/docs/6348/114717 Initializes the video effect module by requesting a beauty certificate and then integrating the CV resource. This step is crucial before applying any beauty effects. ```APIDOC ## Initialize Video Effect ### Description Initializes the video effect module by requesting a beauty certificate and then integrating the CV resource. This step is crucial before applying any beauty effects. ### Method POST ### Endpoint `/api/video_effect/initialize` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **key** (string) - Required - Your beauty key. - **authMsg** (string) - Required - The authentication message generated by the SDK. - **nonce** (number) - Required - A random nonce for security. - **timestamp** (number) - Required - The current UTC timestamp. - **digest** (string) - Required - The signature generated for authentication. ### Request Example ```json { "key": "YOUR_BEAUTY_KEY", "authMsg": "GENERATED_AUTH_MESSAGE", "nonce": 123456789, "timestamp": 1678886400, "digest": "GENERATED_SIGNATURE" } ``` ### Response #### Success Response (200) - **data** (string) - The beauty certificate data. - **status_code** (number) - 0 indicates success. - **digest** (string) - The digest for verification. #### Response Example ```json { "data": "BASE64_ENCODED_CERTIFICATE_DATA", "status_code": 0, "digest": "VERIFICATION_DIGEST" } ``` ## Integrate CV Resource ### Description Integrates the CV resource after successful initialization. This involves providing paths to the license and model files. ### Method POST ### Endpoint `/api/video_effect/integrate_cv_resource` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **license_path** (string) - Required - The full path to the license file. - **model_path** (string) - Required - The path to the ModelResource.bundle. ### Request Example ```json { "license_path": "/path/to/your/license.lic", "model_path": "/path/to/ModelResource.bundle" } ``` ### Response #### Success Response (200) - **ret** (number) - Return value indicating integration success. #### Response Example ```json { "ret": 0 } ``` ``` -------------------------------- ### Java Example: sendTTSMessage Source: https://www.volcengine.com/docs/6348/1359441 Example implementation in Java for sending a TTS message. ```APIDOC ## Java: sendTTSMessage ### Description This Java function demonstrates sending a text-to-speech (TTS) command to an agent. ### Method Internal Call (uses `sendUserBinaryMessage`) ### Endpoint N/A (Internal function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **userId** (String) - Required - The ID of the intelligent agent. - **content** (String) - Required - The text content to be spoken by the agent. ### Request Example ```java public void sendTTSMessage(String userId, String content) { JSONObject json = new JSONObject(); try { json.put("Command", "ExternalTextToSpeech"); json.put("Message", content); json.put("InterruptMode", 2); } catch (JSONException e) { throw new RuntimeException(e); } String jsonString = json.toString(); byte[] buildBinary = buildBinaryMessage("ctrl", jsonString); sendUserBinaryMessage(userId, buildBinary); } ``` ### Response #### Success Response (200) Indicates the message was sent successfully. #### Response Example N/A (Internal function) ### Error Handling - Throws a `RuntimeException` if there's a `JSONException`. ``` -------------------------------- ### Initialize and Enable Video Effect Source: https://www.volcengine.com/docs/6348/114717 Initializes the video effect resource using the provided license and model paths. After successful initialization, it enables the video effect to apply effects to the video stream. ```cpp auto ret = video_effect->initCVResource(license_path_ptr, model_path_ptr); video_effect->enableVideoEffect(); ``` -------------------------------- ### C++ Example: sendTTSMessage Source: https://www.volcengine.com/docs/6348/1359441 Example implementation in C++ for sending a TTS message. ```APIDOC ## C++: sendTTSMessage ### Description This C++ function demonstrates sending a text-to-speech (TTS) command to an agent. ### Method Internal Call (uses `sendUserBinaryMessage`) ### Endpoint N/A (Internal function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **uid** (const std::string &) - Required - The ID of the intelligent agent. - **content** (const std::string&) - Required - The text content to be spoken by the agent. ### Request Example ```cpp void sendTTSMessage(const std::string &uid, const std::string& content) { nlohmann::json json_data; json_data["Command"] = "ExternalTextToSpeech"; json_data["Message"] = content; json_data["InterruptMode"] = 2; sendUserBinaryMessage(uid, json_data.dump()); } ``` ### Response #### Success Response (200) Indicates the message was sent successfully. #### Response Example N/A (Internal function) ### Error Handling - Returns -1 if `rtcRoom_` is null. ```