(Updated using the curl working command below)
Based on the documentation here:
https://developers.google.com/glass/timeline#attaching_video
Streaming video on the timeline does not work like attaching video to the timeline. Instead, you should do a multi-page post. Note that the content type of the actual message will look like this:
Content-Type: multipart/related; boundary="mymultipartboundary"
Then there will be two more types of content, parts of multi-page content, and the second of them will be the specified type of content.
Some supporting information is here under "multipart upload":
https://developers.google.com/glass/media-upload
If you want a static video with a cat, you can try the following :)
Sweetie-cat-video
Here is the curl command that I tested and works, both with reference to the static video above, and with the NASA stream, as shown below:
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
Where input.txt looks like this:
--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--
If I run this command, go to the timeline, I see a boot card with the clapper panel , then the first frame of the video with the text loading. Then the flow begins. I do not see the text that I published ("Sweetie"). If I return to the map later, in the nasa example, the flow will start from the current time. In the case of a cat video (not a stream), the video does not seem to be cached, it reloads it.