html - YouTube 缩略图破坏了 maxres 使用

标签 html node.js youtube-api angular-cli

youtube 是否不允许您从具有最高质量图像的 channel /播放列表中提取缩略图?

目前,我正在使用 Nodejs/angular-cli 从 channel ID 中提取 yt 缩略图,但是当我编辑此文件以显示 maxresdefaults 时,它会破坏功能。

改变

<div class="col-md-3">
    <img [src]="video.thumbnails.high.url" height="auto" width="auto" /> 
<h4>hqdefault</h4>

<div class="col-md-3">
    <img [src]="video.thumbnails.maxres.url" height="auto" width="auto" /> 
<h4>maxresdef</h4>

— 不起作用,有什么建议/清晰度吗?

所以我不得不想象 youtube 不允许从 channel ID 缩略图中提取 Maxres?

最佳答案

Resources of the same type may still have different thumbnail image sizes for certain images depending on the resolution of the original image or content uploaded to YouTube. For example, an HD video may support higher resolution thumbnails than non-HD videos.

还有

maxres - object - The highest resolution version of the thumbnail image. This image size is available for some videos and other resources that refer to videos, like playlist items or search results. This image is 1280px wide and 720px tall.

来源:https://developers.google.com/youtube/v3/docs/thumbnails

简而言之, channel 不明确支持 maxres 图像。

关于html - YouTube 缩略图破坏了 maxres 使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50181368/

相关文章:

html - CSS 媒体查询冲突

youtube - 如何在我的 Roku channel 中流式传输 Youtube 视频?

youtube - 基于云的自动新youtube上传下载到保管箱

node.js - 最小化 Node.js 服务器之间的延迟和带宽使用

node.js - 我尝试使用 NPM 安装 IPFS 模块,但出现以下错误

javascript - async/await 隐式返回 promise ?

javascript - 检测 YouTube 视频开始播放的时间

html - :not pseudo class not working with more than one element

javascript - 当我在表单中输入内容时,它返回为未定义

html - 我很难将侧边栏放在我的谷歌地图旁边 - gmaps4rails