私は Google Glass Mirror API をいじっていて、ビデオをストリーミングできるようにしたいと考えています。
これは私が試したPythonコードスニペットです:
def _insert_item_video_stream(self):
"""Insert a timeline item with streaming video."""
logging.info('Inserting timeline item with streaming video')
body = {
'notification': {'level': 'DEFAULT'},
'menuItems' : [{'action' : 'PLAY_VIDEO'},
{'payload' : 'https://eye-of-the-hawk.appspot.com/static/videos/waterfall.mp4'}],
}
self.mirror_service.timeline().insert(body=body).execute()
return 'A timeline item with streaming video has been inserted.'
ただし、ビデオは空白でした。どんなアイデアでもとても役に立ちます!