Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joldibaev/silicon-audio-wave

Very simple audio wave system from Silicon
https://github.com/joldibaev/silicon-audio-wave

angular audio audio-visualizer audio-wave player silicon

Last synced: 3 months ago
JSON representation

Very simple audio wave system from Silicon

Awesome Lists containing this project

README

        

# Audio Wave for Angular 13+

Very simple audio wave system

## Screen
![alt text](https://github.com/joldibaev/silicon-audio-wave/raw/master/src/assets/demo2.png)

## Installation

Install the npm package.

npm i ngx-audio-wave --save

Import module:

```ts
import {NgxAudioWaveModule} from "ngx-audio-wave";

@NgModule({
imports: [NgxAudioWaveModule]
})
```

## Usage

```ts
audioSrc = 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/shoptalk-clip.mp3';
```

```html

played percent: {{ngxAudioWave.playedPercent}} ({{ngxAudioWave.exactPlayedPercent}})

current time: {{ngxAudioWave.currentTime}} ({{ngxAudioWave.exactCurrentTime}})

duration: {{ngxAudioWave.duration}} ({{ngxAudioWave.exactDuration}})

```

## Properties

```html


duration: {{ngxAudioWave.duration|toTimer}} (no duration while loading)

duration: {{ngxAudioWave.duration|toTimer}} (zero will be display while loading)

```

## Custom btn

### One action btn

```html

Play
Pause
```

### Toggle btn
```html
Toggle btn (is pause: {{audioRef2.isPause}})

Play
Pause
Stop
```

or you can get access to The HTML `````` element inside component
```audioRef2.audio?.nativeElement```

Example:
```html
Play
Pause
```
#### WARNING: using this code will lead to [NG0100: ExpressionChangedAfterItHasBeenCheckedError]

## Source

https://github.com/joldibaev/silicon-audio-wave/tree/master/projects/ngx-audio-wave