indiecastfm/react-native-audio-streamer

Why does not play?

Opened this issue · 6 comments

Why does not this simple example play me?

	"react": "16.0.0-alpha.12",
	"react-native": "0.47.0",

Step 1
npm install react-native-audio-streamer --save

Step 2
react-native link react-native-audio-streamer

My source:

import React, { Component } from 'react'
import {
  AppRegistry,
  StyleSheet,
  Button,
  View
} from 'react-native'

import RNAudioStreamer from 'react-native-audio-streamer'

RNAudioStreamer.setUrl('http://lacavewebradio.chickenkiller.com:8000/stream.mp3')

export default class Stream extends Component {

  onPressPlay() {
    RNAudioStreamer.play()
  }

  render() {

    RNAudioStreamer.status((err, status)=>{
      if(!err) console.log(status)
    })

    return (
      <View style={styles.container}>
        <Button
          onPress={this.onPressPlay}
          title="PLAY"
          color="blue"
        />
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
})

AppRegistry.registerComponent('Stream', () => Stream)

Yes i did the same and its not working. Can someone please help us. Thanks

The links (URL) is offline bro... Has 404 error.

I have a working url but still it does not play in android but that url plays in browser
react-native: 0.52

Mine does not work in the emulator but it works on the device. Try it there.

It is not working. Getting error
undefined is not an object (evaluating '_reactNativeAudioStreamer2.default.setUrl')

@kannanseeni having a same problem, did you find any solution for this?