Socket
Socket
Sign inDemoInstall

apm-react-audio-player

Package Overview
Dependencies
67
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

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.


Version published
Maintainers
2
Install size
8.09 MB
Created

Readme

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

Last updated on 26 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc