napari-animation icon indicating copy to clipboard operation
napari-animation copied to clipboard

Docs: give embedded videos responsive size

Open GenevieveBuckley opened this issue 1 year ago • 1 comments

This nice to have to-do item came up during development of https://github.com/napari/napari-animation/pull/200

https://github.com/napari/napari-animation/pull/200#issuecomment-1914100665

Responsive (or percentage based) sizing of embedded videos. This currently isn't supported by the sphinx video plugin, so we'd have to either modify that or write our own HTML template string. (https://github.com/napari/napari-animation/pull/200#discussion_r1465848115)

https://github.com/napari/napari-animation/pull/200#discussion_r1465848115

I don't like this part. Currently it sets the width of the embedded video to 500 pixels. I'd prefer it was a percentage of the page width instead (i.e. more responsive to different screen sizes). I don't think you can do that easily with sphinxcontrib-video as it currently exists, so maybe we should replace this dependency with a template docstring of the HTML we need to embed in the RST document, so we can have more control over the output result. Docs: https://github.com/sphinx-contrib/video

GenevieveBuckley avatar Feb 02 '24 06:02 GenevieveBuckley

There is an upstream PR for this: https://github.com/sphinx-contrib/video/pull/26 but alas it might be withering on the vine.

psobolewskiPhD avatar Feb 17 '24 16:02 psobolewskiPhD