Hi, may I direct you to the following resource. It may help. A few links there to some documents that show the youtube API at work.
You may want to look at using [player].loadVideoById(id, startseconds, endseconds, quality) ([player] is referring to your element that holds the video) when you want to load in a new video.
This is also quite useful as a wrapper for youtube (and other) videos that may make it easier