Skip to content

A wrapper around periscope.tv event streams, allowing you to easilly access them

Notifications You must be signed in to change notification settings

ArnaudRinquin/peristream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Peristream

A wrapper around periscope.tv event streams, allowing you to easilly access them.

Usage

npm i -S peristream
var peristream = require('peristream');

var stream = peristream(urlOrId);

stream.connect().then(function(emitter){
  emitter.on(peristream.ALL, function(message){
    // ...
  });

  emitter.on(peristream.HEARTS, function(message){
    // ...
  });

  emitter.on(peristream.COMMENTS, function(message){
    // ...
  });

  emitter.on(peristream.DISCONNECT, function(message){
    // ...
  });

});

// eventually...
stream.disconnect();

Example

Example browser usage at periscope-examples.

For a node example, simply:

npm start

About

A wrapper around periscope.tv event streams, allowing you to easilly access them

Resources

Stars

Watchers

Forks

Packages

No packages published