如何在Mirror API中正确使用PLAY_VIDEO

时间:2013-09-16 16:54:07

标签: python google-mirror-api google-glass

我一直在玩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.'

然而,视频只是空白。任何想法都会非常有用!

1 个答案:

答案 0 :(得分:1)

卸下两个支架后能够解决这个问题!哦,Python。 :/

这是固定的一行:

   'menuItems' : [{'action' : 'PLAY_VIDEO', 'payload' : 'https://eye-of-the-hawk.appspot.com/static/videos/waterfall.mp4'}],