module JSDOM.Generated.MediaStreamTrack
(clone, clone_, stop, getCapabilities, getCapabilities_,
getConstraints, getConstraints_, getSettings, getSettings_,
applyConstraints, getKind, getId, getLabel, setEnabled, getEnabled,
getMuted, mute, unmute, getReadyState, ended, overConstrained,
MediaStreamTrack(..), gTypeMediaStreamTrack, IsMediaStreamTrack,
toMediaStreamTrack)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName)
import JSDOM.Enums
clone ::
(MonadDOM m, IsMediaStreamTrack self) => self -> m MediaStreamTrack
clone self
= liftDOM
(((toMediaStreamTrack self) ^. jsf "clone" ()) >>=
fromJSValUnchecked)
clone_ :: (MonadDOM m, IsMediaStreamTrack self) => self -> m ()
clone_ self
= liftDOM (void ((toMediaStreamTrack self) ^. jsf "clone" ()))
stop :: (MonadDOM m, IsMediaStreamTrack self) => self -> m ()
stop self
= liftDOM (void ((toMediaStreamTrack self) ^. jsf "stop" ()))
getCapabilities ::
(MonadDOM m, IsMediaStreamTrack self) =>
self -> m MediaTrackCapabilities
getCapabilities self
= liftDOM
(((toMediaStreamTrack self) ^. jsf "getCapabilities" ()) >>=
fromJSValUnchecked)
getCapabilities_ ::
(MonadDOM m, IsMediaStreamTrack self) => self -> m ()
getCapabilities_ self
= liftDOM
(void ((toMediaStreamTrack self) ^. jsf "getCapabilities" ()))
getConstraints ::
(MonadDOM m, IsMediaStreamTrack self) =>
self -> m MediaTrackConstraints
getConstraints self
= liftDOM
(((toMediaStreamTrack self) ^. jsf "getConstraints" ()) >>=
fromJSValUnchecked)
getConstraints_ ::
(MonadDOM m, IsMediaStreamTrack self) => self -> m ()
getConstraints_ self
= liftDOM
(void ((toMediaStreamTrack self) ^. jsf "getConstraints" ()))
getSettings ::
(MonadDOM m, IsMediaStreamTrack self) =>
self -> m MediaTrackSettings
getSettings self
= liftDOM
(((toMediaStreamTrack self) ^. jsf "getSettings" ()) >>=
fromJSValUnchecked)
getSettings_ ::
(MonadDOM m, IsMediaStreamTrack self) => self -> m ()
getSettings_ self
= liftDOM
(void ((toMediaStreamTrack self) ^. jsf "getSettings" ()))
applyConstraints ::
(MonadDOM m, IsMediaStreamTrack self) =>
self -> Maybe MediaTrackConstraints -> m ()
applyConstraints self constraints
= liftDOM
(void
(((toMediaStreamTrack self) ^. jsf "applyConstraints"
[toJSVal constraints])
>>= readPromise))
getKind ::
(MonadDOM m, IsMediaStreamTrack self, FromJSString result) =>
self -> m result
getKind self
= liftDOM
(((toMediaStreamTrack self) ^. js "kind") >>= fromJSValUnchecked)
getId ::
(MonadDOM m, IsMediaStreamTrack self, FromJSString result) =>
self -> m result
getId self
= liftDOM
(((toMediaStreamTrack self) ^. js "id") >>= fromJSValUnchecked)
getLabel ::
(MonadDOM m, IsMediaStreamTrack self, FromJSString result) =>
self -> m result
getLabel self
= liftDOM
(((toMediaStreamTrack self) ^. js "label") >>= fromJSValUnchecked)
setEnabled ::
(MonadDOM m, IsMediaStreamTrack self) => self -> Bool -> m ()
setEnabled self val
= liftDOM
((toMediaStreamTrack self) ^. jss "enabled" (toJSVal val))
getEnabled ::
(MonadDOM m, IsMediaStreamTrack self) => self -> m Bool
getEnabled self
= liftDOM
(((toMediaStreamTrack self) ^. js "enabled") >>= valToBool)
getMuted :: (MonadDOM m, IsMediaStreamTrack self) => self -> m Bool
getMuted self
= liftDOM (((toMediaStreamTrack self) ^. js "muted") >>= valToBool)
mute ::
(IsMediaStreamTrack self, IsEventTarget self) =>
EventName self Event
mute = unsafeEventName (toJSString "mute")
unmute ::
(IsMediaStreamTrack self, IsEventTarget self) =>
EventName self Event
unmute = unsafeEventName (toJSString "unmute")
getReadyState ::
(MonadDOM m, IsMediaStreamTrack self) =>
self -> m MediaStreamTrackState
getReadyState self
= liftDOM
(((toMediaStreamTrack self) ^. js "readyState") >>=
fromJSValUnchecked)
ended ::
(IsMediaStreamTrack self, IsEventTarget self) =>
EventName self Event
ended = unsafeEventName (toJSString "ended")
overConstrained ::
(IsMediaStreamTrack self, IsEventTarget self) =>
EventName self Event
overConstrained = unsafeEventName (toJSString "overconstrained")