JSPM

react-native-is-muted

0.0.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 210
  • Score
    100M100P100Q73887F
  • License MIT

Check if mobile is muted

Package Exports

  • react-native-is-muted
  • react-native-is-muted/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-is-muted) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-native-is-muted

npm version PRs Welcome

Showcase iOS     Showcase Android

Check if a device is muted.

Installation

  1. Install the library from npm

    npm install react-native-is-muted
  2. Link native code React native 0.60+ (IOS only)

    cd ios && pod install # for iOS

    pre 0.60

    react-native link react-native-is-muted
  3. (IOS only) Add MuteChecker.caf to buildpase "Copy Bundle Resources"

    1. Open your project in XCode
    2. Click on project name > Target > Build Phases > Copy Bundle Resources
    3. Click on the + icon
    4. Click on Add another...

      Red circle around 'Add another...'

    5. Add MuteChecker.caf, located in nodemodules/react-native-is-muted/ios/

      Location of mutechecker.caf

  4. Done

Usage

Promise

import IsMuted from 'react-native-is-muted';

IsMuted()
  .then(muted => {
    console.log('Muted:', muted);
  })
  .catch(error => {
    console.error(error);
  });

Async await

import IsMuted from 'react-native-is-muted';

try {
  const muted = await IsMuted();
  console.log('Muted: ', muted);
} catch (error) {
  console.error(error);
}