All Products
Search
Document Center

ApsaraVideo Live:AddCasterLayout

Last Updated:Jun 10, 2026

Menambahkan tata letak ke studio produksi.

Deskripsi operasi

Before you call this operation, you must create a production studio and add video sources. For more information about how to create a production studio, see CreateCaster.

QPS limits

The queries per second (QPS) limit for this operation is 10 calls per second per user. API calls that exceed this limit are throttled, which may affect your business. Do not exceed this limit.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

live:AddCasterLayout

create

*Caster

acs:live:*:{#accountId}:caster/{#CasterId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

No

ID wilayah.

cn-shanghai

VideoLayer

array<object>

Yes

Tata letak video.

object

No

The video layout.

FillMode

string

No

The fill mode of the element. Valid values:

  • none (default): No scaling. The video is displayed in its original size.

  • fit: The video is scaled to fit the fill area while maintaining its aspect ratio. The video is centered in the fill area. If the aspect ratio of the fill area is different from that of the video, the area along the shorter edge is not filled. This area displays the video of the underlying layer. If no underlying layer is configured, this area is black.

fit

FixedDelayDuration

integer

No

The fixed latency for the video layer. Use this parameter to synchronize the video with captions. Unit: milliseconds. Default value: 0. Valid values: 0 to 5000.

5000

HeightNormalized

number

No

The normalized height of the layer.

  • If you set FillMode to none, the width of the layer is scaled in proportion to the height. The default value is 0. A value of 0 indicates that the video is displayed in its original size.

  • If you set FillMode to fit, this parameter is required and its value must be greater than 0. The value specifies the normalized height of the fill area.

1

PositionNormalized

array

No

The position of the video layer. The value is a normalized coordinate [x,y]. Default value: [0,0].

Note: The x and y coordinates must be normalized.

0.3

number

No

The value.

0

PositionRefer

string

No

The reference point for the position of the layer. Valid values:

  • topLeft (default): Top-left.

  • topRight: Top-right.

  • bottomLeft: Bottom-left.

  • bottomRight: Bottom-right.

  • center: Center.

  • topCenter: Top-center.

  • bottomCenter: Bottom-center.

  • leftCenter: Left-center.

  • rightCenter: Right-center.

topLeft

WidthNormalized

number

No

The normalized width of the layer.

  • If you set FillMode to none, the height of the layer is scaled in proportion to the width. The default value is 0. A value of 0 indicates that the video is displayed in its original size.

  • If you set FillMode to fit, this parameter is required and its value must be greater than 0. The value specifies the normalized width of the fill area.

1

AudioLayer

array<object>

Yes

Tata letak audio.

object

No

The audio layout.

FixedDelayDuration

integer

No

The fixed latency for the audio layer. Use this parameter to synchronize the audio with captions. Unit: milliseconds. Default value: 0. Valid values: 0 to 5000.

5000

ValidChannel

string

No

The sound channels that are used for audio input. Valid values:

  • leftChannel: Left channel.

  • rightChannel: Right channel.

  • all (default): Both channels.

all

VolumeRate

number

No

The volume multiplication factor for the audio stream. Valid values: 0 to 10.0.

  • 1.0 (default): The original volume is used.

  • A value less than 1 decreases the volume.

  • A value greater than 1 increases the volume.

1.0

BlendList

array

Yes

ID lokasi Sumber video. Pesanan ID lokasi sesuai dengan Pesanan lapisan video yang ditentukan dalam parameter VideoLayer. Untuk informasi selengkapnya tentang ID lokasi, lihat AddCasterVideoResource.

Untuk LocationId, lihat Tambahkan Sumber video. ID ini sesuai dengan Pesanan elemen VideoLayers.

RV01

string

No

The location ID.

RV01

MixList

array

Yes

ID lokasi sumber audio. Pesanan ID lokasi sesuai dengan Pesanan lapisan audio yang ditentukan dalam parameter AudioLayer. Untuk informasi selengkapnya tentang ID lokasi, lihat AddCasterVideoResource.

Untuk `LocationId`, lihat Tambahkan Sumber video. ID ini sesuai dengan Pesanan elemen `AudioLayers`.

RV01

string

No

The location ID.

RV01

CasterId

string

Yes

ID studio produksi.

  • Jika Anda membuat studio produksi dengan memanggil operasi CreateCaster, CasterId dikembalikan di tanggapan.

  • Jika Anda membuat studio produksi di konsol LIVE, buka Production Studio > Cloud Production Studio untuk melihat Tampilan nama studio produksi.

Catatan

Nama studio produksi pada halaman Cloud Production Studio adalah ID studio produksi.

LIVEPRODUCER_POST-cn-0pp1czt****

Catatan

Dalam parameter permintaan, N merepresentasikan nomor urut suatu elemen. Misalnya, VideoLayer.N.FillMode menentukan mode pengisian untuk lapisan video ke-N. VideoLayer.1.FillMode menentukan mode pengisian untuk lapisan video pertama, dan VideoLayer.2.FillMode menentukan mode pengisian untuk lapisan video kedua.

Elemen respons

Element

Type

Description

Example

object

LayoutId

string

The ID of the layout. You can use this ID as a request parameter when you call operations to manage layouts, such as deleting, modifying, or querying layouts for a production studio or a virtual studio.

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

RequestId

string

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68F****

Contoh

Respons sukses

JSONformat

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

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 MissingParameter %s.
400 InvalidParameter.Malformed There are invalid parameters: %s.
400 InvalidCasterId.Malformed %s, please check and try again later.
400 InvalidVideoLayersAndBlendListSize.Mismatch %s, please check and try again later.
400 InvalidAudioLayersAndMixListSize.Mismatch %s, please check and try again later.
400 InvalidUserId.Malformed %s, please check userId.
400 InvalidBlendList.ExceedNorm %s, please check and try again later.
400 InvalidPositionNormalized.Malformed %s, please check and try again later.
400 InvalidHeightOrWidthNormalized %s, please check and try again later.
400 InvalidMixList.ExceedNorm %s, please check and try again later.
401 IllegalOperation %s, please check and try again later.
500 InternalError %s, please try again later.
404 InvalidCaster.NotFound %s, please check and try again later.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.