Use Ipyreactplayer if you want to be able to control a videoplayer in a jupyter notebook, lab, voila or solara. It is a simple wrapper using Ipyreact with react-player Similar to streamlit-player or dash-player in nature.
Works with:
- Google Colab
- Jupyter notebook
- Jupyter lab
- Voila (
version>0.5
) - Solara
see the example under
solara
.
from ipyreactplayer import VideoPlayer
url = 'https://vimeo.com/663967148/fb7c372be3?share=copy'
player = VideoPlayer(url=url)
display(player)
# seek to position
player.seek(1024.0)
# play/pause
player.play_pause()
# mute/unmute
player.muted = True
# show/hide controls
player.controls = True
# change source
player.url = 'https://vimeo.com/755209790/8e428d0213?share=copy'
voila example.ipynb
From notebook
solara run solara.ipynb
As app
cd solara/pages
solara run .
$ pip install ipyreactplayer