Skip to content

afasdev/waved_audio_player

 
 

Repository files navigation

waved_audio_player

logo

Version 1.3.0 Pub Version 1.3.0

A Flutter package for displaying audio waveforms and controlling audio playback with a customizable user interface. Perfect for applications that require audio visualization, such as music players, audio editors, and more.

Features

  • Visualize audio waveforms from various sources (assets, URLs, and device files).
  • Play, pause, and seek audio playback.
  • Customizable appearance with adjustable colors, sizes, and spacing.
  • Easy integration with existing Flutter applications.

Your GIF Description

Getting started

Prerequisites

  • Flutter SDK (version >=1.17.0)
  • Dart SDK (version '>=3.0.0 <4.0.0')

To use the waved_audio_player package, add it to your pubspec.yaml file:

dependencies:
  waved_audio_player: ^1.2.1
  audioplayers: ^6.1.0 

Installation

Run the following command in your terminal to install the package:

flutter pub get

Usage

Here's a simple example of how to use the waved_audio_player in your Flutter app:

import 'package:flutter/material.dart';
import 'package:waved_audio_player/waved_audio_player.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Waved Audio Player Example'),
        ),
        body: Center(
          child: WavedAudioPlayer(
            source: AssetSource('assets/sample.mp3'),
            iconColor: Colors.red,
            iconBackgoundColor: Colors.blue,
            playedColor: Colors.green,
            unplayedColor: Colors.grey,
            waveWidth: 100,
            barWidth: 2,
            buttonSize: 40,
            showTiming: true,
            onError: (error) {
              print('Error occurred: $error.message');
            },
          ),
        ),
      ),
    );
  }
}

Additional information

For more information about the waved_audio_player package, visit the official documentation on pub.dev.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue if you find a bug or have a feature request.

Issues

If you encounter any problems or have questions about the package, please open an issue on GitHub.

Author

This package is maintained by Ahmed EL RHAOUTI.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 37.1%
  • CMake 29.8%
  • Dart 25.7%
  • Swift 3.0%
  • C 2.2%
  • HTML 1.9%
  • Other 0.3%