bs-youtube is a statically typed interface to the Youtube iFrame API
npm install --save bs-youtube
In your bsconfig.json
, include "bs-youtube"
in the bs-dependencies
.
See example/example.re
for sample usage.
/*Have to init the API before doing anything else */
Youtube.init();
let player = Youtube.getPlayer();
/*To play the currently loaded video */
Youtube.playVideo(player)
let _ = Youtube.init ()
let player = Youtube.getPlayer ()
let _ = Youtube.playVideo player
npm run start
See example/example.re
for sample usage and the Youtube API Docs for the methods you can access on the player.