Git Product home page Git Product logo

react-native-volume-controller's Introduction

react-native-volume-controller

Volume Controller for iOS and Android.

First installation step (applied for both iOS & Android)

$ npm install react-native-volume-controller --save

2. Automatic installation

$ react-native link react-native-volume-controller

3. Manual installation

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-volume-controller => ios
    • add ReactNativeVolumeController.xcodeproj to the Libraries folder in your XCode project
  3. In XCode, in the project navigator, select your project. Add libReactNativeVolumeController.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)

Android

Manual installation

  1. In Android Studio open Module Settings and add a Gradle Project.
  2. Look for react-native-volume-controller android folder and link with a Gradle.
  3. Open MyApplication.java from main app and put the ReactNativeVolumeControllerPackage
 @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new ReactNativeVolumeControllerPackage()
      );
    }

Usage

Using component

import { SliderVolumeController } from 'react-native-volume-controller';

class PlayerUI extends Component {
  render() {
    return (
        <SliderVolumeController />
    );
  }
}

Style props

Use the props style like a Slider

TODO - Need help :P

  • Android Listener to know when press volume button and after dispatch event to react
  • Create interface to change volume with Android
  • Enable Airplay button when is possible

react-native-volume-controller's People

Contributors

joeyfigaro avatar parinha avatar tavernari avatar w8-for-wolf avatar williamtran29 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.