1.0.7 • Published 6 years ago

react-native-amr v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-native-amr

Native AMR play for react-native (iOS only)

npm install react-native-amr
react-native link react-native-amr
import AMR from 'react-native-amr'

AMR.stop();

//callback: (error, event: {status}) => void)
// status: 0:playing, 1:play success end, 2:play failed, 3: stop

AMR.play(path, (error, event) => {
    console.log(error);
    console.log(event);
    if (!error) {
        if (event.status === 1) {
            //play success
        } else if(event.status === 3) {
            //stop success
        }
    } else {
        //event.status = 2
        console.log('can\'t play');
    }
});
1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago