get-scenes-list 接口

获取场景列表

请求方式

 POST http://ip/mwapi/get-scenes-list

返回数据

JSON 结构如下:

{
  "status": 0,
  "info":{
      "totalCount": 3,
      "pageIndex":0,
      "audioList":[{...}],
      "sceneList":[{...}]
      } 
}
1. 返回状态
"status": 0
属性 说明
status 返回状态。0:数据获取成功,返回其它值请参考 API 状态码
totalCount scene items 总数
2. 演示稿音频配置 audioList [{...}]
"audioList":[
            {
                "muted":0,
                "type":1,
                "volume":1000000
            },
            {
                "muted":1,
                "type":2,
                "volume":1000000
            },
            {
                "muted":0,
                "type":3,
                "volume":1000000
            },
            {
                "muted":0,
                "type":4,
                "volume":1000000
            },
            {
                "muted":0,
                "type":5,
                "volume":1000000
            },
            {
                "muted":0,
                "type":6,
                "volume":1000000
            }
        ],
属性 说明
type 音频类型 1:output 2:monitor 3:mic 4:bgm 5:uac in 6:line in
muted 静音 0:NO 1:YES
volume 音量 0~1000000
3. 当前分页场景列表 sceneList [{...}]
"sceneList":[
            {
                "audioList": [
                    {
                        "layerId": 0,
                        "muted": 0,
                        "type": 256,
                        "volume": 1000000
                    }
                ],
                "dividerLine": {
                    "color": 0,
                    "width": 0,
                    "x1": 500000,
                    "x2": 500000,
                    "y1": 0,
                    "y2": 1000000
                },
                "id": 100,
                "layerList": [
                    {
                        "cropWindow": {
                            "height": 1000000,
                            "type": 0,
                            "width": 1000000,
                            "x": 0,
                            "y": 0
                        },
                        "flip": 0,
                        "frame": {
                            "color": 0,
                            "width": 0
                        },
                        "givenBg": 0,
                        "mediaProgress": 0,
                        "rotation": 360,
                        "sourceDuration": 0,
                        "sourceHeight": 1080,
                        "sourceId": 1,
                        "sourceThumbHeight": 144,
                        "sourceThumbWidth": 256,
                        "sourceType": 3,
                        "sourceWidth": 1920,
                        "srcWindow": {
                            "height": 1000000,
                            "width": 1000000,
                            "x": 0,
                            "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,
                        "sourceThumbHeight": 0,
                        "sourceThumbWidth": 0,
                        "sourceType": 0,
                        "sourceWidth": 0,
                        "srcWindow": {
                            "height": 1000000,
                            "width": 1000000,
                            "x": 0,
                            "y": 0
                        },
                        "window": {
                            "height": 0,
                            "width": 0,
                            "x": 0,
                            "y": 0
                        }
                    }
                ],
                "name": "",
                "template": 2,
                "type": 3
            },
            {
                "audioList": [],
                "dividerLine": {
                    "color": 0,
                    "width": 0,
                    "x1": 500000,
                    "x2": 500000,
                    "y1": 0,
                    "y2": 1000000
                },
                "id": 101,
                "layerList": [
                    {
                        "cropWindow": {
                            "height": 1000000,
                            "type": 0,
                            "width": 1000000,
                            "x": 0,
                            "y": 0
                        },
                        "flip": 0,
                        "frame": {
                            "color": 0,
                            "width": 0
                        },
                        "givenBg": 0,
                        "rotation": 0,
                        "sourceHeight": 1080,
                        "sourceId": 1001,
                        "sourceThumbHeight": 0,
                        "sourceThumbWidth": 0,
                        "sourceType": 7,
                        "sourceWidth": 1920,
                        "srcWindow": {
                            "height": 1000000,
                            "width": 1000000,
                            "x": 0,
                            "y": 0
                        },
                        "thumbHeight": 144,
                        "thumbWidth": 256,
                        "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,
                        "sourceDuration": 0,
                        "sourceHeight": 1080,
                        "sourceId": 2039,
                        "sourceThumbHeight": 0,
                        "sourceThumbWidth": 0,
                        "sourceType": 1,
                        "sourceWidth": 1920,
                        "srcWindow": {
                            "height": 1000000,
                            "width": 1000000,
                            "x": 0,
                            "y": 0
                        },
                        "window": {
                            "height": 1000000,
                            "width": 1000000,
                            "x": 0,
                            "y": 0
                        }
                    }
                ],
                "name": "note",
                "template": 0,
                "type": 4
            }
        ]
1. 场景
属性 说明
id 场景ID。
name 场景名称。
type 场景类型 4:笔记 其它:场景画面(不再细分类型)
template 组合模板 0:画中画 1:画面分割 2:单图层画面
dividerLine 分割线属性
layerList 图层列表
2. 场景内音频配置
属性 说明
type 音频类型 0x0100: HDMI 1; 0x0200: video; 0x0300: HDMI 2; 0x0400: USB Camera; 0x0500:picture
muted 静音 0:NO 1:YES
volume 音量 0~1000000
3. 分割线 dividerLine
属性 说明
color 分割线颜色 uint32(gbra)
x1 分割线顶点x值
y1 分割线顶点y值
x2 分割线结束点x值
y2 分割线结束点y值
4. 图层 layer
属性 说明
sourceId 源ID。可通过HTTP访问(http://[设备IP]/source/(sourceId))
sourceType 源类型 1: 图片; 2: 视频; 3: HDMI 1; 4: HDMI 2; 5: USB-Camera; 6: 音频; 7: 背景图片; 8: 自动摄像头
sourceWidth 源画面宽度
sourceHeight 源画面高度
sourceDuration 源视频长度
mediaProgress 源播放进度,仅针对VIDEO类型
rotation 旋转角度,逆时针方向,范围[0~360]
flip 翻转属性,0:不翻转 1:左右翻转 2:上下翻转 3:左右翻转+上下翻转
frame 边框属性
window 窗口属性
srcWindow 内容窗口属性
cropWindow 裁剪窗口属性
5. 窗口 window
属性 说明
x x,相对值 (0~1) * 1000,000,下同
y y
width 宽度
height 高度
type 非必要参数,裁剪类型 0:自由比例 1:原始比例 2:4比3 3:16比9 4:1比1

与“”相关结果约

    找不到与“”相关的结果

    与“”相关结果约

      找不到与“”相关的结果