我一直在玩 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.'
然而,视频只是空白。任何想法都会非常有帮助!