npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-advanced-player

v2.0.26

Published

Modular react-native player

Readme

react-native-advanced-player

Player is modular, this allows to compose components as needed.

Running example app

NOTE: use yarn to install dependencies! There is a postinstall hook which deletes react-native-advanced-player modules, to be able to update lib without the need to reinstall and restart the packager Postinstall script doesn't work well with npm.

cd example
yarn
cd ios
pod install
cd ..
react-native run-ios
// or 
react-native run-android

You can also notice that the example app react-native-advanced-player dependency version is "..". This is done to be able to require the lib from the repo and not from npm.

Also don't forget to link all react-native dependencies:

react-native link

And check these instructions for linking:

Main parts of the library:

  • withEvent (hoc)
  • GoogleCastControl (ES6 class)
  • PlayerControl (Provider, Consumer, using Context API)
  • AirPlayControl (Provider, Consumer, using Context API)
  • VolumeControl (Provider, Consumer, using Context API)

You can use them as needed or compose into a single component. Example demonstrates wrapping components in hocs as needed.

PlayerControl

enables control of such things as:

  • loading the track
  • player speed
  • state (playing/paused)
  • how much of current track is buffered (loaded), in percent
  • what is the current progress in percent
  • adds rewind rewind / seek methods
  • sends commands to withGoogleCastControl hoc to handle play/pause/seek on Chromecast

It uses react-native-video under the hood.

GoogleCastControl

Enables control of the Chromecast

  • load track to chromecast
  • seeking
  • play / pause
  • start / stop cast

VolumeControl

Enables control of the system volume

withEvent

Returns the event object and isShown property. It works by finding the appropriate event in the events prop, by comparing if the currentTime is within bounds of event (time and end properties)

AirPlayControl

This component is used to display currently connected devices

Additional (helper) components

  • ProgressSlider

ProgressSlider

This component is used to enable proper seeking slider behavior, without lags or jumps when user is seeking the track. It uses react-native-slider library, as it offers useful events e.g. onSlidingStart, onSlidingComplete.

Additional (helper) methods

  • setupPlayerNotificationControls