Skip to content

simple audio player for react native with all required controls

Notifications You must be signed in to change notification settings

harshilJs/react-native-simple-audio-player

Repository files navigation

react-native-simple-audio-player

simple audio player for react native with all required controls

still in beta version, adding more costomization and documentation soon 🚀 🍻

Installation

$ npm i react-native-simple-audio-player --save

You'll also need react-native-video (to use controls and audio playback) and slider (for audio seekbar) package, you can install these like,

$ npm i react-native-video --save
$ npm install @react-native-community/slider --save

Import the package

import {AudioPlayer} from 'react-native-simple-audio-player';

Basic Usage

This package is still under construction and beta mode, You can still use this by passing your Audio URL to AudioPlayer component. Feel free to drop suggestions and improvements

import React from 'react';
import {View} from 'react-native';
import {AudioPlayer} from 'react-native-simple-audio-player';

const App = () => {
  return (
    <View
      style={{
        flex: 1,
        backgroundColor: '#313131',
        justifyContent: 'center',
      }}>
      <AudioPlayer
        url={'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3'}
      />
    </View>
  );
};

export default App;

Props


url

Audio file url.

Type Required
string yes

Adding more costomization and documentation soon 🚀 🍻

About

simple audio player for react native with all required controls

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published