tlenclos / react-native-audio-streaming

iOS & Android react native module to play an audio stream, with background support and media controls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Android] Import not working

browncj opened this issue · comments

Hi,

I managed to get the library saved and installed, as well as built. But I get the error "Cannot read property 'string' of undefined" whenever I add the line

import {Player} from 'react-native-audio-streaming';

to my source file.

android

Any idea what the issue may be?

I think that problem is version of PropTypes used by this repo. This repo is using PropTypes from React, but PropTypes are moved to prop-types npm package. You can see it by going to index.js of repo and you will find this:
Player.propTypes = { url: React.PropTypes.string.isRequired };