Skip to content

Request live intercom

Through this interface, users can get real-time intercom stream for intercom function,H5 needs to use https encryption mode

API info

Url: /web_api/v1/media/realtime_talk

Method: GET

Content-Type:x-www-form-urlencoded

Request parameter

fieldtyperequireddesc
vehicleNostringYesPlat No.
channelNointegerYesChannel number

Response Data

fieldtypedesc
zlmStreamIDstringPlay stream ID
zlmTalkStreamIDstringIntercom stream ID, which is used to push intercom streams
rtmpstringRTMP pull stream URL
rtmpsstringRTMP encrypted pull URL
rtspstringRTSP pull URL
rtspsstringRTSP encrypted pull URL
httpFlvstringHTTP-FLV pulls the URL
httpFlvsstringHTTP-FLV encrypts the pull URL
wsFlvstringwebsocket pulling URL
wsFlvsstringwebsocket encrypts the pull URL
webRTCstringwebRTC Pulls the URL
webRTCsstringwebRTC Encrypts the pull URL
talkWebRTCstringwebRTC Encrypts the pull URL
talkWebRTCsstringIntercom push stream URL(encrypted)

Exampleample

Request example

url
http://localhost:8080/web_api/v1/media/realtime_talk?vehicleNo=13000000005&channelNo=1&_t=1699066044900
http://localhost:8080/web_api/v1/media/realtime_talk?vehicleNo=13000000005&channelNo=1&_t=1699066044900

Response example

json
{
    "hdr":{
        "code":200
    },
    "data":{
        "zlmStreamID":"7296311187136844264",
        "zlmTalkStreamID":"7296311187136844265",
        "rtmp":"rtmp://localhost:7206/play/7296311187136844264",
        "rtmps":"rtmps://localhost:7206/play/7296311187136844264",
        "rtsp":"rtsp://localhost:7207/play/7296311187136844264",
        "rtsps":"rtsps://localhost:7207/play/7296311187136844264",
        "httpFlv":"http://localhost:7205/play/7296311187136844264.live.flv",
        "httpFlvs":"https://localhost:443/play/7296311187136844264.live.flv",
        "wsFlv":"ws://localhost:7205/play/7296311187136844264.live.flv",
        "wsFlvs":"wss://localhost:443/play/7296311187136844264.live.flv",
        "webRTC":"http://localhost:7205/index/api/webrtc?app=play&stream=7296311187136844264&type=play",
        "webRTCs":"https://localhost:443/index/api/webrtc?app=play&stream=7296311187136844264&type=play",
        "talkWebRTC":"http://localhost:7205/index/api/webrtc?app=play&stream=7296311187136844265&type=push",
        "talkWebRTCs":"https://localhost:443/index/api/webrtc?app=play&stream=7296311187136844265&type=push"
    }
}
{
    "hdr":{
        "code":200
    },
    "data":{
        "zlmStreamID":"7296311187136844264",
        "zlmTalkStreamID":"7296311187136844265",
        "rtmp":"rtmp://localhost:7206/play/7296311187136844264",
        "rtmps":"rtmps://localhost:7206/play/7296311187136844264",
        "rtsp":"rtsp://localhost:7207/play/7296311187136844264",
        "rtsps":"rtsps://localhost:7207/play/7296311187136844264",
        "httpFlv":"http://localhost:7205/play/7296311187136844264.live.flv",
        "httpFlvs":"https://localhost:443/play/7296311187136844264.live.flv",
        "wsFlv":"ws://localhost:7205/play/7296311187136844264.live.flv",
        "wsFlvs":"wss://localhost:443/play/7296311187136844264.live.flv",
        "webRTC":"http://localhost:7205/index/api/webrtc?app=play&stream=7296311187136844264&type=play",
        "webRTCs":"https://localhost:443/index/api/webrtc?app=play&stream=7296311187136844264&type=play",
        "talkWebRTC":"http://localhost:7205/index/api/webrtc?app=play&stream=7296311187136844265&type=push",
        "talkWebRTCs":"https://localhost:443/index/api/webrtc?app=play&stream=7296311187136844265&type=push"
    }
}

After a successful response, the stream will be pulled and played. Additionally, currently only webrtc streaming is available for intercom

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