• Stars
    star
    256
  • Rank 159,219 (Top 4 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created almost 10 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple waveform audio player using SCWaveformView

SYWaveformPlayer

Simple waveform audio player using SCWaveformView

Main features:

  • Shows play progress
  • Easily customizable (color, size, etc.)
  • Scrub audio

This project's waveform uses https://github.com/rFlex/SCWaveformView

To use, just drag the SYWaveformPlayer folder into your project and #import "SYWaveformPlayerView.h"

Example

//Create AVURLAsset for waveform creation and audio playback
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:[[NSBundle mainBundle] URLForResource:@"I Need A Dollar" withExtension:@"mp3"] options:nil];

//Initialize view, set AVURLAsset, frame, color
SYWaveformPlayerView *playerView = [[SYWaveformPlayerView alloc] initWithFrame:CGRectMake(0, 160, self.view.frame.size.width, 30) asset:asset color:[UIColor lightGrayColor] progressColor:[UIColor colorWithRed:1 green:0.2 blue:0.2 alpha:1]];
[self.view addSubview:playerView];