Streamer

Methods

inner addStreamHistory(torrent)

Adds torrents to stream history DB.

Parameters:
Name Type Description
torrent object

Contains magnet, files, metadata etc.

inner chooseFile(files)

Allow the user to choose what file to stream.

Parameters:
Name Type Description
files array

files in the torrent

inner getFile()

Get file when selected

inner getFileHistory()

Called when choosing a file in the history form.

inner runScript(e) → {boolean}

On keypress on the input

Parameters:
Name Type Description
e object

the event

Returns:
boolean -
  • whether enter was pressed or not.

inner startPlaying(file)

Start playing the file

Parameters:
Name Type Description
file object

the file

inner stop()

Stop downloading the torrent.

inner streamHistory()

Get stream history, and make options in a select tag. Called on window load.

inner submitmagnet(magnet)

Add magnet to WebTorrent

Parameters:
Name Type Description
magnet string

the magnet URI