Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/EstebanFuentealba/react-native-android-audio-streaming-aac
React Native Android module audio streaming AAC
https://github.com/EstebanFuentealba/react-native-android-audio-streaming-aac
Last synced: 6 days ago
JSON representation
React Native Android module audio streaming AAC
- Host: GitHub
- URL: https://github.com/EstebanFuentealba/react-native-android-audio-streaming-aac
- Owner: EstebanFuentealba
- License: mit
- Created: 2015-09-27T07:32:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-30T02:15:18.000Z (about 9 years ago)
- Last Synced: 2024-08-16T18:55:42.708Z (4 months ago)
- Language: Java
- Size: 11.6 MB
- Stars: 25
- Watchers: 3
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-android-audio-streaming-aac ★25 - A react native streaming player (Components / Media)
- awesome-react-native - react-native-android-audio-streaming-aac ★25 - A react native streaming player (Components / Media)
- awesome-react-native - react-native-android-audio-streaming-aac ★25 - A react native streaming player (Components / Media)
- awesome-react-native-ui - react-native-android-audio-streaming-aac ★19 - A react native streaming player (Components / Media)
- awesome-react-native - react-native-android-audio-streaming-aac ★25 - A react native streaming player (Components / Media)
README
# React Native Android Audio Streaming AAC
A react native wrapper for [aacdecoder-android](https://code.google.com/p/aacdecoder-android/).
## Setup
* `android/settings.gradle`
```gradle
...
include ':react-native-android-audio-streaming-aac'
project(':react-native-android-audio-streaming-aac').projectDir = new File(settingsDir, '../node_modules/react-native-android-audio-streaming-aac')
```* `android/app/build.gradle`
```gradle
...
dependencies {
...
compile project(':react-native-android-audio-streaming-aac')
}
```* register module (in MainActivity.java)
```java
import cl.json.react.AACStreamingPackage; // <--- importpublic class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
......
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mReactRootView = new ReactRootView(this);mReactInstanceManager = ReactInstanceManager.builder()
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
.addPackage(new MainReactPackage())
.addPackage(new AACStreamingPackage(MainActivity.class)) // <------- add package
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();mReactRootView.startReactApplication(mReactInstanceManager, "ExampleRN", null);
setContentView(mReactRootView);
}......
}
```## Usage
```js
var AACStreamingAndroid = require('react-native-android-audio-streaming-aac');AACStreamingAndroid.setURLStreaming('http://tunein.digitalproserver.com/bioconcebb.aac');
AACStreamingAndroid.play();
```# Run example
* `cd example`
* `npm install`
* `react-native start`
another tab
* `react-native run-android`