edit-icon download-icon

AddLiveAppSnapshotConfig

Last Updated: Apr 11, 2018

Description

Configure snapshot information targeting the AppName in the live stream. The output content is stored in OSS. The configuration is effective when the stream is pushed again.

Request parameters

Parameter Type Required Example values Description
Action String Yes AddLiveAppSnapshotConfig

The name of this interface. Value: AddLiveAppSnapshotConfig

AppName String Yes testApp

Name of the app , which the live stream belongs to.
Supports wildcard (*), indicating all the AppNames under the domain name.

DomainName String Yes www.yourdomain.com

Your CDN domain name.

OssBucket String Yes test123

Name of the bucket stored in OSS.

OssEndpoint String Yes oss-cn-shanghai.aliyuncs.com

OSS endpoint domain name.

TimeInterval Integer Yes 5

Snapshot cycle.
Range: [5,3600]
Unit: seconds.

OverwriteOssObject String No {AppName}/{StreamName}.jpg

The storage file name in OSS. After every snapshot you take, the file is overwritten.

  • Smaller than 256 bytes.
  • Currently only supports generating JPG images.
  • Supports variable matching, including {AppName} and {StreamName}. For example: {AppName}/{StreamName}.jpg.

SequenceOssObject String No snapshot/{AppName}/{StreamName}/{UnixTimestamp}.jpg

The storage file name in OSS. This file adopts incremental storage for every snapshot taking. You can query the files within a period of time using the DescribeLiveStreamSnapshotInfo interface.

  • Smaller than 256 bytes.
  • Currently only supports generating JPG images.
  • Supports variable matching, including {AppName}, {StreamName}, {UnixTimestamp}, and {Sequence}. Among them, you must provide either {UnixTimestamp} or {Sequence}. For example: snapshot/{AppName}/{StreamName}/{UnixTimestamp}.jpg.

Return parameters

Parameter Type Example values Description
RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the job request.

Example

Request example

  1. https://live.aliyuncs.com/?Action=AddLiveAppSnapshotConfig&DomainName=test101.aliyunlive.com&AppName=xxx&TimeInterval=10&OssEndpoint=endpoint&OssBucket=bucket&OverwriteOssObject=object&SequenceOssObject=object<Public Request Parameter>

For more information, see Public Request Parameter.

Normal return example

JSON format

  1. {
  2. "RequestId":"16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
  3. }

Exception return example

JSON format

  1. {
  2. "Code":"InternalError",
  3. "HostId":"live.aliyuncs.com",
  4. "Message":"The request processing has failed due to some unknown error.",
  5. "RequestId":"6EBD1AC4-C34D-4AE1-963E-B688A228BE31"
  6. }

Error code

For more information about error code of this product, see Error code.

Thank you! We've received your feedback.