Youtube 数据 API : 获取媒体流和播放 (JAVA) [英] Youtube data API : Get access to media stream and play (JAVA)

查看:22
本文介绍了Youtube 数据 API : 获取媒体流和播放 (JAVA)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想访问 YouTube 视频并使用我自己的媒体播放器播放.我能够使用 youtube 数据 API 获取视频属性(标题、网址等).我可以访问视频流并使用我自己的媒体播放器(如 Android 媒体播放器)来播放它.我正在 JAVA 中尝试所有这些.

I want to access a youtube video and play using my own media player. I am able to get the video properties (title, url etc..) using the youtube data API. Can I get access to the stream of the video and use my own Media Player (like the Android Media Player) to play it. I am trying all of these in JAVA.

提前致谢.. :)

推荐答案

你不能.在此处查看有关 API 可以处理的内容的进一步阅读:YoutubeAPI
如果你能得到一个 InputStream ,谷歌根本不会得到任何广告收入.

但是您可以解析从 API 获得的视频网址的页面,并在 flash 标签中查找真正的视频链接.

You can't. Look here for further reading on what the API could handle: YoutubeAPI
If you could get an InputStream on that, Google won't get any money for advertisement at all.

But you could parse the page of the video-url you got from the API and look for the real video-link inside the flash tags.

这篇关于Youtube 数据 API : 获取媒体流和播放 (JAVA)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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