Check if YouTube video is live or uploaded(检查 YouTube 视频是直播还是上传)
问题描述
我有一个 YouTube 直播活动.我可以使用 YouTube IFrame Player API 播放视频.我想知道是否有任何方法可以找到视频是现场活动视频还是常规上传的视频.我需要这些信息来设计我的控件.
I have a YouTube Live Event. I am able to play the video using the YouTube IFrame Player API. I want to know if there is any way that I can find if the video is a Live event video or a regular uploaded video. I need this information for designing my controls.
推荐答案
(目前)您可以做到这一点的唯一方法是使用 youtube 后端 api.根据视频 ID 获取有关视频的数据,并且在响应中您有一个 snippet.liveBroadcastContent
属性,该属性可以是 live、none 或即将到来的.
The only way you can do this (currently) is with youtube backend api.
Get data about the video based on its id and in the response you have a property snippet.liveBroadcastContent
which is either live, none, or upcoming.
这篇关于检查 YouTube 视频是直播还是上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:检查 YouTube 视频是直播还是上传


基础教程推荐
- Bokeh Div文本对齐 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01