1

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

ただし、ビデオは空白でした。どんなアイデアでもとても役に立ちます!

4

1 に答える 1

1

2つのブラケットを取り外した後、これを修正できました! ああ、パイソン。:/

これは固定回線です。

   'menuItems' : [{'action' : 'PLAY_VIDEO', 'payload' : 'https://eye-of-the-hawk.appspot.com/static/videos/waterfall.mp4'}],
于 2013-09-23T23:34:07.593 に答える