輸入開關動作 — 有效載荷 - MediaLive

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

輸入開關動作 — 有效載荷

下列各節顯示輸入切換動作的承載。

在此承載中,ScheduleActionStartSettings 僅包含 FixedModeScheduleActionStartSettingsImmediateModeScheduleActionStartSettingsFollowModeScheduleActionStartSettings 其中之一。

請參閱以下範例,以取得每個標籤的範例。

如需有關下列 JSON 中欄位的意義和值的資訊,請參閱輸入開關的欄位

{ "ChannelId": "string", "Creates": { "ScheduleActions": [ { "ScheduleActionStartSettings": { "FixedModeScheduleActionStartSettings": { "Time": "string" }, "FollowModeScheduleActionStartSettings": { "FollowPoint": "enum", "ReferenceActionName": "string" }, "ImmediateModeScheduleActionStartSettings": { } }, "ActionName": "string", "ScheduleActionSettings": { "InputSwitchSettings": { "InputAttachmentNameReference": "string", "InputClippingSettings": { "InputTimecodeSource": "enum", "StartTimecode": { "Timecode": "string" }, "StopTimecode": { "LastFrameClippingBehavior": "enum", "Timecode": "string" } }, "UrlPath": ["string", ...] } } ] } }

切換到具有固定開始時間的實時輸入的示例

此請求範例是在固定開始時間切換到即時輸入。切換動作稱為 studio-feed,會切換到連接稱為 live-studio-feed 之輸入附件的輸入。它會在指定的 UTC 時間切換到此輸入。

{ "ChannelId": "999999", "Creates": { "ScheduleActions": [ { "ScheduleActionStartSettings": { "FixedModeScheduleActionStartSettings": { "Time": "2018-05-21T20:42:19.000Z" } }, "ActionName": "studio-feed", "ScheduleActionSettings": { "InputSwitchSettings": { "InputAttachmentNameReference": "live-studio-feed" } } } ] } }

靜態檔案參數的範例如下

此請求的範例是切換到靜態檔案輸入,以跟隨前一個輸入的結尾。切換動作稱為 action-ad-003,會切換到連接稱為 zel-cafe 之輸入附件的輸入。呼叫的動作 action-ad-002 結束時,它會切換到此輸入。此動作的檔案會遭到裁切,使其在 30 秒和 11 個影格後結束:

{ "ChannelId": "999999", "Creates": { "ScheduleActions": [ { "ScheduleActionStartSettings": { "FollowModeScheduleActionStartSettings": { "FollowPoint": "END", "ReferenceActionName": "action-ad-002" } }, "ActionName": "action-ad-003", "ScheduleActionSettings": { "InputSwitchSettings": { "InputAttachmentNameReference": "zel-cafe", "InputClippingSettings": { "InputTimecodeSource": "ZEROBASED", "StopTimecode":{ "Timecode": "00:00:30:11", "LastFrameClippingBehavior": "INCLUDE_LAST_FRAME" } } } } } ] } }

立即開始時間切換至動態輸入的範例

此請求的範例是立即切換到動態檔案輸入。切換動作稱為 action-unscheduled-standby,會切換到連接稱為 dynamic-unscheduled-standby 之輸入附件的輸入。對於動態輸入的這種用法,要使用的檔案為 oceanwaves.mp4

{ "ChannelId": "999999", "Creates": { "ScheduleActions": [ { "ScheduleActionStartSettings": { "ImmediateModeScheduleActionStartSettings": { } }, "ActionName": "action-unscheduled-slate", "ScheduleActionSettings": { "InputSwitchSettings": { "InputAttachmentNameReference": "slate", "UrlPath":[ "main/oceanwaves.mp4", "redundant/oceanwaves.mp4"] } } } ] } }