# nativescript-play-pause-button

> NativeScript Play Pause Button

Latest version **1.0.2** (published 2016-08-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install nativescript-play-pause-button
pnpm add nativescript-play-pause-button
yarn add nativescript-play-pause-button
bun add nativescript-play-pause-button
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-08-06 |
| First published | 2016-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Josh Sommer |
| Maintainers | joshdsommer |
| Keywords | NativeScript, JavaScript, Android, iOS |

## Links

- npm: https://www.npmjs.com/package/nativescript-play-pause-button
- Repository: https://github.com/TheOriginalJosh/nativescript-play-pause-button
- Issues: https://github.com/TheOriginalJosh/nativescript-play-pause-button/issues
- npm.io page: https://npm.io/package/nativescript-play-pause-button

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2016-08-06
- 1.0.1 — 2016-07-27
- 1.0.0 — 2016-07-27
- 0.1.1 — 2016-07-24
- 0.1.0 — 2016-07-24
- 0.0.2 — 2016-07-23
- 0.0.1 — 2016-07-23

## README

### NativeScript Play Pause Button
[![npm](https://img.shields.io/npm/v/nativescript-play-pause-button.svg)](https://www.npmjs.com/package/nativescript-play-pause-button)
[![npm](https://img.shields.io/npm/dt/nativescript-play-pause-button.svg?label=npm%20downloads)](https://www.npmjs.com/package/nativescript-play-pause-button)


# Android

![Nativescript Play Pause Button](https://raw.githubusercontent.com/TheOriginalJosh/nativescript-play-pause-button/master/sample-android.gif)


# iOS

![Nativescript Play Pause Button](https://raw.githubusercontent.com/TheOriginalJosh/nativescript-play-pause-button/master/sample-ios.gif)

Example:

```xml
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
	xmlns:PlayPause="nativescript-play-pause-button"
	loaded="pageLoaded">
	<StackLayout backgroundColor="#ececec">
		<PlayPause:PlayPauseButton width="100" height="100" playPauseTap="PPTapped"  buttonColor="#e11a60" buttonBgColor="#ececec" marginTop="100"></PlayPause:PlayPauseButton>
	</StackLayout>
</Page>
```

The `playPauseTap` event contains event data with the state `true` is play and `false` is paused.

###Example
```typescript
export function PPTapped(args) {
    console.log(' Play Pause tapped : ' + args.eventData.state);
}
```

### iOS only

backgound color must be set with `buttonBgColor` or else the background will be black



### Libraries used:

Android based on: https://github.com/recruit-lifestyle/PlayPauseButton

iOS based on: https://github.com/suzuki-0000/AnimatablePlayButton

### Thank You [Nathan Walker](https://github.com/NathanWalker) for helping get the iOS version up and running

---
_Source: https://npm.io/package/nativescript-play-pause-button · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
