From 1041f44680d312adbec9eb24406a7368c9ed9506 2021-09-20 23:16:04 From: yuji96 Date: 2021-09-20 23:16:04 Subject: [PATCH] don't overwrite extras entered by user --- diff --git a/IPython/lib/display.py b/IPython/lib/display.py index 68f9f3e..19d4c35 100644 --- a/IPython/lib/display.py +++ b/IPython/lib/display.py @@ -323,7 +323,8 @@ class YouTubeVideo(IFrame): self.id=id src = "https://www.youtube.com/embed/{0}".format(id) if allow_autoplay: - kwargs.update(autoplay=1, extras=['allow="autoplay"']) + extras = list(kwargs.get("extras", [])) + ['allow="autoplay"'] + kwargs.update(autoplay=1, extras=extras) super(YouTubeVideo, self).__init__(src, width, height, **kwargs) def _repr_jpeg_(self):