How do I construct a YT.Player object and access its properties getCurrentTime()
within an Angular2 Component using Typescript?
I have tried installing several YouTube wrappers via npm, (eg: youtube-player), and added Type definitions for YouTube, with a reference in app.ts:
/// <reference path="../../typings/main/ambient/youtube/index.d.ts" />
but I still get an error when importing, eg: import YouTubePlayer from 'youtube-player';
returns Cannot find module 'youtube-player'.
I've forked the Angular2 preboot/Webpack starter, my source repo is here