Code Monkey home page Code Monkey logo

dat-shaka-player-plugin's Introduction

deprecated

More info on active projects and modules at dat-ecosystem.org


dat-shaka-player-plugin

A plugin for 'shaka-player' to load dat:// URI schemes.

Installation

$ npm install dat-shaka-player-plugin

Usage

const register = require('dat-shaka-player-plugin')
const shaka = require('shaka-player')

register(shaka)

API

plugin = require('dat-shaka-player-plugin')(shaka, options)

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
}

plugin.requests

A Set that represents the currently active requests being made by the shaka-player for resources stored in a DAT archive.

plugin.options

The options passed to the plugin factory.

plugin.swarms

A Map of swarms corresponding to a DAT link.

plugin.drives

A Map of hyperdrives corresponding to a DAT link.

plugin.destroyed

A boolean indicating that the plugin is destroyed.

plugin.unregister()

An alias to plugin.destroy()

plugin.destroy()

Destroy the plugin, close the underlying resources, and unregister as a scheme for shaka-player.

License

MIT

dat-shaka-player-plugin's People

Contributors

jwerle avatar serapath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.