Giter Site home page Giter Site logo

nathanwalker / nativescript-play-pause-button Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joshdsommer/nativescript-play-pause-button

0.0 3.0 0.0 1.97 MB

NativeScript Play/Pause button

License: Other

CSS 2.07% TypeScript 66.64% Objective-C 29.81% Ruby 1.48%

nativescript-play-pause-button's Introduction

NativeScript Play Pause Button

npm npm

Android

Nativescript Play Pause Button

iOS

Nativescript Play Pause Button

Example:

<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

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 for helping get the iOS version up and running

nativescript-play-pause-button's People

Contributors

joshdsommer avatar nathanwalker avatar theoriginaljosh avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.