Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apm-react-audio-player

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apm-react-audio-player

This is a light react audio player that is wrapped around a HTML5 audio tag, created for use on American Public Media and Minnesota Public Radio's websites.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
130
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

apm-react-audio-player

This is a light react audio player that is wrapped around a HTML5 audio tag, created for use on American Public Media and Minnesota Public Radio's websites.

The library was designed to add a audio player to a body of a story which will not trigger the static audio player.

audio player img

Table of Contents

Dependencies

Installation

  • NPM
  • YARN

Importing

Usage

[License] (#License)

Dependencies

As of version 1.0.0, this library has no dependencies for usage.

Installation

There are several ways to install APM Player on your site.

NPM

npm install apm-react-audio-player

or to use yarn:

YARN

yarn add apm-react-audio-player

Importing

ES6 Import

The easiest way to include this in modern javascript, assuming you are using something like and Babel, is to use an import statement. The library uses named exports for all modules.

To import the player module:

import { ReactAudioPlayer } from 'apm-react-audio-player';

Usage

Props

See the audio tag documentation for detailed explanations of these attributes.

PropTypeDefaultNotes
titleStringempty string---
descriptionStringempty string---
urlStringempty string---
customStylesObject------
forwardBackwardBooleanfalse---

Example

class Example extends Component {
  const url='example.mp3'
  const audioStyles = {
    audioPlayer: {
      width: '1200px',
      backgroundColor: 'lightBlue'
    },
    playPause: {
      background: 'blue'
    },
    duration: {
      color: '#26c9c3'
    }
  };
  render() {
    return (
      <ReactAudioPlayer
      title={'title'}
      description={'description'}
      audioSrc={url}
      audioStyles={audioStyles}
      forwardBackward={true}
    />
    )
  }
}

License

MIT © Phanx091

FAQs

Package last updated on 24 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc