### Save the animationfilename='animation.webm'ani.save(filename,fps=6,extra_args=['-vcodec','libvpx'])
In [5]:
### get the URL path where file is served in a project in cocalc:importosdirs=os.getcwd().split('/')project_id=dirs[2]path=os.path.join(*dirs[3:])ifdirs[3:]else''url=os.path.join('/',project_id,'raw',path,filename)print(url)
### Show the animation in an html snippetfromIPython.displayimportHTMLHTML('''<video autoplay controls loop><source src="{url}" type="video/webm"></video>'''.format(url=url))