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

audio-rotate

v1.3.0

Published

本插件主要针对移动端audio音频播放问题,实现了自动播放,循环播放的功能。并且实现可配置化,音乐图标可旋转,可放大,可循环等等。对大部分移动端播发设备做了兼容处理,对于h5游戏开发以及微信小程序开发非常适用。在1.2.0版本中去掉了手动添加html结构,只需要配置音频url参数,其他的默认选填,同时处理了新版chrome对audio的限制,在移动端以及pc端都能试用。

Downloads

10

Readme

开发说明:

##例子用法(原生版本):    

使用方式一:
然后直接下载audio_rotate.js,在项目里引入<script src="./audio_rotate.js"></script>,然后实例化即可:
```
var options = {
    "url": "./bgm.mp3",//音频地址(必填)
    "playicon":"",//播放图标(选填)
    "pauseicon":"",//暂停图标(选填)
    "top":20,//定位top值(默认定位top:10px;left:10px)(选填)
    "left":20,//定位left值(默认定位top:10px;left:10px)(选填)
    "right":20,//定位right值(默认定位top:10px;left:10px)(选填)
    "bottom":20,//定位bottom值(默认定位top:10px;left:10px)(选填)
    "width":50,//播放按钮width(默认40px)(选填)
    "height":50,//播放按钮height(默认40px)(选填)
    "isRotate": true, //是否旋转(选填)
    "speed":50 //旋转速度(选填)
}
var audios = new QKrotate(options);//实例化
```
使用方式二:
通过require('audio-rotate')或者import QKrotate from 'audio-rotate';然后实例化即可:
```
var audios = new QKrotate(options);//实例化
```

联系方式