Skip to content

spenciefy/SYWaveformPlayer

Repository files navigation

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];

About

Simple waveform audio player using SCWaveformView

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published