All Projects → mickdekkers → Vue Howler

mickdekkers / Vue Howler

Licence: mit
[UNMAINTAINED] A Howler.js mixin for Vue 2 that makes it easy to create custom audio player components

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Howler

Recorder
html5 js 录音 mp3 wav ogg webm amr 格式,支持pc和Android、ios部分浏览器、和Hybrid App(提供Android IOS App源码),微信也是支持的,提供H5版语音通话聊天示例 和DTMF编解码
Stars: ✭ 2,891 (+2706.8%)
Mutual labels:  wav, webm, audio, mp3
Audioplayer
Audio Player for Nextcloud and ownCloud
Stars: ✭ 179 (+73.79%)
Mutual labels:  wav, audio, player, mp3
React Native Jw Media Player
React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
Stars: ✭ 76 (-26.21%)
Mutual labels:  audio, player, media-player
Recorder
html5 js 浏览器 web端录音
Stars: ✭ 429 (+316.5%)
Mutual labels:  wav, audio, mp3
Sjmediacacheserver
A HTTP Media Caching Framework. It can cache FILE or HLS media. 音视频边播边缓存框架, 支持 HLS(m3u8) 和 FILE(mp4, mp3等).
Stars: ✭ 87 (-15.53%)
Mutual labels:  audio, player, mp3
Javascript Media Recorder
WebRTC video recorder library for Javascript
Stars: ✭ 61 (-40.78%)
Mutual labels:  wav, audio, mp3
Libnyquist
🎤 Cross platform C++11 library for decoding audio (mp3, wav, ogg, opus, flac, etc)
Stars: ✭ 311 (+201.94%)
Mutual labels:  wav, audio, mp3
Audio
Data manipulation and transformation for audio signal processing, powered by PyTorch
Stars: ✭ 1,262 (+1125.24%)
Mutual labels:  wav, audio, mp3
Axiom
An FFmpeg GUI for Windows
Stars: ✭ 560 (+443.69%)
Mutual labels:  webm, audio, mp3
Av Converter
[av-converter.com] Audio and Video Converter, and YouTube downloader. Convert to MP3, MP4, AAC, FLAC, AC3, WAV, etc.
Stars: ✭ 97 (-5.83%)
Mutual labels:  wav, audio, mp3
Hysteriaplayer
Objective-C audio player, sitting on top of AVPlayer
Stars: ✭ 568 (+451.46%)
Mutual labels:  audio, player, mp3
TonUINO
Alternative TonUINO Firmware
Stars: ✭ 112 (+8.74%)
Mutual labels:  player, mp3, media-player
uos
United Open-libraries of Sound. United procedures for open-source audio libraries. For FPC/Lazarus/fpGUI/MSEgui.
Stars: ✭ 112 (+8.74%)
Mutual labels:  player, mp3, wav
Mpc Hc
MPC-HC's main repository. For support use our Trac: https://trac.mpc-hc.org/
Stars: ✭ 3,567 (+3363.11%)
Mutual labels:  audio, player, media-player
Flacon
Audio File Encoder. Extracts audio tracks from an audio CD image to separate tracks.
Stars: ✭ 252 (+144.66%)
Mutual labels:  wav, audio, mp3
Music Metadata
Stream and file based music metadata parser for node. Supporting a wide range of audio and tag formats.
Stars: ✭ 455 (+341.75%)
Mutual labels:  wav, audio, mp3
Xamarin Plugins
Cross-platform Plugins for Xamarin, Xamarin.Forms and Windows
Stars: ✭ 97 (-5.83%)
Mutual labels:  wav, audio, mp3
Atldotnet
Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
Stars: ✭ 180 (+74.76%)
Mutual labels:  wav, audio, mp3
Symphonia
Pure Rust multimedia format demuxing, tag reading, and audio decoding library
Stars: ✭ 191 (+85.44%)
Mutual labels:  wav, audio, mp3
Flutter Assetsaudioplayer
Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications
Stars: ✭ 458 (+344.66%)
Mutual labels:  audio, player, mp3

vue-howler Version

A Howler.js mixin for Vue 2 that makes it easy to create custom audio player components

Installation

$ npm install vue-howler

Usage

First create a component that uses the mixin

audio-player.vue

<script>
  import VueHowler from 'vue-howler'

  export default {
    mixins: [VueHowler]
  }
</script>

<template>
  <div>
    <span>Total duration: {{ duration }} seconds</span>
    <span>Progress: {{ (progress * 100) }}%</span>
    <button @click="togglePlayback">{{ playing ? 'Pause' : 'Play' }}</button>
    <button @click="stop">Stop</button>
  </div>
</template>

Then you can use that component in your templates

home.vue

<script>
  import AudioPlayer from './audio-player.vue'

  export default {
    components: {
      AudioPlayer
    },

    data () {
      return {
        audioSources: [
          "assets/audio/music.webm",
          "assets/audio/fallback.mp3",
          "assets/audio/fallback2.wav"
        ]
      }
    }
  }
</script>

<template>
  <div>
    <audio-player :sources="audioSources" :loop="true"></audio-player>
  </div>
</template>

API

Props

sources

Type: String[] - Required

An array of audio file urls

html5

Type: Boolean - Default: false

Whether to force HTML5 Audio

loop

Type: Boolean - Default: false

Whether to start the playback again automatically after it is done playing

preload

Type: Boolean - Default: true

Whether to start downloading the audio file when the component is mounted

autoplay

Type: Boolean - Default: false

Whether to start the playback when the component is mounted

formats

Type: String[] - Default: []

Howler.js automatically detects your file format from the extension, but you may also specify a format in situations where extraction won't work (such as with a SoundCloud stream)

xhrWithCredentials

Type: Boolean - Default: false

Whether to enable the withCredentials flag on XHR requests used to fetch audio files when using Web Audio API (see reference)

Data

playing

Type: Boolean

Whether audio is currently playing

muted

Type: Boolean

Whether the audio playback is muted

volume

Type: Number

The volume of the playback on a scale of 0 to 1

rate

Type: Number

The rate (speed) of the playback on a scale of 0.5 to 4

seek

Type: Number

The position of the playback in seconds

duration

Type: Number

The duration of the audio in seconds

progress

Type: Number

The progress of the playback on a scale of 0 to 1

Methods

play()

Start the playback

pause()

Pause the playback

togglePlayback()

Toggle playing or pausing the playback

stop()

Stop the playback (also resets the seek to 0)

mute()

Mute the playback

unmute()

Unmute the playback

toggleMute()

Toggle muting and unmuting the playback

setVolume(volume)

Set the volume of the playback (value is clamped between 0 and 1)

setRate(rate)

Set the rate (speed) of the playback (value is clamped between 0.5 and 4)

setSeek(seek)

Set the position of the playback (value is clamped between 0 and duration)

setProgress(progress)

Set the progress of the playback (value is clamped between 0 and 1)

License

MIT © Mick Dekkers

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].