open.shopweb.device.startNewMediaPlay (获取实时播放流)

获取获取流媒体信息(通道建立后,如果10秒之内没有客户端请求拉流,通道关闭。通道建立后,当最后一个客户端停止拉流,通道立即关闭)

Interface Description #

Environment Interface Method Submission Method Requires Signature The identifier of the http request
Formal environment open.shopweb.device.startNewMediaPlay POST true https://openapi.opretail.com/cloud.api

Public Request Parameters #

Parameter Type Required Max Length Description Example Value
_aid String Yes 20 Open platform system ID, fixed as S107 S107
_akey String Yes 20 Developer key assigned by Wanzdianzhang Open Platform to third parties Obtained after authenticating platform developer
_mt String Yes 100 Interface name open.shopweb.device.startNewMediaPlay
_sm String Yes 100 Signature algorithm md5, sha1 md5
_requestMode String Yes 100 Request method post, get POST
_version String Yes 100 Version number v1
_timestamp String Yes 100 Timestamp yyyyMMddHHmmss format
_sig String Yes 32 Signature token Generated according to signature algorithm, see signature algorithm rules for details
_format String No 10 Format type Currently only json is supported by default

Business Request Parameters #

Parameter Type Required Max Length Description Example Value
deviceId int 11 Device id(【devices】device id returned by open.shopweb.device.getVideoDeviceList)
isSlave int 1 Check whether it is mainstream 0: mainstream (recommended)1: secondary
timeout int × 11 Standing channel timeout point (seconds), after the timeout no play request automatically close the channel (without this parameter default non-standing), that is, the time stamp (seconds), for example: https://tool.lu/timestamp/ 1593097150
permanent boolean × 1 Whether to be a standing channel (without this parameter default non-standing false), a timeout timestamp (seconds) needs to be specified for standing channels true

Public Response Parameters #

Parameter Type Max Length Description Example Value
stat JSON - Gateway status (specific parameters are described as follows: View
stat.cid String 100 The identifier of the http request
stat.code String 100 Gateway return code
stat.codename String 100 Gateway return code name
stat.systime String Long The current time of the interface call
result String 100 The interface returns prompt information
data JSON - Business information returned by the interface call (usually in JSON format, the specific data format will be defined in the business return parameters) View

Business Response Parameters #

apiDetail.parameterName Type Required Max Length Description Example Value
flv string × 100 flv Stream Address (this code stream is highly recommended, small latency) http://118.31.174.18:5581/rtsp/26a85850-1e1e-4a2a-8a4a-af77c54cf4fa/live.flv
rtmp string × 100 rtmp Streaming Address rtmp://118.31.174.18:2935/rtsp/26a85850-1e1e-4a2a-8a4a-af77c54cf4fa
hls string × 100 hls Stream Address (.m3u8 format) http://118.31.174.18:6681/rtsp/26a85850-1e1e-4a2a-8a4a-af77c54cf4fa/index.m3u8
rtsp string × 100 rtsp stream address rtsp://118.31.174.18:5555/rtsp/26a85850-1e1e-4a2a-8a4a-af77c54cf4fa
tlsflv string × 100 https flv stream address https://dataswitch-test-001.ovopark.com:5582/rtsp/26a85850-1e1e-4a2a-8a4a-af77c54cf4fa/live.flv
vencodingname string × 100 Video encoding format [H264] (tlsflv,flv,rtmp exists only under H264) H264
tlshls string × 100 https hls stream address(.m3u8 format) https://dataswitch-test-001.ovopark.com:6682/rtsp/26a85850-1e1e-4a2a-8a4a-af77c54cf4fa/index.m3u8

Public Return Codes #

Return code name Return code Return Code Description Solution
SUCCESS 0 Call success
KEY_NOTNULL 1 _akey cannot be empty Pass in the _akey parameter when calling the interface
KEY_UNLAWFUL 2 _akey is illegal The key is illegal, enter the correct key
KEY_HAS_EXPIRED 3 _akey has expired Please renew your service or contact the platform administrator
SIGN_METHOD_NOTNULL 4 The _sm parameter cannot be empty Pass in the _sm parameter when calling the interface
SIGN_TYPE_NOTEXIST 5 _sm type does not exist Currently only supports md5, sha1
SIGN_NOTNULL 6 The _sig parameter cannot be empty Pass in the _sig parameter when calling the interface
SIGN_WRONG 7 Invalid signature, please check the parameters and signature format The _sig value is generated according to the signature algorithm
METHOD_NOTNULL 8 apiDetail.mtParameterCannotBeEmpty apiDetail.passInTheMtParameterWhenCallingTheInterface
METHOD_NOTEXIST_CODE 9 The method name corresponding to _mt does not exist or is not registered in the service Check whether the method corresponding to the _mt method name and _version version number has an error in passing
REQUESTMODE_NOTNULL 10 The _requestMode parameter cannot be empty Pass in the _requestMode parameter when calling the interface
APPLICATIONID_NOTNULL 11 _aid parameter cannot be empty Pass in the _aid parameter when calling the interface
APPLICATIONID_NOTSAME 12 _aid does not match the current key _aid and _akey must correspond one to one
VERSION_NOTNULL 13 _version version number cannot be empty Version number
TIMESTAMP_NOTNULL 14 _timestamp timestamp cannot be empty Pass in the _timestamp parameter when calling the interface
TIMESTAMP_FORMAT_ERROR 15 _timestamp timestamp format error Follow the yyyyMMddHHmmss format
TIMESTAMP_OVERTIME 16 _timestamp has expired _timestamp is regenerated each time the interface is called
FORMAT_TYPE_NOTEXIST 17 _format type does not exist Currently only supports json (default), xml
API_CALL_REPEAT -100 Interface duplicate call Interface platform call exception
API_SYSTEM_CALL_ERROR -500 API call failed, system exception Interface platform call exception
UNKNOWN_ERROR -999 Open platform system exception Reinitiate request

Business Return Codes #

Return code name Return code Return Code Description
NO_AUTH_USER 103064 没有用户权限
NO_DEVICE 103092 没有设备