class_docstr: Class for embedding a YouTube Video in an IPython session, based on its video id.
  
  e.g. to embed the video from https://www.youtube.com/watch?v=foo , you would
  do::
  
      vid = YouTubeVideo("foo")
      display(vid)
  
  To start from 30 seconds::
  
      vid = YouTubeVideo("abc", start=30)
      display(vid)
  
  To calculate seconds from time as hours, minutes, seconds use
  :class:`datetime.timedelta`::
  
      start=int(timedelta(hours=1, minutes=46, seconds=40).total_seconds())
  
  Other parameters can be provided as documented at
  https://developers.google.com/youtube/player_parameters#Parameters
  
  When converting the notebook using nbconvert, a jpeg representation of the video
  will be inserted in the document.
class_docstr_tok: ["Class","for","embedding","a","YouTube","Video","in","an","IPython","session",",","based","on","its","video","id",".","e.g",".","to","embed","the","video","from","https",":","\/\/www.youtube.com\/watch","?","v=foo",",","you","would","do",":",":","vid","=","YouTubeVideo","(","``","foo","''",")","display","(","vid",")","To","start","from","30","seconds",":",":","vid","=","YouTubeVideo","(","``","abc","''",",","start=30",")","display","(","vid",")","To","calculate","seconds","from","time","as","hours",",","minutes",",","seconds","use",":","class",":","`","datetime.timedelta","`",":",":","start=int","(","timedelta","(","hours=1",",","minutes=46",",","seconds=40",")",".total_seconds","(",")",")","Other","parameters","can","be","provided","as","documented","at","https",":","\/\/developers.google.com\/youtube\/player_parameters","#","Parameters","When","converting","the","notebook","using","nbconvert",",","a","jpeg","representation","of","the","video","will","be","inserted","in","the","document","."]
code: def __init__(self, id, width=400, height=300, **kwargs):
      self.id = id
      src = "https://www.youtube.com/embed/{0}".format(id)
      super(YouTubeVideo, self).__init__(src, width, height, **kwargs)
  
imports: from os.path import exists, isfile, splitext, abspath, join, isdir
  from os import walk, sep
  from IPython.core.display import DisplayObject
label_desc: Use image node_id 1 to create a new YouTubeVideo object from inherited base classes: IFrame with example: obj = YouTubeVideo(id, width, height)