Request real-time stream
The user first get the url to play through this interface. The interface will respond to a variety of pull stream protocol urls, and the user can create the player pull stream according to his own needs
Request parameter
field | type | required | desc |
---|---|---|---|
vehicleNo | string | Yes | Plat No. |
channelNo | integer | Yes | Channel number |
isSubCode | bool | No | Whether it is a substream |
Response Data
field | type | desc |
---|---|---|
zlmStreamID | string | Play stream ID |
zlmTalkStreamID | string | Intercom stream ID, which is used to push intercom streams |
rtmp | string | RTMP pull stream URL |
rtmps | string | RTMP encrypted pull URL |
rtsp | string | RTSP pull URL |
rtsps | string | RTSP encrypted pull URL |
httpFlv | string | HTTP-FLV pulls the URL |
httpFlvs | string | HTTP-FLV encrypts the pull URL |
wsFlv | string | websocket pulling URL |
wsFlvs | string | websocket encrypts the pull URL |
webRTC | string | webRTC Pulls the URL |
webRTCs | string | webRTC Encrypts the pull URL |
talkWebRTC | string | webRTC Encrypts the pull URL |
talkWebRTCs | string | Intercom push stream URL(encrypted) |
Example
Request example
url
http://localhost:8080/web_api/v1/media/realtime_video?vehicleNo=13000000005&channelNo=1&isSubCode=true&_t=1699064763458
http://localhost:8080/web_api/v1/media/realtime_video?vehicleNo=13000000005&channelNo=1&isSubCode=true&_t=1699064763458
Response example
json
{
"hdr":{
"code":200
},
"data":{
"zlmStreamID":"7296306183499944423",
"zlmTalkStreamID":"",
"rtmp":"rtmp://localhost:7206/play/7296306183499944423",
"rtmps":"rtmps://localhost:7206/play/7296306183499944423",
"rtsp":"rtsp://localhost:7207/play/7296306183499944423",
"rtsps":"rtsps://localhost:7207/play/7296306183499944423",
"httpFlv":"http://localhost:7205/play/7296306183499944423.live.flv",
"httpFlvs":"https://localhost:443/play/7296306183499944423.live.flv",
"wsFlv":"ws://localhost:7205/play/7296306183499944423.live.flv",
"wsFlvs":"wss://localhost:443/play/7296306183499944423.live.flv",
"webRTC":"http://localhost:7205/index/api/webrtc?app=play&stream=7296306183499944423&type=play",
"webRTCs":"https://localhost:443/index/api/webrtc?app=play&stream=7296306183499944423&type=play",
"talkWebRTC":"",
"talkWebRTCs":""
}
}
{
"hdr":{
"code":200
},
"data":{
"zlmStreamID":"7296306183499944423",
"zlmTalkStreamID":"",
"rtmp":"rtmp://localhost:7206/play/7296306183499944423",
"rtmps":"rtmps://localhost:7206/play/7296306183499944423",
"rtsp":"rtsp://localhost:7207/play/7296306183499944423",
"rtsps":"rtsps://localhost:7207/play/7296306183499944423",
"httpFlv":"http://localhost:7205/play/7296306183499944423.live.flv",
"httpFlvs":"https://localhost:443/play/7296306183499944423.live.flv",
"wsFlv":"ws://localhost:7205/play/7296306183499944423.live.flv",
"wsFlvs":"wss://localhost:443/play/7296306183499944423.live.flv",
"webRTC":"http://localhost:7205/index/api/webrtc?app=play&stream=7296306183499944423&type=play",
"webRTCs":"https://localhost:443/index/api/webrtc?app=play&stream=7296306183499944423&type=play",
"talkWebRTC":"",
"talkWebRTCs":""
}
}
After success,how to play
If use H5 ,If you want it to be simple, you can directly use flvjs to play, and the user can query the usage method
Currently, webrtc play is being used here, with a delay about 700ms for public network testing. If needed, JSSDK can be provided in the future Xgplayer flv The usage document click to view