Watermarks
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
watermark
資源可識別特定頻道影片播放期間顯示的圖片。您也可以指定圖片連結的目標頻道,以及有關浮水印在影片播放期間出現的時間及顯示時間長度。
方法
這個 API 支援下列 watermarks
資源方法:
- 設定
- 將浮水印圖片上傳至 YouTube 並設定頻道。
- 未設定
- 刪除頻道的浮水印圖片。
立即試用。
屬性
下表定義了這項資源中顯示的屬性:
屬性 |
timing |
object
timing 物件會封裝頻道浮水印圖片在影片播放期間的相關資訊。 |
timing.type |
string
決定浮水印圖片在影片播放期間顯示時間的時間方法。如果值為 offsetFromStart ,則 offsetMs 欄位代表從影片開頭的偏移值。如果值為 offsetFromEnd ,則 offsetMs 欄位代表從影片結尾的偏移值。 |
timing.offsetMs |
unsigned long
時間偏移量 (以毫秒為單位),用來決定宣傳項目在影片播放期間顯示的時間。type 屬性的值決定是從影片的開始或結束開始計算。 |
timing.durationMs |
unsigned long
浮水印圖片應顯示的時間長度 (以毫秒為單位)。 |
position |
object
position 物件會封裝用於顯示浮水印圖片的影片空間位置相關資訊。 |
position.type |
string
宣傳項目在影片播放器中的位置。
這個屬性的有效值如下: |
position.cornerPosition |
string
促銷商品的播放器角落。項目一律會顯示在播放器的右上角。
這個屬性的有效值如下: |
imageUrl |
string
頻道浮水印圖片的網址。YouTube 會產生這個網址,並在對 watermark.set 要求的 API 回應中傳回此網址。 |
imageBytes |
bytes
浮水印圖片的大小,以位元組為單位。 |
targetChannelId |
string
浮水印圖片連結頻道的 YouTube 頻道 ID。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-04-26 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2024-04-26 (世界標準時間)。"],[[["A watermark resource displays an image during a channel's video playbacks, with the option to link to a target channel."],["The API provides `set` and `unset` methods to upload and delete watermark images respectively."],["The `timing` object controls when a watermark appears, using `type` to determine if it's measured from the start or end of a video and `offsetMs` for the time offset, with `durationMs` defining its display length."],["The `position` object defines the watermark's location within the video, with `cornerPosition` specifically determining the corner."],["The `targetChannelId` property is used to indicate the YouTube channel ID that the image links to when interacted with."]]],["A watermark resource is an image displayed during a channel's video playbacks. Key actions include setting a watermark by uploading an image and specifying its `targetChannelId` for linking. The `timing` object defines when the image appears using `type`, `offsetMs`, and `durationMs`. The `position` object, set to 'corner', determines the spatial location, specifically `topRight`. Watermarks can be removed using the `unset` method. The API response provides an `imageUrl` and `imageBytes`.\n"]]