Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/t-mullen/hypercast-browser
p2p video broadcasting for dat:// enabled web browsers
https://github.com/t-mullen/hypercast-browser
dat p2p streaming
Last synced: 30 days ago
JSON representation
p2p video broadcasting for dat:// enabled web browsers
- Host: GitHub
- URL: https://github.com/t-mullen/hypercast-browser
- Owner: t-mullen
- Created: 2018-01-25T21:17:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-27T22:23:29.000Z (over 6 years ago)
- Last Synced: 2024-10-24T13:41:00.622Z (2 months ago)
- Topics: dat, p2p, streaming
- Language: JavaScript
- Homepage:
- Size: 95.7 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hypercast-browser
[louiscenter/hypercast](https://github.com/louiscenter/hypercast) refactored as a standalone browser-only module (no Electron!).
Both broadcasting and viewing requires [Beaker Browser](https://beakerbrowser.com/).
## Demo
[Try it now in Beaker Browser!](https://t-mullen.github.io/hypercast-browser/demo/demo.html)1. Allow webcam access.
2. Click the link to view the stream across the Dat protocol!
3. Share the link and stream to others! :smiley:## Install
With Browserify:```bash
npm install --save hypercast-browser
``````javascript
var Hypercast = require('hypercast-browser')
```Or without it:
```html
```
## API
### `Hypercast.broadcast(mediaStream, opts)`
Broadcasts a new MediaStream over the Dat protocol. Returns a Dat URL of the stream archive.`mediaStream` - A WebRTC MediaStream.
`opts` - Options object. Defaults are:
```javascript
{
interval: 10
mimeType: 'video/webm; codecs="opus,vp8"'
}
```### `Hypercast.view(url, opts)`
Views a Hypercast stream via the Dat protocol. Returns a video element that will play the stream.`url` - Dat URL of stream archive. (Get this from `broadcast`!)
`opts` - Options object. Defaults are:
```javascript
{
videoElement: null // Specify this to provide your own video element
mimeType: 'video/webm; codecs="opus,vp8"'
}
```