create-scene-with-source

Use the interface to create a new scene containing the specific source.

Request Mode

 POST http://ip/mwapi/create-scene-with-source
Parameter Description
sourceId The source ID

Response Body

JSON structure is as follows:

{
  "status": 0,
  "message": "success",
  "info": {...}
}
1. Response Status
"status": 0
Name Description
status 0 indicates a successful data acquisition. Refer to API Status Codes to find specific description for other values.
2. New Scene Information (info {...} )
"info": {
        "audioList": [
            {
                "layerId": 0,
                "muted": 0,
                "volume": 1000000
            }
        ],
        "dividerLine": {
            "color": 0,
            "width": 0,
            "x1": 500000,
            "x2": 500000,
            "y1": 0,
            "y2": 1000000
        },
        "id": 104,
        "layerList": [
            {
                "cropWindow": {
                    "height": 1000000,
                    "type": 1,
                    "width": 1000000,
                    "x": 0,
                    "y": 0
                },
                "flip": 0,
                "frame": {
                    "color": 16777215,
                    "width": 0
                },
                "given": 0,
                "givenBg": 0,
                "rotation": 0,
                "sourceDuration": 0,
                "sourceHeight": 1461,
                "sourceId": 4,
                "sourceType": 1,
                "sourceWidth": 2224,
                "srcWindow": {
                    "height": 1000000,
                    "width": 856262,
                    "x": 71869,
                    "y": 0
                },
                "window": {
                    "height": 1000000,
                    "width": 1000000,
                    "x": 0,
                    "y": 0
                }
            },
            {
                "cropWindow": {
                    "height": 1000000,
                    "type": 0,
                    "width": 1000000,
                    "x": 0,
                    "y": 0
                },
                "flip": 0,
                "frame": {
                    "color": 0,
                    "width": 0
                },
                "givenBg": 0,
                "rotation": 0,
                "sourceHeight": 0,
                "sourceId": 0,
                "sourceType": 0,
                "sourceWidth": 0,
                "srcWindow": {
                    "height": 1000000,
                    "width": 1000000,
                    "x": 0,
                    "y": 0
                },
                "window": {
                    "height": 0,
                    "width": 0,
                    "x": 0,
                    "y": 0
                }
            }
        ],
        "name": "default pic",
        "template": 3,
        "type": 3
    }
Name Description
id The scene ID
name The scene name
type The scene type
4: note
Others: scenes
template The combination template
0: picture in picture
1: side by side
2: single-layer picture
dividerLine The attribute of divider line
layerList The layer list
2. Divider Line (dividerLine)
Name Description
color The color of divider line in uint32 (gbra)
x1 The x value of divider line top point
y1 The y value of divider line top point
x2 The x value of divider line end point
y2 The y value of divider line end point
3. Scene
Name Description
sourceId The source ID
sourceType The source type
1: picture
2: video
3: HDMI 1 scene
4: HDMI 2 scene
5: USB-Camera
6: audio
7: background picture
8: automatic camera
sourceWidth The width of the source picture
sourceHeight The height of the source picture
sourceDuration The length of the source video
mediaProgress The play process of the source media, only for video
rotation The angle of rotation which is in a counterclockwise direction
Range: [0 - 360]
flip The attribute of flip
0: not flip
1: flip horizontally
2: flip vertically
3: flip horizontally and vertically
frame The frame attribute
window The window attribute
srcWindow The attribute of the content window
cropWindow The attribute of the cropping window
4. Window (window)
Name Description
x x, relative value (0 - 1000000), the same below
y y
width Width
height Height
type (Optional) Aspect ratio
0: free ratio
1: original ratio
2: 4:3
3: 16:9
4: 1:1

results matching ""

    No results matching ""