More info on active projects and modules at dat-ecosystem.org
A plugin for 'shaka-player' to load dat://
URI schemes.
$ npm install dat-shaka-player-plugin
const register = require('dat-shaka-player-plugin')
const shaka = require('shaka-player')
register(shaka)
A factory function to create and register the plugin with
shaka-player
to handle dat://
URI requests for MPEG-DASH
manifests (*.mpd
) or HLS playlists (*.m3u8
). shaka
is the
shaka-player
module and options
can be:
{
archive: Object, // an optional 'hyperdrive' instance that represents a DAT archive. This will override the resolved archive from the DAT link.
swarm: Object, // an optional 'discovery-swarm-web' or 'discovery-swarm' object to swarm for resources
discovery: Object, // an optional object passed to the swarm constructor
}
A Set
that represents the currently active requests being made by the
shaka-player
for resources stored in a DAT archive.
The options passed to the plugin factory.
A Map
of swarms corresponding to a DAT link.
A Map
of hyperdrives corresponding to a DAT link.
A boolean indicating that the plugin is destroyed.
An alias to plugin.destroy()
Destroy the plugin, close the underlying resources, and unregister as a
scheme for shaka-player
.
MIT