npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-dynamic-island-player

v1.2.3

Published

a vue-audio-player based on Howler.js,The animation of the player is interacted with reference to IOS dynamic island.

Downloads

48

Readme

vue-dynamic-island-player

Description

a vue-audio-player based on Howler.js,The animation of the player is interacted with reference to IOS dynamic island.

Additional information, live demos and a user showcase are available at https://zhichao8756.github.io/player-demo/.

welcome to create issue, help improve the player :)

Features

  • A set of Vue components out of the box.
  • Single API for all audio needs
  • Defaults to Web Audio API and falls back to HTML5 Audio
  • Supports all codecs for full cross-browser support
  • Full control for fading, rate, seek, volume, etc.
  • Customize the theme freely
  • No outside dependencies, just pure JavaScript

Browser Compatibility

Tested in the following browsers/versions:

  • Google Chrome 7.0+
  • Firefox 4.0+
  • Safari 5.1.4+
  • Mobile Safari 6.0+ (after user input)
  • Opera 12.0+
  • Microsoft Edge

Live Demo

Install

$ npm i vue-dynamic-island-player

Quick Start

<script setup>
import { DynamicIslandPlayer } from 'vue-dynamic-island-player'
import "../node_modules/vue-dynamic-island-player/style.css"; //引入组件样式
import { ref } from 'vue'

const playList = ref([
{
    // song of title
    title: 'Rave Digger',
    // sound file
    file: 'http://music.163.com/song/media/outer/url?id=447925558.mp3',
    // howler instance
    howl: null,
    // song of author
    author: 'Cherrystones',
    // song of cover
    cover: cover1
}
])
const player = ref()
player.value.toggle()
player.value.playPrevious()
    ...
</script>

<template>
    <div>
        <DynamicIslandPlayer ref="player"/>
    </div>
</template>

API Docs

Props Attributes

| Attribute | Description | type | Accepted Values | default | |------------|----------------------------------|---------|-----------------------------------------|---------| | playList | songs of list | Array | - | - | | volume | sound volume | Number | 0.0 ~ 1.0 | 0.5 | | html5 | set to true to force HTML5 Audio | Boolean | true/ false | true | | theme | custom the theme | String | accept Hexadecimal color or picture | - |

Methods

| Methods | Description | Parameters | |-------------------|----------------------------------------------------------------------------|-------------------------------------------------------| | getSoundState() | return the current sound state (playing / pause) | - | | setVolume() | set sound volume, range 0.0 to 1.0 | function(0.8) | | setMute() | Mutes the sound, but doesn't pause the playback | function(Boolean) True to mute and false to unmute. | | setRate() | set rate of playback, range 0.5 to 4.0, with 1.0 being normal speed | function(2.0) | | seekBySeconds() | Get/set the position of playback for a sound | function(Number) skip to a second of sound. | | toggle() | toggle the sound play or /pause | - | | playNext() | skip to next song | - | | playPrevious() | back to previous song | - |

Events

| Event Name | Description | Parameters | |-------------|------------------------------|------------| | play | triggers when click play | - | | pause | triggers when click pause | - | | next | triggers when click next | - | | previous | triggers when click previous | - |

License

vue-dynamic-island-player is open source software licensed as MIT.