react-native-background-audio
background audio for react native app
Last updated 2 years ago by ttomaszito .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-native-background-audio 
SYNC missed versions from official npm registry.

react-native-background-audio

A react component for playing audio in the back of your project.

npm install react-native-background-audio --save
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import BgAudio from 'react-native-background-audio'

export default class App extends React.Component {
  render() {
    return (
      <BgAudio options={audio_options}></BgAudio>
    );
  }
}
const audio_options = {
  source:{local: require('./music/sample.mp3')}  //ex. require('./music/sample.mp3')
}

For Local audio source pass in Local object:

const audio_options = {
  source:{local: require('./music/sample.mp3')}  //ex. require('./music/sample.mp3')
}

For Remote audio uri pass in Remote object:

const audio_options = {
  source:{remote:{uri:"http://www.sample-videos.com/audio/mp3/india-national-anthem.mp3"}}
}

Current Tags

  • 1.1.4                                ...           latest (2 years ago)

16 Versions

  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 17
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |