1
36%
ISC
BuckleScript bindings for the youtube iframe API

bs-youtube

bs-youtube is a statically typed interface to the Youtube iFrame API

Installation

npm install --save bs-youtube

In your bsconfig.json, include "bs-youtube" in the bs-dependencies.

Usage

See example/example.re for sample usage.

  • RE
  • ML
/*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

Development

npm run start

Documentation?

See example/example.re for sample usage and the Youtube API Docs for the methods you can access on the player.

TODO:

  • Documentation
  • Event listeners
  • Events
  • Probably refactor and make better.
  • Test 360 Videos