谷歌眼镜镜像API视频的路线图是什么?该API是否允许流式视频进出设备,如玻璃演示视频http://www.youtube.com/watch?v=v1uyQZNg2vE所示?谷歌镜像API视频
6
A
回答
8
Mirror API没有公布的路线图。我们开发人员预览的一部分动机是弄清楚。
首先,为了澄清,该视频中显示的流媒体是Google+环聊。这是Glass内置的一项功能。
更新:Glass现在支持视频流。你可以找到完整的文档here。
要添加一个视频流使用的URL多POST到视频的部分之一,是这样的:
POST /upload/mirror/v1/timeline HTTP/1.1
Host: www.googleapis.com
Authorization: Bearer {auth token}
Content-Type: multipart/related; boundary="mymultipartboundary"
Content-Length: {length}
--mymultipartboundary
Content-Type: application/json; charset=UTF-8
{ "text": "Skateboarding kittens" }
--mymultipartboundary
Content-Type: video/vnd.google-glass.stream-url
http://example.com/path/to/kittens.mp4
--mymultipartboundary--
1
的Youtube视频流是可能的。我使用“YoutubeExtractor”命名空间在C#.net中完成了它。解析you tube视频中的视频(.mp4)url并进行流式处理。这是代码。它为我工作得很好。当复制该网址时,获取您点击分享后可用的管道链接
private static String youtubevideoStream(MainController controller)
{
string link = "http://youtu.be/9uYKISlL7Vg";
IEnumerable<VideoInfo> videoInfos = DownloadUrlResolver.GetDownloadUrls(link);
VideoInfo video = videoInfos.First(info => info.VideoType == VideoType.Mp4 && info.Resolution == 360);
String vLink = video.DownloadUrl;
TimelineItem videocard= new TimelineItem()
{
Text = "Menu Card",
BundleId = "666",
Notification = new NotificationConfig() { Level = "DEFAULT" },
MenuItems = new List<MenuItem>()
{
new MenuItem() {Action = "DELETE"},
}
};
String mediaLink = vLink;
if (!String.IsNullOrEmpty(mediaLink))
{
Stream stream = null;
if (mediaLink.StartsWith("/"))
{
stream = new StreamReader(controller.Server.MapPath(mediaLink)).BaseStream;
}
else
{
HttpWebRequest request = WebRequest.Create(mediaLink) as HttpWebRequest;
request.UseDefaultCredentials = false;
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
byte[] b = null;
using (Stream streamFromWeb = response.GetResponseStream())
using (MemoryStream ms = new MemoryStream())
{
int count = 0;
do
{
byte[] buf = new byte[1024];
count = streamFromWeb.Read(buf, 0, 1024);
ms.Write(buf, 0, count);
} while (streamFromWeb.CanRead && count > 0);
b = ms.ToArray();
stream = new MemoryStream(b);
}
}
controller.Service.Timeline.Insert(videocard, stream, "video/mp4").Upload();
}
else
{
controller.Service.Timeline.Insert(videocard).Fetch();
}
相关问题
- 1. 谷歌镜子API
- 2. 谷歌护目镜API
- 3. 谷歌玻璃,ASM镜像
- 4. 谷歌和镜像网站
- 5. 谷歌图像/视频搜索
- 6. 谷歌眼镜上的“录制视频”菜单项
- 7. 如何在WebView中播放YouTube视频谷歌眼镜
- 8. 使用WebRTC从谷歌眼镜进行灰度视频流
- 9. 在谷歌眼镜
- 10. 作物图像ala谷歌风镜
- 11. 镜子API在播放视频
- 12. 谷歌视频聊天可以在Android应用中使用谷歌API a
- 13. 谷歌可视化API
- 14. 谷歌视觉API - tatusCode.RESOURCE_EXHAUSTED
- 15. 谷歌可视化Api + SQL
- 16. .M3U8视频流谷歌电视
- 17. 谷歌街景图像API
- 18. 使用谷歌图像API
- 19. 的iPad 1视频镜像全屏
- 20. Vuforia Videoplayback翻转和镜像视频
- 21. 如何在iPhone上镜像视频?
- 22. 如何镜像直播YouTube视频
- 23. 的Youtube谷歌API V3:列出视频没有返回视频标签
- 24. 谷歌护目镜在PHP
- 25. 谷歌眼镜和SpeechRecognizer类
- 26. 谷歌眼镜记忆
- 27. 谷歌护目镜意向
- 28. VideoView在CardScrollView谷歌眼镜
- 29. 谷歌+和Facebook风格的iframe youtube视频。默认显示视频图像,当图像点击视频播放
- 30. 镜像API invalid_grant
伟大的问题跟踪器将做的事情。我认为增加在谷歌环聊中推卡的能力会很好。 – djscoutmaster
尝试使用视频/ vnd.google-glass.stream-url时,内容不会播放。显示第一帧,加载动画将永久运行。 任何机会我们可以看到一些代码示例添加到正在实施的文档中? – PrplRugby
@PrplRugby - 我需要更多详细信息来帮助您排除故障。你介意创建一个新的问题,包括你的代码和JSON有效载荷吗? – mimming