Oooh Engine API Reference

A reference to the APIs offered by o3h.js for use in your HTML5 modules

Classes

ClassDescription
AbstractAssetCollectionCommon base class for asset collection types.
AbstractModuleAssetCommon base class for module asset types.
AmazonServiceA wrapper to query data from the Amazon API
AnalyticServiceLog tracking events
AssetManagerManage IModuleAsset objects that are used to move assets in and out of the module.
AudioAssetA reference to an audio file shared with the Oooh platform
AudioAssetCollectionA Map with string keys and AudioAsset values and shared with the Oooh platform.
AudioClipPlay and manage an audio file.
AudioManagerUsed to play audio.
CameraComponentA view of the camera input that can be recorded if needed for future playbacks.
CameraComponentConfigOptions to populate a layout element with a camera component
CameraMediaSourceA media source that captures the video feed of a camera on the device and outputs it.
ComponentA generic visual element of module that's managed by the application framework and setup by the layout configuration of the module.
ComponentBounds
ContextDataServiceAllows access to data about the context the module is running in.
ControlManagerManager of objects which can control the behaviour of the device.
ExternalObjectBase class for all objects that interact with the Oooh application.
FullScreenRecorderRecord the full screen of the app with the option to add meta data in real time.
FunctionServiceAllows calls to module cloud functions.
GameTimerThe default ITimer implementation that tracks time based on running time of the application.
ImageAssetA reference to an image file shared with the Oooh platform.
ImageAssetCollectionA Map with string keys and ImageAsset values and shared with the Oooh platform.
InputManagerManages the collection of objects that perform processing on the device to expose user actions as inputs to the API.
LayoutA container holding the components that are visible on the screen.
LayoutManagerManage Layout objects that are used to render different Components in the client app.
LocalNotificationServiceAllows scheduling local notifications.
MediaSourceManagerCreates and manages media sources for camera capture and video playback.
MediaSourceRecorderRecords the video produced by an O3hMediaSource to a video asset that can be played back or exported.
MicrophoneAudioNodeAccess the devices microphone as a node for the Web Audio API.
MicrophoneRecorder

Records audio from the device microphone to an audio asset that can be analyzed, played back or exported as an output asset of the module run.

Use InputManager.createMicrophoneRecorder() to create an instance of this class.

NativeRecordButtonManage a native record button that is always on top and is not recorded by the full screen recorder.
NativeUIManagerManages native UI elements such as Buttons and RecordButtons.
O3hMediaSourceA media source object that acts as a producer of video content that can be displayed or recorded.
ReplayDataThe replay data container shared with the Oooh platform.
ReplayDataAssetCollectionA Map with string keys and ReplayData values and shared with the Oooh platform.
ReplayPlayerPlay back the data that was recorded for a previous session by a ReplayRecorder.
ReplayRecorderRecord play session data and event to be used during a future play of the module that "challenges" this session.
RuntimeThe entry point for all interactions with the Oooh framework. A single instance of this class is available via Instance.
SpeechToTextSpeechToText enables voice captured by the microphone to be transcribe into a stream of text in real time.
SpeechToTextConfigThis class is used to configure the speech to text configuration settings.
SystemSettingsServiceManages the state of system wide user settings.
TextureDataA reference to raw texture data sent from Oooh.
TransitionFunctionEnumeration containing predefined transition functions.
TwitchServiceA wrapper to query data from the Twitch API
UserDataServiceAllows access to platform user information.
UserPersistentDataServiceAllows access to module data per user for storing or retrieving custom data persistently on the server. The data does not expire and is free form.
VideoAssetA reference to a video file shared with the Oooh platform.
VideoAssetCollectionA Map with string keys and VideoAsset values and shared with the Oooh platform.
VideoComponentA view of a video file who's playback can be controlled.
VideoComponentConfigOptions to populate a layout element with a video component
VideoPlayerMediaSourceA media source that outputs the playback of a video file. Provides methods for controlling the video playback.

Abstract Classes

Abstract ClassDescription
AbstractLayout
AudioRouteDescribes the physical device being used to transfer audio signals
CameraResolutionScalePreset downscale factors for camera resolution. Correspond to fractions of an ideal full resolution.
CameraTypeIdentifier of a type of physical camera on the device
ComponentContentFillModeSpecifies how the space in a component not covered by the content or mask is filled.
ComponentContentScaleModeSpecifies how a component's content is scaled to fit the component bounds.
ComponentPropertyThe properties of a component that can be animated.
ExitErrorEnum to describe the different ways that a module can exit/complete with an error.
FullScreenRecorderAudioChannelWhich audio channel(s) are to be used in full screen recording.
HapticFeedbackKinds of haptic feedback available. These vibrations vary in intensity, duration, and can be preset patterns.
HighlightTypeThe bucket to which the moment in the video capture belongs
LayoutDirectionEnumeration that controls how non-overlapping sibling layout elements are arranged.
LayoutPositionEnumeration that defines a position within layout element
MediaSourceImageCaptureFormatSpecifies the format of an image captured from a media source with O3hMediaSource.captureImage().
PlayTypeEnum to describe the different ways that a module can be loaded
UserTypeA user's type status within the application

Enumerations

EnumerationDescription
AmazonItemContentControl which data is included in an Amazon API response
AmazonSortOrderControl how the results of an Amazon API response are ordered
TwitchStreamTypeFilter streams by their status

Interfaces

InterfaceDescription
AmazonImageDescribes a single image asset
AmazonImageOptionsContainer of the 3 size options an image has
AmazonItemDetails about an item for sale on the amazon website.
AmazonItemInfoDetailed product information
AmazonMultiValuedAttributeDescription of a collection of text values for a single attribute
AmazonOfferConditionThe condition of the item offered
AmazonOfferListingDetails about the current listings of the item
AmazonOfferMerchantInfoDetails about the merchant offering this listing
AmazonOfferPriceSpecifics about the price of an offer
AmazonOfferSavingsSpecifics about the savings in an offer compared to the base price
AmazonOfferSummarySummary information about offers of the item
AmazonSearchQueryData used to query the amazon search API
AmazonSingleValuedAttributeDescription of a single text attribute
AudioPlayOptionsSpecifies the initial playback parameters for an audio clip.
CameraMediaSourceConfigConfiguration for creating a camera media source.
ComponentMaskOptionsOptions used for masking a component with an image.
ComponentPropertyAnimationOptionsThe options to control the animation of a component property using Component.animateProperty().
CubicBezierDefines a cubic bezier curve used for transitions.
GroupMetadata
ILayout
IModuleAssetRepresents an asset shared between a module and the platform, via a name identifier's pre-defined by the module configuration.
ITimerA way to track and control a timer that can be used to drive the behaviour of other components.
LayoutCustomConfigDefine the arrangement of components on the screen.
Leaderboard
LeaderboardEntry
LeaderboardSubmissionData captured from a game play to be sent to the leaderboard before completing the module
MediaImportConfigOptions for importing media from device storage.
MediaSourceImageCaptureConfigOptions for capturing an image from a media source.
MediaSourceRecorderConfigOptions for creating a video recorder for a media source with O3hMediaSource.createVideoRecorder()
MicrophoneRecorderOptionsOptions for creating a microphone recorder.
ModuleResultsDescribes the state of the module when exiting.
O3hEventInterface to listen for distinct events being triggered on an object
OoohMetadata
RectA representation of a rectangle in a 2D space.
ReplayEventAn event containing the data recorded during the replay.
StickerConfigConfiguration for defining a sticker object that can be passed into the recording layout
SubjectAn async callback collection with a single onComplete or onError event when finished, and multiple calls to the onNext function
Submission
SystemSettingsStatesA readonly representation of the current user's system settings.
TransitionA description of the change in position, size, and rotation of an object over time.
TwitchAccountInformationInformation about a user's twitch account - if linked to their Oooh account
TwitchChannelInfoInformation about a Twitch channel
TwitchClipInfoInformation about a Twitch clip
TwitchGameInfoInformation about a Twitch game
TwitchPagedResultA construct to manage paging of twitch search results
TwitchStreamInfoInformation about a Twitch stream
UserInformationContains information about a user.
Vector2A representation of a point in a 2D space
Vector3A representation of a point in a 3D space
VideoMetadataMetadata for a video asset.
VideoPlayerMediaSourceConfigConfiguration for creating a VideoPlayerMediaSource.
VideoRecordingLayoutOptions

Variables

VariableDescription
InstanceThe entry point to the Oooh API framework. Exposes an instance of the Runtime class that used to get references to other framework objects as needed

Type Aliases

Type AliasDescription
ComponentPropertyValueTypeThe type of the value that must be passed to Component.setProperty() or Component.animateProperty() for a given property.
EnumA type that represents the valid values of an enumeration.
O3hEventHandlerA callback function that is called when an event is raised.
ReadonlyObjectMapAn object used as a map with values of the given type as read-only properties.
SpeechTypeTune the speech recognition to expect a certain kind of speech.
SubjectOnCompleteA function that is called at the end when the stream has ended
SubjectOnErrorA function that is called when an error occurs
SubjectOnNextA function that is called for every update
VideoScaleModeControl how the video will scale to fill the layout element.