title: sound is not played using react-native-sound
body: <p>Im new to react-native and Im building an app to play sounds on button press and I couldnt achieve this, is it because of errors in my code ? Also pls suggest the solution for playing the sounds and suggest the corrections </p>
  
  <p>Here's my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, { Component } from 'react';
  import { StatusBar, Dimensions, Image, TouchableWithoutFeedback, Animated } from 'react-native';
  import { Actions } from 'react-native-router-flux';
  import Sound from 'react-native-sound';
  
  const a = require('./Images/landing-bnt1-on.png');
  const b = require('./Images/landing-bnt1.png');
  const c = require('./Images/landing-bnt2-on.png');
  const d = require('./Images/landing-bnt2.png');
  
  const btnSound = new Sound('./Sounds/btn_sound.mp3');
  
  const w = Dimensions.get('window').width;
  const h = Dimensions.get('window').height;
  
  class MainScreen extends Component {
    state = {
      computerPressed: false,
      teamPressed: false
    }
  
    componentWillMount() {
         this.slide1 = new Animated.Value(0);
         this.slide2 = new Animated.Value(0);
     this.bnt1();
     this.bnt2();
   }
   bnt1() {
         Animated.timing(
           this.slide1, {
            delay: 100,
           toValue: w / 1.161,
           duration: 300,
         }
         ).start();
       }
  
   bnt2() {
             Animated.timing(
               this.slide2, {
               delay: 300,
               toValue: w / 1.161,
               duration: 300,
             }
             ).start();
           }
  render() {
  return (
    &lt;Image
    source={require('./Images/bg_img.png')}
    style={styles.backgroundStyle} &gt;
  
    &lt;StatusBar hidden /&gt;
  
      &lt;Image
      source={require('./Images/History.png')}
      style={styles.historybuttonStyle} /&gt;
  
      &lt;Image
      source={require('./Images/logo_ws.png')}
      style={styles.logoStyle} /&gt;
  
  &lt;TouchableWithoutFeedback
  onPress={() =&gt; {
    btnSound.play();
    Actions.screen2({ challenge: 'Computer' });
    }
  }
  onPressIn={() =&gt; {
      this.setState({ computerPressed: true });
    }
  }
  onPressOut={() =&gt; {
      this.setState({ computerPressed: false });
  }
  } &gt;
      &lt;Animated.Image
      source={this.state.computerPressed ? a : b}
      style={[styles.landingbnt1Style, { transform: [{ translateX: this.slide1 }] }]} /&gt;
  
  &lt;/TouchableWithoutFeedback&gt;
  
  &lt;TouchableWithoutFeedback
  onPress={() =&gt; {
    Actions.screen2({ challenge: 'Team' });
    }
  }
  onPressIn={() =&gt; {
      this.setState({ teamPressed: true });
    }
  }
  onPressOut={() =&gt; {
      this.setState({ teamPressed: false });
  }
  } &gt;
      &lt;Animated.Image
      source={this.state.teamPressed ? c : d}
      style={[styles.landingbnt2Style, { transform: [{ translateX: this.slide2 }] }]} /&gt;
  &lt;/TouchableWithoutFeedback&gt;
  
  &lt;/Image&gt;
  );
  }
  }
  const styles = {
  
   backgroundStyle: {
      flex: 1,
      width: w,
      height: h,
      flexWrap: 'wrap',
      position: 'relative'
    },
    logoStyle: {
      width: w,
      height: h,
      resizeMode: 'contain',
      position: 'absolute',
       bottom: h / 15
    },
    historybuttonStyle: {
      width: w / 7.5,
      height: h / 14,
      right: (w / 20),
      top: (h / 40),
      position: 'absolute'
    },
    landingbnt1Style: {
      width: w / 1.44,
      height: h / 13.14,
      top: h / 1.41,
      left: -(w / 1.44)
    },
    landingbnt2Style: {
      width: w / 1.44,
      height: h / 13.14,
      top: h / 1.35,
      left: -(w / 1.44)
    }
  };
  export default MainScreen;</code></pre>
  </div>
  </div>
  </p>
  
  <p>It may not be the correct way of using react-native-sound it is because i couldnt find an example it would be better I someone also share their codes using react-native-sound </p>