@vueuse/sound
Advanced tools
Comparing version 1.1.3 to 1.1.4
/*! | ||
* @vueuse/sound v1.1.2 | ||
* @vueuse/sound v1.1.4 | ||
* (c) 2021 YaΓ«l GUILLOUX | ||
@@ -18,3 +18,3 @@ * @license MIT | ||
vueDemi.onMounted(() => { | ||
Promise.resolve().then(function () { return require('./howler-7948589c.js'); }).then(function (n) { return n.howler; }).then((mod) => { | ||
Promise.resolve().then(function () { return require('./howler-ca3c5ca2.js'); }).then(function (n) { return n.howler; }).then((mod) => { | ||
HowlConstructor.value = mod.Howl; | ||
@@ -21,0 +21,0 @@ sound.value = new HowlConstructor.value({ |
/*! | ||
* @vueuse/sound v1.1.2 | ||
* @vueuse/sound v1.1.4 | ||
* (c) 2021 YaΓ«l GUILLOUX | ||
@@ -14,3 +14,3 @@ * @license MIT | ||
onMounted(() => { | ||
import('./howler-4edb984f.js').then(function (n) { return n.h; }).then((mod) => { | ||
import('./howler-a17e3bd1.js').then(function (n) { return n.h; }).then((mod) => { | ||
HowlConstructor.value = mod.Howl; | ||
@@ -17,0 +17,0 @@ sound.value = new HowlConstructor.value({ |
/*! | ||
* @vueuse/sound v1.1.2 | ||
* @vueuse/sound v1.1.4 | ||
* (c) 2021 YaΓ«l GUILLOUX | ||
@@ -4,0 +4,0 @@ * @license MIT |
@@ -13,4 +13,4 @@ { | ||
], | ||
"version": "1.1.3", | ||
"description": "ππ A Vue composable for playing sound effects.", | ||
"version": "1.1.4", | ||
"description": "π A Vue composable for playing sound effects", | ||
"main": "dist/cjs/index.js", | ||
@@ -17,0 +17,0 @@ "module": "dist/esm/index.js", |
@@ -7,13 +7,13 @@ # π @vueuse/sound | ||
This library is a Vue version of the [useSound](https://github.com/joshwcomeau/use-sound) React hook by [joshwcomeau](https://github.com/joshwcomeau). | ||
- π Lets your website **communicate** using 2 **human senses** instead of 1 | ||
- π₯ Built with **Vue** Composition API | ||
- β Support both Vue **2** and **3** using [**vue-demi**](https://github.com/antfu/vue-demi) by [**antfu**](https://github.com/antfu) | ||
- π Also supports **Nuxt**, using [nuxt-use-sound](https://github.com/Tahul/nuxt-use-sound) | ||
- β‘οΈ **<1kb** bytes (gzip) in your **bundle**! **~10kb** loaded **async**. | ||
- β¨ Built with **TypeScript** | ||
- π£ Uses a powerful, battle-tested audio utility: [**Howler.js**](https://howlerjs.com/) | ||
- π Lets your website communicate using 2 human senses instead of 1 | ||
- π₯ Best used with Vue Composition API | ||
- β Support both Vue 2 and Vue 3 using [vue-demi](https://github.com/antfu/vue-demi) by [antfu](https://github.com/antfu) | ||
- π Also supports Nuxt, using [nuxt-use-sound](https://github.com/Tahul/nuxt-use-sound) | ||
- β‘οΈ <1kb bytes (gzip) in your bundle! ~10kb loaded async. | ||
- β¨ Built with TypeScript | ||
- π£ Uses a powerful, battle-tested audio utility: **Howler.js** | ||
If you want to take a **quick look** at the composable in effect, you should visit the [π **demo**](https://vue-use-sound.netlify.app). | ||
If you want to take a quick look at the composable in effect, you might want to visit the [demo](https://vue-use-sound.netlify.app). | ||
This package is a **Vue** version of the [**useSound**](https://github.com/joshwcomeau/use-sound) React hook by [**joshwcomeau**](https://github.com/joshwcomeau). | ||
@@ -88,3 +88,3 @@ ## Installation | ||
const [play] = useSound('/path/to/sound', { playbackRate }) | ||
const { play } = useSound('/path/to/sound', { playbackRate }) | ||
``` | ||
@@ -136,3 +136,3 @@ | ||
```js | ||
const [play] = useSound('/meow.mp3') | ||
const { play } = useSound('/meow.mp3') | ||
// ^ What we're talking about | ||
@@ -208,3 +208,3 @@ ``` | ||
```js | ||
const [play] = useSound('/path/to/sprite.mp3', { | ||
const { play } = useSound('/path/to/sprite.mp3', { | ||
sprite: { | ||
@@ -233,3 +233,3 @@ laser: [0, 300], | ||
```js | ||
const [play] = useSound('/thing.mp3', { | ||
const { play } = useSound('/thing.mp3', { | ||
onend: () => { | ||
@@ -271,6 +271,6 @@ console.info('Sound ended!') | ||
All the credit behind this idea goes to [Josh W. Comeau](https://github.com/joshwcomeau). | ||
All the **credit** behind this **idea** goes to [**Josh W. Comeau**](https://github.com/joshwcomeau). | ||
This packages aims to implement the exact same things as the React [useSound](https://github.com/joshwcomeau) hook, but for Vue and its wonderful Composition API. | ||
The **documentation** of this package has only been updated for **Vue Composition API** instead of **React Hooks**. | ||
The documentation of this package has only been updated for Vue Composition API instead of React Hooks. | ||
If you **like** this package, consider **following me** on [**GitHub**](https://github.com/Tahul) and on [**Twitter**](https://twitter.com/yaeeelglx). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
274808
270
1