def show_video()

in experiments/notebooks/cloudstory-api/cloudstory.py [0:0]


def show_video(bucket, key, size=100, autoplay=False, controls=True):
    source = f'https://s3.amazonaws.com/{bucket}/{key}'
    html = '''
    <div align="middle">
        <video width="{}%"{}{}>
        <source src="{}" type="video/mp4">
        </video>
    </div>
    '''
    html = html.format(size, 
                    ' controls' if controls else '', 
                    ' autoplay' if autoplay else '', 
                    source)
    return HTML(html)