skycap_audio_manager 1.1.0+3 copy "skycap_audio_manager: ^1.1.0+3" to clipboard
skycap_audio_manager: ^1.1.0+3 copied to clipboard

A simple and customizable Flutter audio player package.

🎡 MediaPlayer Package – Play, Record & Enjoy Audio/Video #

A simple Flutter media player package with a user-friendly interface and powerful features.

The MediaPlayer package is a versatile, all-in-one multimedia solution that provides seamless audio playback, video playback, and audio recording capabilities for Flutter applications. Whether you want to play music, stream videos, or record audio, this package makes it effortless.

πŸš€ Key Features #

🎡 Audio Player #

  • βœ… Supports local and online MP3, AAC, WAV, FLAC, and more.
  • βœ… Background playback for uninterrupted listening.
  • βœ… Displays album artwork and metadata (title, artist, album).
  • βœ… Provides play, pause, seek, and stop controls.
  • βœ… Loop and shuffle support for playlists.
  • βœ… Handles both network streaming and local file playback.

🎬 Video Player #

  • βœ… Supports MP4, AVI, MKV, WEBM, and other popular formats.
  • βœ… Full-screen mode with adjustable playback speed.
  • βœ… Online video streaming support.
  • βœ… Gesture controls (seek, volume, brightness adjustments).
  • βœ… Subtitles and captions support.

🎀 Audio Recorder #

  • βœ… Record audio in WAV formats with high quality.
  • βœ… Pause/resume recording functionality.
  • βœ… Saves recordings to local storage for easy access.
  • βœ… Built-in waveform visualization for recording progress.

πŸ“¦ Installation #

To use this package, add the following to your pubspec.yaml:

dependencies:
  media_player: latest_version

Then, fetch the package by running:

flutter pub get

🎯 Usage #

Audio Player #

     onPressed: () {
                NavigationRoutes.openAudioPlayer(
                    title: 'Audio Header',
                    items: [
                  AudioMetadata(
                      album: 'Test Album',
                      title: 'Song Maan1',
                      artwork:
                          'https://cover.djpunjab.is/57180/300x700/hawa-de-bulle-ep-sharry-maan.webp',
                      audioLink:
                          'https://p320.djpunjab.is/data/48/57180/306937/Hawa%20De%20Bulle%20-%20Sharry%20Maan.mp3')
                ]);
              },

Audio Recorder #

onPressed: () async {
                  var file = await NavigationRoutes.openAudioRecorder(
                      maxDuration: Duration(seconds: 10),
                      title: "Recorder",
                      description: "");
                  if (kDebugMode) {
                    print('File Path : ${file?.path}');
                  }
                }
  onPressed: () async {
                  NavigationRoutes.openVideoPlayer(
                      videoPath:
                          'https://www.w3schools.com/tags/mov_bbb.mp4',
                      title: 'Video');
                }

_buildPlayerController #

  Widget _buildPlayerController(
      {required String title, required VoidCallback onPressed}) {
    return ElevatedButton(
      onPressed: () {
        onPressed.call();
      },
      child: Text(title),
    );
  }

πŸ“Œ Features:

  • Start, pause, and stop recording.
  • Specify a maximum recording duration.
  • Customize the title and description.
  • Save recordings in formats (WAV).
  • Retrieve the recorded file upon completion.

πŸ“œ Example Usage:

Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            _buildPlayerController(
              title: "Play Music",
              onPressed: () {
                NavigationRoutes.openAudioPlayer(
                    title: 'Audio Header',
                    items: [
                  AudioMetadata(
                      album: 'Test Album',
                      title: 'Song Maan1',
                      artwork:
                          'https://cover.djpunjab.is/57180/300x700/hawa-de-bulle-ep-sharry-maan.webp',
                      audioLink:
                          'https://p320.djpunjab.is/data/48/57180/306937/Hawa%20De%20Bulle%20-%20Sharry%20Maan.mp3')
                ]);
              },
            ),
            const SizedBox(height: 50),
            _buildPlayerController(
                onPressed: () async {
                  var file = await NavigationRoutes.openAudioRecorder(
                      maxDuration: Duration(seconds: 10),
                      title: "Recorder",
                      description: "");
                  if (kDebugMode) {
                    print('File Path : ${file?.path}');
                  }
                },
                title: 'Audio Decoder'),
            const SizedBox(height: 50),
            _buildPlayerController(
                onPressed: () async {
                  NavigationRoutes.openVideoPlayer(
                      videoPath:
                          'https://www.sample-videos.com/video321/mp4/360/big_buck_bunny_360p_10mb.mp4',
                      title: 'Video');
                },
                title: 'Video Player'),
          ],
        ),
      )}
      

Light Theme Handler

    primaryColor: Colors.green,
        textTheme: TextTheme(
          headlineSmall: TextStyle(
              fontSize: 18, fontWeight: FontWeight.w600, color: Colors.black),
          bodyLarge: TextStyle(
              fontFamily: FontFamily.poppins, // Font family used
              color:
                  Colors.black, // Text color for better visibility in dark mode
              fontSize: 14),

          titleLarge: TextStyle(
              fontFamily: FontFamily.poppins, // Font family used
              color:
                  Colors.black, // Text color for better visibility in dark mode
              fontSize: 14),
          headlineMedium: TextStyle(
              fontFamily: FontFamily.poppins, // Font family used
              color:
                  Colors.black, // Text color for better visibility in dark mode
              fontSize: 14),
          // Medium display text style configuration
          displayMedium: TextStyle(
            fontFamily: FontFamily.poppins, // Font family used
            color: Colors.black, // Text color
            fontSize: 14,
          ),
        ),

Dark Theme Handler

       primaryColor: Colors.white70,
          textTheme: TextTheme(
            headlineSmall: TextStyle(
                fontSize: 18, fontWeight: FontWeight.w600, color: Colors.white),
            bodyLarge: TextStyle(
                fontFamily: FontFamily.poppins, // Font family used
                color: Colors
                    .white, // Text color for better visibility in dark mode
                fontSize: 14),
            titleLarge: TextStyle(
                fontFamily: FontFamily.poppins, // Font family used
                color: Colors
                    .white, // Text color for better visibility in dark mode
                fontSize: 14),

            // Medium display text style
            headlineMedium: TextStyle(
              fontFamily: FontFamily.poppins, // Font family used
              color:
                  Colors.white, // Text color for better visibility in dark mode
              fontSize: 14,
            ),

πŸŽ₯ Video Player Module #

πŸ“„ Description #

The Video Player Module allows you to open a video player screen with specified video details. It initializes the VideoController if it is not already registered and navigates to the VideoPlayerScreen with the provided video information.

πŸ“œ License #

This project is licensed under the MIT License.

5
likes
140
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A simple and customizable Flutter audio player package.

Repository

Documentation

API reference

License

MIT (license)

Dependencies

audio_session, chewie, flutter, flutter_localizations, get, intl, just_audio, path_provider, record, video_player

More

Packages that depend on skycap_audio_manager