Modifies a layout. You only need to pass parameters that need to be modified to this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyCasterLayout

The operation that you want to perform. Set the value to ModifyCasterLayout.

BlendList.N RepeatList Yes RV02

The location ID of video layer N in the production studio.

For more information about the location ID, see AddCasterVideoResource. Make sure that the video layers specified by this parameter are in the same order as those specified by the VideoLayers parameter.

CasterId String Yes LIVEPRODUCER_POST-cn-0pp1czt****

The ID of the production studio.

LayoutId String Yes 21926b36-7dd2-4fde-ae25-51b5bc8e****

The ID of the layout.

MixList.N RepeatList Yes RV02

The location ID of audio layer N in the production studio.

For more information about the location ID, see AddCasterVideoResource. Make sure that the audio layers specified by this parameter are in the same order as those specified by the AudioLayers parameter.

RegionId String No cn-shanghai

The ID of the region.

VideoLayer.N.FillMode String No fit

The scaling mode of video layer N. Valid values:

  • none: The image is not scaled to fill in the specified layout section. Set video layer N based on the image size of the video resource. This is the default value.
  • fit: The image is scaled with the original aspect ratio to fill in the specified layout section. Set video layer N based on the section size. The image is centered in the layout section with the long side of the image equaling that of the section. If the aspect ratio of the image is inconsistent with that of the section, the short side of the image may be shorter than that of the section. The area outside the image displays the next video layer or the background if no next video layer exists. By default, the background color is black.
VideoLayer.N.HeightNormalized Float No 1

The normalized value of the height of the image of video layer N.

  • If the VideoLayer.N.FillMode parameter of video layer N is set to none, the width of the video image is scaled based on this parameter. The default value is 0, which indicates that the video image is displayed in the original size.
  • If the VideoLayer.N.FillMode parameter of video layer N is set to fit, you must set this parameter to a value greater than 0. In this case, the video image is scaled with the original aspect ratio to fill in the specified layout section based on this parameter.
VideoLayer.N.WidthNormalized Float No 1

The normalized value of the width of the image of video layer N.

  • If the VideoLayer.N.FillMode parameter of video layer N is set to none, the height of the video image is scaled based on this parameter. The default value is 0, which indicates that the video image is displayed in the original size.
  • If the VideoLayer.N.FillMode parameter of video layer N is set to fit, you must set this parameter to a value greater than 0. In this case, the video image is scaled with the original aspect ratio to fill in the specified layout section based on this parameter.
VideoLayer.N.PositionRefer String No topLeft

The reference coordinates of video layer N in the production studio. Valid values:

  • topLeft: the upper-left corner. This is the default value.
  • topRight: the upper-right corner.
  • bottomLeft: the lower-left corner.
  • bottomRight: the lower-right corner.
  • center: the center position.
  • topCenter: the upper center position.
  • bottomCenter: the lower center position.
  • leftCenter: the left center position.
  • rightCenter: the right center position.
VideoLayer.N.PositionNormalized.N RepeatList No 0.3

The normalized value of the [x,y] coordinates of video layer N in the production studio. The default coordinates are [0,0].

Note The coordinates indicate the location of video layer N in the production studio. Set this parameter to the normalized value of the coordinates.
VideoLayer.N.FixedDelayDuration Integer No 5000

The fixed delay of video layer N. You can use this parameter to synchronize the video with subtitles. Unit: milliseconds. Valid values: 0 to 5000. Default value: 0.

AudioLayer.N.VolumeRate Float No 1

The normalized value of heights for the elements in audio layer N. The widths of the elements are scaled based on this parameter.

The default value is 0, which indicates that the elements in audio layer N are not scaled.

AudioLayer.N.ValidChannel String No all

The valid voice channels of audio layer N. Valid values:

  • leftChannel: the left channel.
  • rightChannel: the right channel.
  • all: both the left and right channels. This is the default value.
AudioLayer.N.FixedDelayDuration Integer No 5000

The fixed delay of audio layer N. You can use this parameter to synchronize the audio with subtitles. Unit: milliseconds. Default value: 0. Valid values: 0 to 5000.

Note The variable N in request parameter names indicates the sequence number of the video or audio layer. For example, the VideoLayer.N.FillMode parameter specifies the scaling mode of video layer N. The VideoLayer.1.FillMode parameter specifies the scaling mode of the first video layer. The VideoLayer.2.FillMode parameter specifies the scaling mode of the second video layer.

Response parameters

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

The ID of the request.

LayoutId String 21926b36-7dd2-4fde-ae25-51b5bc8e****

The ID of the layout.

Examples

Sample requests

http(s)://live.aliyuncs.com/? Action=ModifyCasterLayout
&BlendList.1=RV02
&CasterId=LIVEPRODUCER_POST-cn-0pp1czt****
&LayoutId=21926b36-7dd2-4fde-ae25-51b5bc8e****
&MixList.1=RV02
&<Common request parameters>

Sample success responses

XML format

<ModifyCasterLayoutResponse>
      <RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
      <LayoutId>21926b36-7dd2-4fde-ae25-51b5bc8e52d8</LayoutId>
</ModifyCasterLayoutResponse>

JSON format

{
    "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8",
    "LayoutId": "21926b36-7dd2-4fde-ae25-51b5bc8e****"
}

Error codes

For a list of error codes, visit the API Error Center.