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

@barstoolsports/react-audio-player

Package Overview
Dependencies
Maintainers
4
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@barstoolsports/react-audio-player

Audio player for Barstool Sports

  • 2.5.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

React Audio Player

Audio Player

Installation

yarn install @barstoolsports/react-audio-player

Usage

import { AudioPlayer } from '@barstoolsports/react-audio-player'

...

<AudioPlayer
  trackTitle='Episode 1'
  trackUrl='audio.mp3'
  artist='Pardon My Take'
  cover='cover.jpg'
  duration='01:32:05'
  createdAt={new Date()}
/>

Compact Player

import { AudioPlayer } from '@barstoolsports/react-audio-player'

...

<AudioPlayer compact trackUrl='audio.mp3' />

Methods

import { AudioPlayer } from '@barstoolsports/react-audio-player'

...

const player = useRef()

const play = () => {
  player.current.play()
}

const pause = () => {
  player.current.pause()
}

<AudioPlayer ref={player} trackUrl='audio.mp3' />

Callback Props

PropDescription
onPlayCalled when audio starts/resumes playing
onPauseCalled when audio is paused
onAudioSpeedChangeCalled when audio playback speed is changed
onSkip30Called when "Skip 30" button is pressed
onBack15Called when "Back 15" button is pressed

FAQs

Package last updated on 30 Mar 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