更新XE6之后,将视频附加到video/vnd.google-glass.stream-url [英] Attaching video with video/vnd.google-glass.stream-url after Update XE6

查看:109
本文介绍了更新XE6之后,将视频附加到video/vnd.google-glass.stream-url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用XE6 Google Glass Update附加视频时遇到问题. 我正在使用的代码是这样的:

Attaching video with the XE6 Google Glass Update is getting stuck. The code I'm using is this:

    String videoUrl = "http://www.youtube.com/watch?v=9bZkp7q19f0"; 
    if (videoUrl != null) {
      String contentType = "video/vnd.google-glass.stream-url";
      InputStream is = new ByteArrayInputStream( videoUrl.getBytes( ) );
      MirrorClient.insertTimelineItem(credential, timelineItem, contentType, is);
    }

不确定我在做什么错,但是视频仍在尝试下载,这正在耗尽我的电量……

Not sure what I'm doing wrong, but the video is still trying to download and it's killing my battery ...

推荐答案

我认为问题在于,您正在尝试流式传输YouTube页面,而不是从该页面本身流式传输视频.

I think the issue is that you're trying to stream a YouTube page instead of stream the video from that page itself.

不幸的是,YouTube对于如何获取不是您自己的视频的视频流并不十分满意. (对于已有的视频甚至没有帮助.)

Unfortunately, YouTube isn't very forthcoming about how to get the stream for videos that aren't yours. (And not even that helpful about videos that are.)

这篇关于更新XE6之后,将视频附加到video/vnd.google-glass.stream-url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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