blob: e21ab5716557e3abdfc371dcd4cd308461a1f6cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{-# LANGUAGE NoImplicitPrelude #-}
module Miso.FFI.Audio where
import GHCJS.Types
import Protolude
{-
Usage:
obj <- Miso.FFI.Document.getElementById "myAudioPlayer"
play obj
pause obj
-}
foreign import javascript unsafe "$1.play();"
play :: JSVal -> IO ()
foreign import javascript unsafe "$1.pause();"
pause :: JSVal -> IO ()
|