Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>(Updated with working curl command below)</p> <p>Based on the documentation here:</p> <p><a href="https://developers.google.com/glass/timeline#attaching_video" rel="nofollow">https://developers.google.com/glass/timeline#attaching_video</a></p> <p>Streaming video to the timeline does not work like attaching a video to the timeline. Instead you are supposed to make a multipart post. Note that the content type of the actual post is going to look like this:</p> <pre><code>Content-Type: multipart/related; boundary="mymultipartboundary" </code></pre> <p>Then there will be two more content types, the parts of the multipart content, and the second of those will be the content type you specified.</p> <p>Some supporting information is here under "multipart upload":</p> <p><a href="https://developers.google.com/glass/media-upload" rel="nofollow">https://developers.google.com/glass/media-upload</a></p> <p>If you want a static video that has a cat, you can try this :)</p> <p><a href="https://dl.dropboxusercontent.com/u/6562706/sweetie-wobbly-cat-720p.mp4" rel="nofollow">Sweetie-Cat-Video</a></p> <p>Here is a curl command I have tested and works, both with the static video link above, and with a NASA stream as below:</p> <pre><code>curl --header "Authorization: Bearer your_token_here" -H "Content-Type: multipart/related; boundary=mymultipartboundary" --data-binary @input.txt https://www.googleapis.com /upload/mirror/v1/timeline </code></pre> <p>Where input.txt looks like this:</p> <pre><code>--mymultipartboundary Content-Type: application/json; charset=UTF-8 { "text": "Sweetie" } --mymultipartboundary Content-Type: video/vnd.google-glass.stream-url http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8 --mymultipartboundary-- </code></pre> <p>If I execute this command then go into the timeline, I see a loading card with the <a href="http://en.wikipedia.org/wiki/Clapperboard" rel="nofollow">clapper board</a> icon, then the first frame of the video with loading text. Then the stream starts. I do not see the text that I posted ("Sweetie"). If I return to the card later, in the nasa example, the stream starts from current time. In the case of the cat video (not a stream), it does not appear that the video is cached, it re-downloads it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload