looks like it just renders the current frame to a canvas element and saves it. https://github.com/gurumukhi/youtube-screenshot/blob/master/...