Skip to content

Instantly share code, notes, and snippets.

@tchakabam
Created July 11, 2016 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tchakabam/053a0cc502c8f5f12ac48de266c305b7 to your computer and use it in GitHub Desktop.
Save tchakabam/053a0cc502c8f5f12ac48de266c305b7 to your computer and use it in GitHub Desktop.
var Hls = require('hls.js');
var P2PWrapper = require('hlsjs-p2p-wrapper');
...
// creating Hls.js instance via wrapper vs classic instantiation via constructor
var hls = withP2P ? new P2PWrapper(Hls).createPlayer(myHlsjsConfig, myP2PConfig) : new Hls(myHlsjsConfig);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment