【问题标题】:How to correctly use PLAY_VIDEO in Mirror API如何在 Mirror API 中正确使用 PLAY_VIDEO
【发布时间】:2013-09-16 16:54:07
【问题描述】:

我一直在使用 Google Glass Mirror API,希望能够流式传输视频。

这是我试过的 Python 代码 sn-p:

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.'

但是,视频只是空白。任何想法都会非常有帮助!

【问题讨论】:

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


【解决方案1】:

删除两个括号后能够解决此问题!哦,蟒蛇。 :/

这是固定线路:

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

【讨论】:

    猜你喜欢
    • 2017-10-27
    • 2016-11-30
    • 2015-06-13
    • 1970-01-01
    • 2017-08-13
    • 1970-01-01
    • 2014-11-29
    • 2020-05-26
    • 1970-01-01
    相关资源
    最近更新 更多