ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/RTCEncodedVideoFrameMetadata.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webrtc-encoded-transform (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.RTCEncodedVideoFrameMetadata
(js_newRTCEncodedVideoFrameMetadata, js_setFrameId, js_getFrameId, js_setDependencies, js_getDependencies, js_setWidth, js_getWidth, js_setHeight, js_getHeight, js_setSpatialIndex, js_getSpatialIndex, js_setTemporalIndex, js_getTemporalIndex, js_setTimestamp, js_getTimestamp, newRTCEncodedVideoFrameMetadata, setFrameId, getFrameId, getFrameIdUnsafe, getFrameIdUnchecked, setDependencies, getDependencies, getDependenciesUnsafe, getDependenciesUnchecked, setWidth, getWidth, getWidthUnsafe, getWidthUnchecked, setHeight, getHeight, getHeightUnsafe, getHeightUnchecked, setSpatialIndex, getSpatialIndex, getSpatialIndexUnsafe, getSpatialIndexUnchecked, setTemporalIndex, getTemporalIndex, getTemporalIndexUnsafe, getTemporalIndexUnchecked, setTimestamp, getTimestamp, getTimestampUnsafe, getTimestampUnchecked, RTCEncodedVideoFrameMetadata(..), gTypeRTCEncodedVideoFrameMetadata)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums
foreign import javascript safe "(() => { return ({}); })"
js_newRTCEncodedVideoFrameMetadata :: IO RTCEncodedVideoFrameMetadata
-- | <https://w3c.github.io/webrtc-encoded-transform/#dictdef-rtcencodedvideoframemetadata RTCEncodedVideoFrameMetadata specification>
newRTCEncodedVideoFrameMetadata :: (MonadDOM m) => m RTCEncodedVideoFrameMetadata
newRTCEncodedVideoFrameMetadata = liftDOM ((js_newRTCEncodedVideoFrameMetadata))
foreign import javascript safe "(($1, $2) => { $1[\"frameId\"] = $2; })"
js_setFrameId :: RTCEncodedVideoFrameMetadata -> JSVal -> IO ()
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-frameid RTCEncodedVideoFrameMetadata.frameId specification>
setFrameId :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> Word53 -> m ()
setFrameId self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setFrameId (self) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"frameId\"]; })"
js_getFrameId :: RTCEncodedVideoFrameMetadata -> IO JSVal
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-frameid RTCEncodedVideoFrameMetadata.frameId specification>
getFrameId :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m (Maybe Word53)
getFrameId self = liftDOM (((js_getFrameId (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-frameid RTCEncodedVideoFrameMetadata.frameId specification>
getFrameIdUnsafe :: (MonadDOM m, HasCallStack) => RTCEncodedVideoFrameMetadata -> m Word53
getFrameIdUnsafe self = liftDOM ((((js_getFrameId (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-frameid RTCEncodedVideoFrameMetadata.frameId specification>
getFrameIdUnchecked :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m Word53
getFrameIdUnchecked self = liftDOM ((pFromJSVal <$> (js_getFrameId (self))))
foreign import javascript safe "(($1, $2) => { $1[\"dependencies\"] = $2; })"
js_setDependencies :: RTCEncodedVideoFrameMetadata -> JSVal -> IO ()
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-dependencies RTCEncodedVideoFrameMetadata.dependencies specification>
setDependencies :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> [Word53] -> m ()
setDependencies self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setDependencies (self) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"dependencies\"]; })"
js_getDependencies :: RTCEncodedVideoFrameMetadata -> IO JSVal
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-dependencies RTCEncodedVideoFrameMetadata.dependencies specification>
getDependencies :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m (Maybe [Word53])
getDependencies self = liftDOM (((js_getDependencies (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-dependencies RTCEncodedVideoFrameMetadata.dependencies specification>
getDependenciesUnsafe :: (MonadDOM m, HasCallStack) => RTCEncodedVideoFrameMetadata -> m [Word53]
getDependenciesUnsafe self = liftDOM ((((js_getDependencies (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-dependencies RTCEncodedVideoFrameMetadata.dependencies specification>
getDependenciesUnchecked :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m [Word53]
getDependenciesUnchecked self = liftDOM (((js_getDependencies (self)) >>= fromJSValUnchecked))
foreign import javascript safe "(($1, $2) => { $1[\"width\"] = $2; })"
js_setWidth :: RTCEncodedVideoFrameMetadata -> Word -> IO ()
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-width RTCEncodedVideoFrameMetadata.width specification>
setWidth :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> Word -> m ()
setWidth self val = liftDOM (void ((js_setWidth (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"width\"]; })"
js_getWidth :: RTCEncodedVideoFrameMetadata -> IO JSVal
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-width RTCEncodedVideoFrameMetadata.width specification>
getWidth :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m (Maybe Word)
getWidth self = liftDOM (((js_getWidth (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-width RTCEncodedVideoFrameMetadata.width specification>
getWidthUnsafe :: (MonadDOM m, HasCallStack) => RTCEncodedVideoFrameMetadata -> m Word
getWidthUnsafe self = liftDOM ((((js_getWidth (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-width RTCEncodedVideoFrameMetadata.width specification>
getWidthUnchecked :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m Word
getWidthUnchecked self = liftDOM ((pFromJSVal <$> (js_getWidth (self))))
foreign import javascript safe "(($1, $2) => { $1[\"height\"] = $2; })"
js_setHeight :: RTCEncodedVideoFrameMetadata -> Word -> IO ()
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-height RTCEncodedVideoFrameMetadata.height specification>
setHeight :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> Word -> m ()
setHeight self val = liftDOM (void ((js_setHeight (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"height\"]; })"
js_getHeight :: RTCEncodedVideoFrameMetadata -> IO JSVal
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-height RTCEncodedVideoFrameMetadata.height specification>
getHeight :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m (Maybe Word)
getHeight self = liftDOM (((js_getHeight (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-height RTCEncodedVideoFrameMetadata.height specification>
getHeightUnsafe :: (MonadDOM m, HasCallStack) => RTCEncodedVideoFrameMetadata -> m Word
getHeightUnsafe self = liftDOM ((((js_getHeight (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-height RTCEncodedVideoFrameMetadata.height specification>
getHeightUnchecked :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m Word
getHeightUnchecked self = liftDOM ((pFromJSVal <$> (js_getHeight (self))))
foreign import javascript safe "(($1, $2) => { $1[\"spatialIndex\"] = $2; })"
js_setSpatialIndex :: RTCEncodedVideoFrameMetadata -> Word -> IO ()
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-spatialindex RTCEncodedVideoFrameMetadata.spatialIndex specification>
setSpatialIndex :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> Word -> m ()
setSpatialIndex self val = liftDOM (void ((js_setSpatialIndex (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"spatialIndex\"]; })"
js_getSpatialIndex :: RTCEncodedVideoFrameMetadata -> IO JSVal
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-spatialindex RTCEncodedVideoFrameMetadata.spatialIndex specification>
getSpatialIndex :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m (Maybe Word)
getSpatialIndex self = liftDOM (((js_getSpatialIndex (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-spatialindex RTCEncodedVideoFrameMetadata.spatialIndex specification>
getSpatialIndexUnsafe :: (MonadDOM m, HasCallStack) => RTCEncodedVideoFrameMetadata -> m Word
getSpatialIndexUnsafe self = liftDOM ((((js_getSpatialIndex (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-spatialindex RTCEncodedVideoFrameMetadata.spatialIndex specification>
getSpatialIndexUnchecked :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m Word
getSpatialIndexUnchecked self = liftDOM ((pFromJSVal <$> (js_getSpatialIndex (self))))
foreign import javascript safe "(($1, $2) => { $1[\"temporalIndex\"] = $2; })"
js_setTemporalIndex :: RTCEncodedVideoFrameMetadata -> Word -> IO ()
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-temporalindex RTCEncodedVideoFrameMetadata.temporalIndex specification>
setTemporalIndex :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> Word -> m ()
setTemporalIndex self val = liftDOM (void ((js_setTemporalIndex (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"temporalIndex\"]; })"
js_getTemporalIndex :: RTCEncodedVideoFrameMetadata -> IO JSVal
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-temporalindex RTCEncodedVideoFrameMetadata.temporalIndex specification>
getTemporalIndex :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m (Maybe Word)
getTemporalIndex self = liftDOM (((js_getTemporalIndex (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-temporalindex RTCEncodedVideoFrameMetadata.temporalIndex specification>
getTemporalIndexUnsafe :: (MonadDOM m, HasCallStack) => RTCEncodedVideoFrameMetadata -> m Word
getTemporalIndexUnsafe self = liftDOM ((((js_getTemporalIndex (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-temporalindex RTCEncodedVideoFrameMetadata.temporalIndex specification>
getTemporalIndexUnchecked :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m Word
getTemporalIndexUnchecked self = liftDOM ((pFromJSVal <$> (js_getTemporalIndex (self))))
foreign import javascript safe "(($1, $2) => { $1[\"timestamp\"] = $2; })"
js_setTimestamp :: RTCEncodedVideoFrameMetadata -> JSVal -> IO ()
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-timestamp RTCEncodedVideoFrameMetadata.timestamp specification>
setTimestamp :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> Int53 -> m ()
setTimestamp self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setTimestamp (self) a2')))
foreign import javascript unsafe "(($1) => { return $1[\"timestamp\"]; })"
js_getTimestamp :: RTCEncodedVideoFrameMetadata -> IO JSVal
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-timestamp RTCEncodedVideoFrameMetadata.timestamp specification>
getTimestamp :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m (Maybe Int53)
getTimestamp self = liftDOM (((js_getTimestamp (self)) >>= fromJSValUnchecked))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-timestamp RTCEncodedVideoFrameMetadata.timestamp specification>
getTimestampUnsafe :: (MonadDOM m, HasCallStack) => RTCEncodedVideoFrameMetadata -> m Int53
getTimestampUnsafe self = liftDOM ((((js_getTimestamp (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))
-- | <https://w3c.github.io/webrtc-encoded-transform/#dom-rtcencodedvideoframemetadata-timestamp RTCEncodedVideoFrameMetadata.timestamp specification>
getTimestampUnchecked :: (MonadDOM m) => RTCEncodedVideoFrameMetadata -> m Int53
getTimestampUnchecked self = liftDOM ((pFromJSVal <$> (js_getTimestamp (self))))