Lộ trình cho video trên API gương kính google là gì? API có cho phép phát trực tuyến video đến hoặc từ thiết bị như được hiển thị trong video giới thiệu kính http://www.youtube.com/watch?v=v1uyQZNg2vE không?Google Mirror API Video
Trả lời
Không có lộ trình được xuất bản cho API gương. Một phần của động lực cho bản xem trước nhà phát triển của chúng tôi là tìm ra điều đó.
Trước tiên, chỉ cần làm rõ, luồng được hiển thị trong video đó là Hangout trên Google+. Đây là một tính năng được tích hợp vào Glass.
Cập nhật: Kính hiện hỗ trợ phát trực tuyến video. Bạn có thể tìm thấy toàn bộ tài liệu here.
Để thêm một dòng video làm một POST nhiều phần dữ liệu với URL tới video là một trong các bộ phận, như thế này:
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--
Youtube video là có thể. Tôi đã thực hiện nó trong C# .net sử dụng không gian tên "YoutubeExtractor". Giải quyết url video (.mp4) từ video ống của bạn và phát trực tuyến. Đây là mã. Nó làm việc tốt cho tôi. khi sao chép url, bạn sẽ nhận được liên kết ống bạn có sẵn sau khi bạn nhấp vào chia sẻ
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. Sự khác nhau giữa Glass Mirror API và Google GDK là gì?
- 2. Có thể chơi bằng Google Mirror API mà không cần thiết bị không?
- 3. Maven proxy vs mirror
- 4. .NET API cho Google Talk?
- 5. API cho chuyển đổi video trên web
- 6. Gạch tùy chỉnh api của Google Maps cho trò chơi video hư cấu trên thế giới
- 7. API Google Drive có hỗ trợ Phạm vi nội dung cho video tải lên không?
- 8. Không thể truy lục số liệu video bằng API Analytics của Google
- 9. Google Geocoding API - REQUEST_DENIED
- 10. Google hình ảnh api
- 11. API Google Latitude
- 12. API Google Drive javascript
- 13. Ảnh trên Google+ api
- 14. Google API cho Python
- 15. Đăng nhập Google API
- 16. google-files-api
- 17. API JavaScript của Google Maps v3
- 18. Tải video lên Facebook REST API cũ
- 19. YouYube API Xem Video Riêng tư
- 20. C# Skype API Cuộc gọi video
- 21. Android MediaCodec API video phát quá nhanh
- 22. Tạm dừng video youtube, youtube api
- 23. Google Drive - Phát trực tuyến video
- 24. Cách nhúng video TỪ Google Plus?
- 25. Lấy Google Maps API key
- 26. Xác thực API Google Drive
- 27. Api Google Analytics trên Azure
- 28. Google Drive và API Documents
- 29. API Lịch Google: java.lang.ClassNotFoundException: com.google.common.collect.Maps
- 30. API Google Maps v3 BrowserIsCompatible
Tuyệt vời sẽ thực hiện theo dõi vấn đề. Tôi nghĩ rằng việc thêm khả năng đẩy thẻ trong một hangout trên google sẽ rất tuyệt. – djscoutmaster
Khi cố gắng sử dụng video/vnd.google-glass.stream-url, nội dung không bao giờ phát. Khung đầu tiên được hiển thị và hoạt ảnh tải chạy vĩnh viễn. Bất kỳ cơ hội nào chúng ta có thể thấy một số mẫu mã được thêm vào tài liệu về việc này đang được triển khai? – PrplRugby
@PrplRugby - Tôi cần thêm chi tiết để giúp bạn khắc phục sự cố. Bạn có thể tạo ra một câu hỏi mới và bao gồm cả mã của bạn và tải trọng JSON không? – mimming