如何使用 YouTube-API-V3 嵌入和播放私人视频 [英] How to embed and play private videos using YouTube-API-V3

查看:42
本文介绍了如何使用 YouTube-API-V3 嵌入和播放私人视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序可以在 YouTube 上上传隐私状态为私有的视频,但是当我尝试使用 iFrame(YouTube 播放器)播放它们时,它声明视频是私有的.当我在另一个标签页中登录 YouTube 时,它​​正在播放.

I have an application which uploads videos on YouTube with privacy status as private, but when I try to play them using iFrame (YouTube Player), it states the video is private. When I sign in to YouTube in another tab then it's playing.

有没有什么方法可以播放私人视频,而授权/登录将在后端使用 YouTube-API 处理?

Is there any way to play private videos while the authorization/sign in will be handled in the backend using YouTube-API?

推荐答案

这里有一个相关的 SO 帖子.

为此,您需要对您的帐户进行 OAuth.您有能力做到这一点,而无需一直进行身份验证.YouTube 数据 API:使用 V3 的服务的 OAuth 身份验证,无需用户干预.

You need to an OAuth to your account for that. You have the capacity to do this without authenticating all the time. YouTube Data API: OAuth Authentication for services using V3 without user intervention.

这篇关于如何使用 YouTube-API-V3 嵌入和播放私人视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆