Use this client to connect, purchase, decode Bitstartion streams.
- Pay for Bitstation streams
- Deserialise stream into HLS segment and playlist.
- HLS server to watch stream on any HLS viewer (Web, VLC, Quicktime..etc)
- Lightning Network wallet to pay for a stream.
You can start watching streams with the provided index.js
// First setup of config.json.
node conenct.js <station key>
// When stream is connected and ready, you can use any HLS compatible video player to start watching stream.
Streamer class deals with broadcasting data to Dazaar and handling payment processing
const config = {
HLS_SERVER:'http://localhost:8021', // HLS server for watching the stream
STREAM_COST: 10, // Cost of stream in Sats per second (Get this value from broadcaster)
MENU: [1, 10, 60, 90, 120], // Array of minutes of streaming you want to pay for
}
Binary media data from dazaar stream
You have no access to the stream, you must subscribe
You have no access to the stream, you must subscribe to stream
You have access to stream to start deserialising.
Request a invoice from some satoshi
amounts from broadcaster.
Start deserialisng from a position. When data starts flowing stream-data
will be calledd
Optional Config
{
start : 0 // Position where to start streaming.
// 0 = start from the beginning stream. Good for watching VOD content.
// Leave config as undefined for watching Live content
}
HLS class will deserialise stream and serve the content
{
"PLAYLIST_PATH" : "./.playlist", //Folder where the HLS output is saved
"PLAYLIST_FILE" : "output.m3u8", //Name of playlist file
}
Delete current playlist directory and create empty playlist file.
Start HLS Server for serving the video.
Decoded Dazaar data for updating playlist file and creating segment files.
Bitstation server : Broadcasting and charging for videos.
Bitstation client : Connect to a stream, decode and purchase videos.
Bitstation player : Simple video client GUI built on top of Bitstation client.