Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Getting undefined error #25

Open
kannanseeni opened this issue Jun 16, 2018 · 6 comments
Open

Getting undefined error #25

kannanseeni opened this issue Jun 16, 2018 · 6 comments

Comments

@kannanseeni
Copy link

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',
},
})

Getting Error

undefined is not an object (evaluating '_reactNativeAudioStreamer2.default.setUrl')

@juanstein
Copy link

I'm having the same issue. Were you able to solve it?

@wdayanand
Copy link

work perfect on android but not working on ios

@assoumemba
Copy link

I have the same error.

image

I follow all steps.

see my code here:

import React, { Component } from 'react';
import { Alert, AppRegistry, Button, StyleSheet, View } from 'react-native';
import RNAudioStreamer from 'react-native-audio-streamer';

export default class RadioPlayer extends Component {

_onPressButton() {
Alert.alert('You tapped the button!')
}

_onPressPlay() {

RNAudioStreamer.setUrl('https://audioboom.com/posts/5766044-follow-up-305.mp3');
RNAudioStreamer.play();   

}

_onPressPause(){
RNAudioStreamer.pause();
}

render() {
return (












);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
buttonContainer: {
margin: 20
},
alternativeLayoutButtonContainer: {
margin: 20,
flexDirection: 'row',
justifyContent: 'space-between'
}
})

@Faisal-Manzer
Copy link

+1

@wazapenJr
Copy link

@wdayanand
work perfect on android but not working on ios

How did you build it on android?
I have this issue

  • What went wrong:
    Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:11:7-34
is also present at [:react-native-audio-streamer] AndroidManifest.xml:12:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:7:5-24:19 to override.

@raouldandresy
Copy link

Did you find any solution on IOS?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants