Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Created June 12, 2017 22:02
Show Gist options
  • Save samueleresca/8a9957c32b4a8e20e33bca4e7da654bb to your computer and use it in GitHub Desktop.
Save samueleresca/8a9957c32b4a8e20e33bca4e7da654bb to your computer and use it in GitHub Desktop.
var authorizations =
player
.init()
.map(() =>
playAttemps
.map(movieId =>
player.authorize(movieId)
.retry(3)
.takeUntil(cancels))
.concatAll())
.concatAll();
authorizations.forEach(
license => player.play(license),
error => showError()
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment