方法簽章 MeetMediaApiClient.createMediaLayout
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
建立新的媒體版面配置。只能套用使用此函式建立的媒體版面配置。否則,applyLayout
函式會擲回錯誤。建立媒體版面配置後,您可以建構要求,並透過 applyLayout
函式套用該要求。這些媒體版面配置物件可重複使用 (可重新指派給其他要求),但每個串流都不同 (需要為每個串流建立)。
簽名
createMediaLayout(canvasDimensions: CanvasDimensions): MediaLayout;
詳細資料
參數
傳回
MediaLayout
新的媒體版面配置。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["# Method signature MeetMediaApiClient.createMediaLayout\n\n| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. \n|\n| **To use the Meet Media API to access real-time media from a conference, the Google Cloud project, OAuth principal, and all participants in the conference must be enrolled in the Developer Preview Program.**\n\nCreates a new media layout. Only media layouts that are created with this\nfunction can be applied. Otherwise, the\n[`applyLayout`](/meet/media-api/reference/web/media_api_web.meetmediaapiclient.applylayout)\nfunction will throw an error. Once the media layout has been created, you can\nconstruct a request and apply it with the\n[`applyLayout`](/meet/media-api/reference/web/media_api_web.meetmediaapiclient.applylayout)\nfunction. These media layout objects are meant to be reused (can be reassigned\nto a different request) but are distinct per stream (need to be created for\neach stream).\n\nSignature\n---------\n\n createMediaLayout(canvasDimensions: CanvasDimensions): MediaLayout;\n\nDetails\n-------\n\n| Optional | No |\n|----------|----|\n\nParameters\n----------\n\n| Name | Type | Optional | Description |\n|--------------------|---------------------------------------------------------|----------|-------------------------------------------------------|\n| `canvasDimensions` | [CanvasDimensions](./media_api_web.canvasdimensions.md) | No | The dimensions of the canvas to render the layout on. |\n\nReturns\n-------\n\n[MediaLayout](./media_api_web.medialayout.md)\n\nThe new media layout."]]