- Runs on Windows and macOS.
- Synchronized playback of streaming media across various websites.
- Public, private, and offline sessions.
- Support for P2P (WebRTC) and Direct IP (WebSocket) connections.
- P2P uses swarm-peer-server with 64-character hex public keys, called "friend codes".
- Both P2P and Direct IP use client-server architecture.
- Real-time chat with peers.
- Queue of media requested by peers in session.
- Timestamp cue points parsed from media description.
- Auto-fullscreen of embedded media players on websites.
- Per-user playback permissions, managed by the host.
- Basic host administrative functionality (kicking peers).
- Partial support for Chrome Extensions.
Download the latest version of Metastream from the official website.
-
Download specific installer files from the GitHub releases page.
-
Try the (unstable) development version by cloning the Git repository. See the "How to Contribute" instructions.
There were two main designs goals in mind while building Metastream.
- Support most media streaming websites.
- Make networking resiliant in case any backend services go down.
tl;dr: Electron is more flexible.
To synchronize media on websites, there are two options: use a public API provided by the service OR inject scripts to interact with the media player.
In past projects I used public APIs. This works great for a few websites, but it doesn't scale well since most don't have an API or requires a lot more effort.
To inject scripts into a website, a browser extension is required. If Metastream were a web app, it would require browser extensions for each vendor (Chrome, Firefox, Edge, etc.). On top of this, there's a history of extensions getting removed from vendor stores without an available recourse.
Browser extensions can inject scripts deeply in nested iframes. This is necessary for websites that embed external media players such as YouTube embeds.
Auto-fullscreen is a feature in Metastream in which video players on a webpage are enlarged to take up the full application frame. This required some trickery with injecting mouse clicks to trigger user gestures, something not possible with a browser extension.
Ultimately Electron gives more flexibility to interact with webpages to help make all web streaming media better supported.
Most web apps typically provide only one way to connect to peers—using their proprietary backend service. If it ever goes down, you can no longer use the web app.
By using Electron, I provide two ways to connect to peers: WebRTC, prone to downtime, and Websockets, always available for Direct IP connections.
In the future, I'd like to investigate adding more ways to connect with friends such as using Discord's Rich Presence features.
$ git clone https://github.com/samuelmaddock/metastream.git
$ cd metastream
$ yarn
$ yarn dev
# Open multiple instances for local network testing
$ NUM_WINDOWS=2 yarn dev
Builds app binaries for the host architecture.
$ yarn package
The version of Electron used in the release app depends on a fork which is not yet automatically used in the current build process. It can be manually downloaded from samuelmaddock/muon. Once downloaded, place the ZIP into ~/.electron