Method
__init__
(self, id, width=400, height=300, allow_autoplay=False, **kwargs)
Source from the content-addressed store, hash-verified
| 328 | """ |
| 329 | |
| 330 | def __init__(self, id, width=400, height=300, allow_autoplay=False, **kwargs): |
| 331 | self.id=id |
| 332 | src = "https://www.youtube.com/embed/{0}".format(id) |
| 333 | if allow_autoplay: |
| 334 | extras = list(kwargs.get("extras", [])) + ['allow="autoplay"'] |
| 335 | kwargs.update(autoplay=1, extras=extras) |
| 336 | super(YouTubeVideo, self).__init__(src, width, height, **kwargs) |
| 337 | |
| 338 | def _repr_jpeg_(self): |
| 339 | # Deferred import |
Callers
nothing calls this directly
Tested by
no test coverage detected