Menambahkan komponen ke studio produksi.
Deskripsi operasi
Before calling this operation, create a production studio and review its layout list. This operation adds components such as images, text, and captions. For more information about creating a production studio using an API call, see Create a production studio.
QPS limit
The queries per second (QPS) limit for a single user is 10. If you exceed this limit, API calls are throttled. This may affect your business. Plan your calls accordingly.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:AddCasterComponent |
create |
*Caster
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
ID wilayah. |
cn-shanghai |
| CasterId |
string |
Yes |
ID studio produksi.
Catatan
Nama studio produksi pada daftar di halaman Studio Produksi Cloud adalah ID studio produksi. |
LIVEPRODUCER_POST-cn-0pp1czt**** |
| ComponentName |
string |
No |
Nama komponen. Nilai default adalah ID komponen. |
text01 |
| LocationId |
string |
Yes |
Menentukan posisi komponen. Setiap posisi hanya dapat memuat satu komponen. Format harus RC01 hingga RC99. Catatan
Jika tipe komponen adalah caption, parameter ini menentukan lokasi sumber video yang dijadikan Tampilan. |
RC01 |
| ComponentType |
string |
Yes |
Tipe komponen. Nilai valid:
|
text |
| Effect |
string |
No |
Efek tampilan komponen. Nilai valid:
|
animateH |
| ComponentLayer |
string |
Yes |
Ukuran, tata letak, dan informasi lain tentang layer komponen. Elemennya dijelaskan sebagai berikut:
Nilai berupa string berformat JSON. Nama parameter harus dalam upper-camel case. |
{"HeightNormalized":"1","PositionRefer":"topRight","WidthNormalized":"0","PositionNormalized":["0.1","0.2"]} |
| LayerOrder |
string |
No |
Pesanan layer komponen.
|
cover |
| TextLayerContent |
string |
No |
Properti elemen layer. Properti dijelaskan sebagai berikut: Penting Parameter ini hanya wajib jika ComponentType diatur ke text.
Nilai harus berupa string berformat JSON. Nama parameter harus dalam upper-camel case. |
{"BorderWidthNormalized":"1","SizeNormalized":"0.2","Color":"0x000000","FontName":"KaiTi","BorderColor":"0x000000","Text":"hello world!"} |
| ImageLayerContent |
string |
No |
Properti elemen layer. Properti dijelaskan sebagai berikut: Penting
Parameter ini wajib jika ComponentType diatur ke image. MaterialId: ID aset media. Nama yang Anda tentukan saat mengunggah aset media digunakan sebagai ID aset media. Nilai harus berupa string berformat JSON. Nama parameter harus dalam upper-camel case. |
{"MaterialId":"6cf724c6ebfd4a59b5b3cec6f10d****"} |
| CaptionLayerContent |
string |
No |
Properti elemen layer. Properti dijelaskan sebagai berikut: Penting Parameter ini wajib jika ComponentType diatur ke caption.
Nilai harus berupa string berformat JSON. Nama parameter harus dalam upper-camel case. |
{"BorderWidthNormalized":0.01,"SizeNormalized":0.05,"Color":"0x000000","LocationId":"RV01","SourceLan":"cn","FontName":"KaiTi","BorderColor":"0xffffff"} |
| HtmlLayerContent |
string |
No |
Konfigurasi komponen H5. |
{"htmlUrl":http://caster.example.com} |
Font studio produksi
| Font | Nilai FontName |
| KaiTi | KaiTi |
| Alibaba PuHuiTi - Regular | AlibabaPuHuiTi-Regular |
| Alibaba PuHuiTi - Bold | AlibabaPuHuiTi-Bold |
| Alibaba PuHuiTi - Light | AlibabaPuHuiTi-Light |
| Source Han Sans - Regular | NotoSansHans-Regular |
| Source Han Sans - Bold | NotoSansHans-Bold |
| Source Han Sans - Light | NotoSansHans-Light |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| ComponentId |
string |
The component ID. Use this ID to query, modify, or delete the component. |
21926b36-7dd2-4fde-ae25-51b5bc8e**** |
| RequestId |
string |
The request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
Contoh
Respons sukses
JSONformat
{
"ComponentId": "21926b36-7dd2-4fde-ae25-51b5bc8e****",
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidUserId.Malformed | %s, please check userId. | |
| 400 | InvalidCasterId.Malformed | %s, please check and try again later. | |
| 400 | MissingParameter | %s. | |
| 400 | InvalidParameter.Malformed | There are invalid parameters: %s. | |
| 400 | InvalidPositionNormalized.Malformed | %s, please check and try again later. | |
| 400 | DuplicateLocationID | %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. | |
| 404 | CanvasNotExist | %s, please check and try again later. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.