Skip to content

yiky84119/react-native-amr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Aug 7, 2019
e7fce0d · Aug 7, 2019

History

12 Commits
Aug 7, 2019
Nov 16, 2017
Nov 16, 2017
Nov 17, 2017
Nov 16, 2017
Aug 7, 2019
Aug 7, 2019

Repository files navigation

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

About

Native AMR play for react-native (iOS only)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published