@cassette/core

2.0.0-beta.4 • Public • Published

@cassette/core

@cassette/core provides React Context-based components which expose an API for consuming and updating media player state. The API abstraction maps very closely to the set of actions that would be available to an end user of a conventional media player, while remaining flexible enough to accommodate varying media player design paradigms.

Installation

npm install @cassette/core

Components included:

  • FullscreenContextConsumer - used to read and update the state of the surrounding fullscreenContext
  • FullscreenContextProvider - wraps an area which should be fullscreen-able
  • PlayerContextConsumer - used to read and update the state of the surrounding playerContext
  • PlayerContextGroup - a wrapper which can be used to share configuration among multiple descendant PlayerContextProvider instances as well as prevent multiple media elements from playing audio simultaneously
  • PlayerContextProvider - wraps an area which shares a common playerContext

Higher-order components included:

  • playerContextFilter - consumes the surrounding fullscreenContext and playerContext and passes only a specified subset of the context, as well as any additional props, to the given child component

Find full documentation here!

Package Sidebar

Install

npm i @cassette/core

Weekly Downloads

48

Version

2.0.0-beta.4

License

MIT

Unpacked Size

1.21 MB

Total Files

58

Last publish

Collaborators

  • benwiley4000