View source: R/set_video_thumbnail.R
| set_video_thumbnail | R Documentation |
Uploads a custom video thumbnail to YouTube and sets it for a video. Requires OAuth 2.0 authentication.
set_video_thumbnail(video_id, file, ...)
video_id |
Character. ID of the video to set the thumbnail for. |
file |
Character. Path to the thumbnail image file (JPG or PNG, max 2MB). |
... |
Additional arguments passed to |
A list containing the response from the API.
https://developers.google.com/youtube/v3/docs/thumbnails/set
## Not run:
# Set API token via yt_oauth() first
set_video_thumbnail(video_id = "yJXTXN4xrI8", file = "thumbnail.jpg")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.