Skip to content
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
Merged

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

merged 1 commit into from Oct 3, 2018

Conversation

finaiized
Copy link
Contributor

@finaiized 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
Copy link
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
@Carreau Carreau added the Hacktoberfest you want to participate to hacktoberfest ? Here is an easy issue. label Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest you want to participate to hacktoberfest ? Here is an easy issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants