我正在使用Ant来创建广播。但是,我通过API添加的rtmp端点在Ant Media服务器仪表板中是不可见的。但是,如果我试图使用‘/v2/ rtmp /{id}’检索广播,那么rtmp端点就在那里。当通过另一个api‘/v2/ can /{id}/rtmp-终结点添加端点时,我可以在Ant Media服务器仪表板中看到这些端点。
此外,如果我更新包含rtmp端点的现有广播,则rtmp端点值设置为null。
我的问题是,上面提到的场景在REST中是否正常,还是缺少了什么?
以下是我在检索使用‘/v2/广播/创建’创建的广播时得到的片段。
{
"streamId": "xxxxxxxxxxxx",
"status": "created",
"type": "livestream",
"name": "Test Stream",
"description": "Boradtcast created using REST",
"publish": true,
"date": 1647407550785,
"plannedStartDate": 0,
"plannedEndDate": 0,
"duration": 0,
"endPointList": [
{
"type": "YouTube",
"broadcastId": "xxxxxx",
"streamId": "xxxxxxxxxxx",
"rtmpUrl": "rtmp://a.rtmp.youtube.com/live2/xxxxxxxxx",
"name": "test",
"endpointServiceId": "test",
"serverStreamId": null
}
],
"publicStream": true,
"is360": false,
"listenerHookURL": null,
"category": null,
"ipAddr": null,
"username": null,
"password": null,
"quality": "720p",
"speed": 0.0,
"streamUrl": null,
"originAdress": "xxxxxxxx",
"mp4Enabled": 0,
"webMEnabled": 0,
"expireDurationMS": 0,
"rtmpURL": "rtmp://xxxxxxx",
"zombi": false,
"pendingPacketSize": 0,
"hlsViewerCount": 0,
"webRTCViewerCount": 0,
"rtmpViewerCount": 0,
"startTime": 0,
"receivedBytes": 0,
"bitrate": 0,
"userAgent": "N/A",
"latitude": null,
"longitude": null,
"altitude": null,
"mainTrackStreamId": null,
"subTrackStreamIds": null,
"absoluteStartTimeMs": 0
}发布于 2022-03-25 09:29:32
您不必定义create广播对象中的所有字段。只需更改所需的字段,如下面的示例,默认情况下将设置其他参数。
{
"streamId": "test",
"name": "Test Stream",
"endPointList": [
{
"status": "created",
"type": "generic",
"rtmpUrl": "rtmp://a.rtmp.youtube.com/live2/xxxxxxxxx"
}
]
}https://stackoverflow.com/questions/71492128
复制相似问题