New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for width and height arguments when displaying Video #11353

Merged
merged 1 commit into from Oct 3, 2018

Conversation

Projects
None yet
2 participants
@finaiized
Contributor

finaiized commented Oct 1, 2018

This PR adds width and height attributes to IPython.display.Video. The current behaviour is preserved if neither width nor height are specified. Otherwise, the specified integer will be used to set the width/height of the video in pixels, much like IPython.display.Image. This addresses the feature request asked for in #11328.

Example usage:

Video('https://archive.org/download/Sita_Sings_the_Blues/Sita_Sings_the_Blues_small.mp4', width=600, height=200)

Here's a notebook that exercises these attributes:
video-width-height-test

@Carreau Carreau added this to the 7.1 milestone Oct 3, 2018

@Carreau

This comment has been minimized.

Member

Carreau commented Oct 3, 2018

Looks good !

As an improvement, you could try to see how to let users pass strings like 40%, 12em, but that's a good first step !

@Carreau Carreau merged commit 9fd6be2 into ipython:master Oct 3, 2018

4 checks passed

codecov/patch 80% of diff hit (target 0%)
Details
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +11.8% compared to 94b894d
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment