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 ,则必须指定此值,否则将忽略该值。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):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"]],["最后更新时间 (UTC):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"]]