UNPKG
vue-howler-bus
Version:
latest (0.1.0)
0.1.0
An audio engine Vue plugin based on Howler and an EventEmitter model
vue-howler-bus
/
plugin.js
9 lines
(7 loc)
•
205 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
import
{
AudioEngine
}
from
'./engine'
;
export
const
AudioPlugin
= (
tracks, bus
) => ({
install
(
Vue
) {
const
$bus = bus ||
new
Vue
();
Vue
.
prototype
.
$audio
=
new
AudioEngine
($bus, tracks) } });