module JSDOM.Generated.MediaSourceStates
(getSourceType, getSourceId, getWidth, getWidthUnchecked,
getHeight, getHeightUnchecked, getFrameRate, getFrameRateUnchecked,
getAspectRatio, getAspectRatioUnchecked, getFacingMode,
getFacingModeUnchecked, getVolume, getVolumeUnchecked,
MediaSourceStates, castToMediaSourceStates, gTypeMediaSourceStates)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import Data.Typeable (Typeable)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, new, array)
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
getSourceType ::
(MonadDOM m) => MediaSourceStates -> m SourceTypeEnum
getSourceType self
= liftDOM ((self ^. js "sourceType") >>= fromJSValUnchecked)
getSourceId ::
(MonadDOM m, FromJSString result) => MediaSourceStates -> m result
getSourceId self
= liftDOM ((self ^. js "sourceId") >>= fromJSValUnchecked)
getWidth :: (MonadDOM m) => MediaSourceStates -> m (Maybe Word)
getWidth self = liftDOM ((self ^. js "width") >>= fromJSVal)
getWidthUnchecked :: (MonadDOM m) => MediaSourceStates -> m Word
getWidthUnchecked self
= liftDOM ((self ^. js "width") >>= fromJSValUnchecked)
getHeight :: (MonadDOM m) => MediaSourceStates -> m (Maybe Word)
getHeight self = liftDOM ((self ^. js "height") >>= fromJSVal)
getHeightUnchecked :: (MonadDOM m) => MediaSourceStates -> m Word
getHeightUnchecked self
= liftDOM ((self ^. js "height") >>= fromJSValUnchecked)
getFrameRate ::
(MonadDOM m) => MediaSourceStates -> m (Maybe Float)
getFrameRate self
= liftDOM ((self ^. js "frameRate") >>= fromJSVal)
getFrameRateUnchecked ::
(MonadDOM m) => MediaSourceStates -> m Float
getFrameRateUnchecked self
= liftDOM ((self ^. js "frameRate") >>= fromJSValUnchecked)
getAspectRatio ::
(MonadDOM m) => MediaSourceStates -> m (Maybe Float)
getAspectRatio self
= liftDOM ((self ^. js "aspectRatio") >>= fromJSVal)
getAspectRatioUnchecked ::
(MonadDOM m) => MediaSourceStates -> m Float
getAspectRatioUnchecked self
= liftDOM ((self ^. js "aspectRatio") >>= fromJSValUnchecked)
getFacingMode ::
(MonadDOM m) => MediaSourceStates -> m (Maybe VideoFacingModeEnum)
getFacingMode self
= liftDOM ((self ^. js "facingMode") >>= fromJSVal)
getFacingModeUnchecked ::
(MonadDOM m) => MediaSourceStates -> m VideoFacingModeEnum
getFacingModeUnchecked self
= liftDOM ((self ^. js "facingMode") >>= fromJSValUnchecked)
getVolume :: (MonadDOM m) => MediaSourceStates -> m (Maybe Word)
getVolume self = liftDOM ((self ^. js "volume") >>= fromJSVal)
getVolumeUnchecked :: (MonadDOM m) => MediaSourceStates -> m Word
getVolumeUnchecked self
= liftDOM ((self ^. js "volume") >>= fromJSValUnchecked)