LiveCuepoints
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
liveCuepoint
資源和 liveCuepoints.insert
方法已淘汰,並由 liveBroadcasts.cuepoint
方法取代。
liveCuepoint
資源會在廣播影片串流中插入提示點,這可能會觸發廣告插播。
注意:這個 API 指令實際上是 YouTube Content ID API 的一部分,且與管理 liveBroadcast
和 liveStream
資源的要求不同。
方法
這個 API 支援下列 liveCuepoints
資源的方法:
- 插入
- 在直播中插入提示點。目前,如要對這個方法提出要求,必須透過與 YouTube 內容擁有者相關聯的帳戶進行授權。
立即試用。
屬性
下表定義此資源中顯示的屬性:
屬性 |
id |
string
YouTube 指派的值來明確識別提示點。 |
kind |
string API 資源類型。對於 liveCuepoint 資源,這個值為 youtubePartner#liveCuepoint 。 |
broadcastId |
string
YouTube 指派的 ID,用於識別插入提示點的廣播。 |
settings |
object
settings 物件定義提示點的設定。 |
settings.offsetTimeMs |
long
這個值可指定觀眾看到廣告或串流內廣告插入畫面時的時間點。屬性值會識別監控串流開始時的時間偏移 (以毫秒為單位)。雖然是以毫秒為單位進行測量,雖然實際值是預估值,YouTube 會盡可能插入提示點。如果你的廣播沒有監控串流,則不應指定這個參數的值。
這個屬性的預設值是 0 ,表示應盡快插入提示點。如果播送串流未延遲,則 0 也是唯一有效的值。不過,如果您的廣播串流延遲,則屬性值可以指定插入提示點的時間。詳情請參閱入門指南。
注意:如果您的廣播階段處於測試階段,系統會從測試開始的時間開始計算偏移量。 |
settings.walltime |
datetime
這個值會指定插入提示點的壁鐘時間。這個值以 ISO 8601 (YYYY-MM-DDThh:mm:ss.sssZ ) 格式指定。
如果要求嘗試插入為這個屬性及 settings.offsetTimeMs 屬性指定值的提示點,API 會傳回錯誤。 |
settings.cueType |
string
提示點的類型。如需不同類型的提示點,請參閱開始使用指南。另請參閱廣播的生命週期文件,瞭解在播送期間插入提示點的最佳做法。
這項屬性的有效值如下:
|
settings.durationSecs |
unsigned integer
提示點的持續時間 (以秒為單位)。如果 cueType 是 ad ,則必須指定這個值,否則系統會忽略此值。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-02-22 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2023-02-22 (世界標準時間)。"],[[["The `liveCuepoint` resource and `liveCuepoints.insert` method have been replaced by the `liveBroadcasts.cuepoint` method."],["A `liveCuepoint` resource inserts a cuepoint into a live broadcast, potentially triggering an ad break."],["The `liveCuepoints/insert` method requires authorization from a YouTube Content Owner account and is part of the YouTube Content ID API."],["The `liveCuepoints` resource contains properties such as `id`, `kind`, `broadcastId`, and `settings`, defining the cuepoint's unique identifier, type, associated broadcast, and specific configurations."],["Cuepoint `settings` include `offsetTimeMs` or `walltime` to specify when the cuepoint should occur, `cueType` to define its type (e.g., `ad`), and `durationSecs` for the cuepoint's duration, which is required for ad cuepoints."]]],["The `liveCuepoint` resource and `liveCuepoints.insert` method are deprecated; use `liveBroadcasts.cuepoint` instead. A `liveCuepoint` inserts a cue point into a broadcast, potentially triggering an ad break. The `insert` method adds a cuepoint and requires authorization from a YouTube Content Owner. Cuepoints have properties including `id`, `broadcastId`, and `settings`. Settings define `offsetTimeMs`, `walltime`, `cueType` (e.g., 'ad'), and `durationSecs`. The `walltime` and `offsetTimeMs` values cannot be specified at the same time.\n"]]