Updated on 2023-09-27 GMT+08:00

Playing Back a Recording File

Description

This interface is invoked by the Windows Media Player to play recording files in URL mode.

Usage Description

  • Prerequisites
  • Usage restrictions

    Developers can only download files under their own accounts. The developer account (appId) must correspond to the recording file name (fileName).

Interface Method

GET

URI

https://ip:port/CCFS/resource/ccfs/playVoice

Set ip to the IP address of the server where the CC-FS is installed and port to the HTTPS port number of the CC-FS.

If the request is routed through the NSLB, set ip to the IP address of the NSLB server and port to the HTTPS port number of the CC-FS service mapped on the NSLB.

Request

Table 1 Parameters in the request

No.

Name

Value Type

Mandatory

Default Value

Description

1

t

String

Yes

None

To prevent data cache, you are advised to use the current timestamp.

2

version

String

Yes

2.0

Protocol version. The default value is 2.0.

3

st

String

Yes

None

Token returned when the interface described in Requesting to Play Back a Recording File is invoked.

Response

If this interface is successfully invoked, the binary data stream of the corresponding recording file is returned, which can be directly played using the Windows media player.

If the interface fails to be invoked, an error code is returned. In the response, the value of content-type is application/octet-stream;charset=UTF-8. For details about the error code response data structure, see Table 2. resultData is a reserved field and is defaulted to null.

Table 2 Parameters in a response message

No.

Name

Value Type

Description

1

resultCode

String

Result code returned. For details, see Error Code Reference.

2

resultDesc

String

Request result description.

3

resultData

Object

Response data.

4

response

Object

Request result object. For details, see Table 3.

This field is reserved for compatibility with earlier versions and is not recommended.

Table 3 Parameters in a response message

No.

Name

Value Type

Description

4.1

version

String (1–32)

Protocol version, for example, 2.0.

4.2

resultCode

String (1–32)

Result code returned. For details, see Error Code Reference.

4.3

resultMsg

String

Request result description.

Example

  • Request
    GET https://ip:port/CCFS/resource/ccfs/playVoice?t=1596677685425&version=2.0&st=7D41CF5DE98948979AAE063114C8AFCF3
  • Response header
    HTTP/1.1 200 OK
    Content-Type: application/octet-stream;charset=UTF-8
    Date: Mon, 02 Jul 2018 02:43:03 GMT
  • Response parameters
    {
        "resultData": null,
        "resultCode": "010106",
        "resultDesc": "Parameter token is empty."
    }