SoundWave : HTML5 Custom Audio Player Library

SoundWave : HTML5 Custom Audio Player Library

GitHub logo

SH20RAJ
/
soundwave

SoundWave is an easy, customizable HTML5 audio participant library designed to be light-weight and simple to combine into any net undertaking.

SoundWave

SoundWave is a contemporary and customizable audio participant library for creating glossy audio experiences on the internet. With help for varied controls and customization choices, SoundWave is designed to be versatile and simple to make use of.

Version
License
CDN
Visitors

Preview

SoundWave Preview

Getting Started

Basic Usage

To get began with SoundWave, embrace the CSS and JavaScript recordsdata:

Using CDN

<hyperlink rel="stylesheet" href="https://cdn.jsdelivr.internet/gh/SH20RAJ/soundwave@fundamental/css/soundwave.css">
<script src="https://cdn.jsdelivr.internet/gh/SH20RAJ/soundwave@fundamental/js/soundwave.js"></script>

Local Installation

  1. Download the newest launch from the GitHub releases web page.
  2. Include the CSS and JavaScript recordsdata in your undertaking:
<hyperlink rel="stylesheet" href="path/to/soundwave.css">
<script src="path/to/soundwave.js"></script>

Basic Player Setup

To initialize a primary SoundWave participant, use the next JavaScript code:

const participant = new SoundWave({
    container: '#audio-player', // CSS selector for the container
    audioSrc: 

…

Introducing SoundWave: The Modern Audio Player Library You Need

SoundWave Logo

Are you searching for a glossy, customizable audio participant in your net tasks? Look no additional than SoundWave! This new audio participant library gives a contemporary design, wealthy characteristic set, and suppleness to suit any undertaking. Let’s dive into what makes SoundWave the proper selection for builders and music lovers alike.

Why SoundWave?

SoundWave stands out with its clear interface, straightforward integration, and in depth customization choices. Here are some key options:

  • Play/Pause Functionality: Seamlessly management audio playback with intuitive play/pause buttons.
  • Volume Control: Adjust the quantity to your liking with a classy slider.
  • Playback Speed Control: Change the playback velocity to 0.5x, 1x, 1.5x, or 2x.
  • Looping: Easily loop your favourite tracks.
  • Download Option: Allow customers to obtain the audio straight from the participant.
  • Customizable Appearance: Use CSS variables to tweak the feel and appear to match your web site’s design.
  • CDN Support: Quickly add SoundWave to your undertaking utilizing our CDN.

Getting Started

Installation

Using CDN

Include SoundWave in your undertaking by including the next strains to your HTML:

<hyperlink rel="stylesheet" href="https://cdn.jsdelivr.internet/gh/SH20RAJ/soundwave@fundamental/css/soundwave.css">
<script src="https://cdn.jsdelivr.internet/gh/SH20RAJ/soundwave@fundamental/js/soundwave.js"></script>

Local Installation

Alternatively, obtain the newest launch from our GitHub repository and embrace the recordsdata regionally:

<hyperlink rel="stylesheet" href="path/to/soundwave.css">
<script src="path/to/soundwave.js"></script>

Basic Usage

Setting up SoundWave is so simple as including a container in your HTML and initializing the participant with JavaScript:

<div id="audio-player"></div>
<script>
    const participant = new SoundWave({
        container: '#audio-player', // CSS selector for the container
        audioSrc: 'path/to/your-audio-file.mp3', // Path to your audio file
        peak: '60px', // Height of the participant
        width: '400px', // Width of the participant
    });
</script>

Advanced Features

Want to customise the icons or add extra controls? SoundWave makes it straightforward:

Custom Icons

const participant = new SoundWave({
    container: '#audio-player',
    audioSrc: 'path/to/your-audio-file.mp3',
    peak: '60px',
    width: '400px',
    svgIcons: {
        play: 'path/to/play.svg',
        pause: 'path/to/pause.svg',
        quantity: 'path/to/quantity.svg',
        mute: 'path/to/mute.svg',
        velocity: 'path/to/velocity.svg',
        loop: 'path/to/loop.svg',
        obtain: 'path/to/obtain.svg'
    }
});

Additional Controls

Enable quantity, velocity, loop, and obtain controls with easy configuration:

const participant = new SoundWave({
    container: '#audio-player',
    audioSrc: 'path/to/your-audio-file.mp3',
    peak: '60px',
    width: '400px',
    svgIcons: {
        play: 'path/to/play.svg',
        pause: 'path/to/pause.svg',
        quantity: 'path/to/quantity.svg',
        mute: 'path/to/mute.svg',
        velocity: 'path/to/velocity.svg',
        loop: 'path/to/loop.svg',
        obtain: 'path/to/obtain.svg'
    },
    presentVolumeControl: true,
    presentSpeedControl: true,
    showLoopControl: true,
    presentDownloadControl: true
});

Customization

Tailor the participant’s look utilizing CSS variables:

:root {
    --player-bg-color: #fff;
    --player-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --button-size: 24px;
    --button-hover-bg: #e0e0e0;
    --button-active-bg: #d0d0d0;
    --progress-bg: #eee;
    --progress-bar-color: #007bff;
    --slider-thumb-color: #007bff;
    --timestamp-color: #333;
    --volume-slider-bg: #ddd;
    --volume-slider-thumb-color: #007bff;
    --speed-selector-bg: #fff;
    --loop-color: #007bff;
}

Join the Community

SoundWave is open-source and we welcome contributions! Check out our GitHub repository to report points, recommend options, or submit pull requests.

License

SoundWave is licensed below the MIT License. See the LICENSE file for particulars.

SoundWave is right here to raise your net audio expertise. Try it out at this time and tell us what you assume! 🎵

HI-FI News

by way of DEV Community https://dev.to

July 25, 2024 at 01:12PM