youtube: use IPython IFrame()¶
from IPython.display import IFrame
# Youtube
IFrame(
"https://www.youtube.com/embed/i_ZcP7iNw-U?rel=0&controls=0",
width="600",
height="400",
# extras='frameborder="0" allowfullscreen',
)Loading...
ditto with remove-input¶
the same with the input area hidden with
the
jupyterlab-hidecellextensionusing the
remove-inputcell tag
Loading...
local video: use ipywidgets’s Video()¶
for a local video - source needs to be put under _static
# same as above, you can use `remove-input` to hide the code
from ipywidgets import Video
Video.from_file("_static/under-static.mp4", autoplay=False, width='800px')Loading...
using mystmd recipe¶
remote - youtube¶
using the iframe myst directive
works in both jlab and jb2
local (and not under _static)¶
using the figure myst directive
this works in mystmd/jb2 (only in autoplay), but not in jlab
local (and under _static)¶
using the figure myst directive again
this works in mystmd/jb2 (only in autoplay), but not in jlab