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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-playify

v1.0.3

Published

A custom media player

Downloads

11

Readme

npm downloads npm npm downloads npm downloads

First of all, I want to thank you all for choosing React Playify. React Playify is a lightweight and user-friendly media player built with React. Whether you're a developer looking to integrate a simple yet powerful media player into your React projects or a user seeking a hassle-free way to enjoy your music collection, React Playify offers a seamless solution. You can reach me [email protected]

Features

  • Lightweight
  • Small size
  • Accessible

Install

npm i react-playify

Quick Start

Don't forget to pass the audio array and the useState variables along with their respective set functions. Also, avoid setting the value to true initially. This is because the audio element can't be played until there is a DOM interaction by the user, as per the browser's rule, and we can't override this. If it seems confusing 😰😰, don't worry, it's simple.

❌ ❌ ❌ Don't set the value initially true ❌ ❌ ❌

  const [isPlaying, setIsPlaying] = useState(true)

✅ ✅ ✅Instead do this ✅ ✅ ✅

  const [isPlaying, setIsPlaying] = useState(false)
import { useState } from 'react'
import {Player} from 'react-playify'

function App() {
  const [isPlaying, setisPlaying] = useState(false)
  let musicArray = [
    {title:'Song 1',subtitle:'Song sub',audio:'song1.mp3',image:'image1.jpg'},
    {title:'Song 2',subtitle:'Song sub',audio:'song2.mp3',image:'image2.jpg'},
  ]
  return (
    <>
    <Player audio={musicArray} isPlaying={isPlaying} setisPlaying={setisPlaying} />
    </>
  )
}

export default App

Configuration

Below is all the available options you can pass to the component. Options without defaults are required. We will add more customization soon.!🚀🚀🚀

| Name | Type | Default | Description | | ---- |----------------| ------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------| | theme | string | null | By default it will be white theme. Other themes are glass, #141414 black, #3fa9ff blue, #862BD0 purple | | audio | array | null | Simply pass an array of object like this [{title:'',subtitle:'',audio:'',image:''}] . Apart from audio key you can pass value for other keys | | isPlaying | boolean | false | This is a Boolean value. Pass the first parameter of useState.| | setisPlaying | function | null | This function changes the Boolean value of isPlaying. Pass the second parameter of useState |

Made with ❤