react-native-cool-audio-player
v1.0.3
Published
simple audio player package for react native with all required controls & dynamic props
Downloads
5
Maintainers
Readme
react-native-cool-audio-player
simple audio player for react native with all required controls & dynamic props
still in beta version, adding more costomization and documentation soon :rocket: :beers:
Installation
$ npm i react-native-cool-audio-player --save
$ yarn add react-native-cool-audio-player
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-cool-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-cool-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 :rocket: :beers: