@revgaming/global
Version:
application bundle to globalize with ioc-like loader and localizations
15 lines (13 loc) • 388 B
JavaScript
import {player, mute, isMuted, toggleMute, setConfig} from '@revgaming/media'
export const bootMedia = (opts = {}) => {
if (opts.hasOwnProperty('config')) setConfig(opts['config'])
if (opts.load) player.load(...opts.load)
return {
play: player.play,
stopPlay: player.stop,
loadSound: player.load,
isMuted: isMuted,
toggleMute: toggleMute,
mute: mute,
}
}