Giter VIP home page Giter VIP logo

dalalsunil1986 / react-native-soundcloud-waveform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pritishvaidya/react-native-soundcloud-waveform

0.0 0.0 0.0 598 KB

Creating a simple transform to the SoundCloud's waveforms from the image url

Home Page: https://medium.freecodecamp.org/how-to-make-realtime-soundcloud-waveforms-in-react-native-4df0f4c6b3cc

License: MIT License

JavaScript 79.28% Python 4.99% Java 4.06% Objective-C 11.67%

react-native-soundcloud-waveform's Introduction

react-native-soundcloud-waveform Build Status CodeFactor Maintainability Test Coverage npm version npm downloads module formats: umd, cjs, esm

Creating a simple transform to the SoundCloud's waveforms from the image url

Show Cases

Alt Text

Getting Started

Installation

$ npm i react-native-soundcloud-waveform --save

Basic Usage

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

import SoundCloudWaveform from 'react-native-soundcloud-waveform'

...
setTime = (time) => {
  
}

render() {
   <View style={Styles.progressContainer}>
      <SoundCloudWaveform
        waveformUrl={track.waveform_url}
        percentPlayable={playableTime}
        percentPlayed={currentTime)}
        setTime={this.setTime}  
      />
   </View>
}

Properties

Prop Default Type Description
waveformUrl required string The png format waveform_url object of the SoundCloud's track
setTime required func Callback function to update the current time. (returns progress in between 0 - 100)
percentPlayed required number The current time of the track (progress in between 0 - 1)
percentPlayable 0 number The percentage of the track that has been buffered (progress in between 0 - 1)
height 50 number The height of the waveform
width screenWidth number The width of the waveform
active #FF1844 string Active Color of the waveform
activeInverse #4F1224 string Active Color of the inverse waveform
activePlayable #1b1b26 string Active buffered track color of the waveform
activePlayableInverse #131116 string Active buffered track color of the inverse waveform
inactive #424056 string Inactive color of the waveform
inactiveInverse #1C1A27 string Inactive color of the inverse waveform

Contribution

Questions

Feel free to contact me or create an issue

react-native-soundcloud-waveform's People

Contributors

pritishvaidya 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.