Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

soupi/purescript-howler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

purescript-howler on Pursuit

purescript-howler

Binding for a subset of howlerjs

Status: Experimental

License: MIT

You'll need to download howlerjs and include it as a script in your index.html (or use CDN)

Example

module Main where

import Prelude (bind, Unit)
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (log, CONSOLE)

import Audio.Howler as Howl

main :: forall e. Eff (howler :: Howl.HOWLER, console :: CONSOLE | e) Unit
main = do
  sound <- Howl.new (Howl.defaultProps { urls = ["audio/gling.mp3"] })
  Howl.play sound
  log "playing"

Link to API Documentation