Docy Child

Object and Methods

Estimated reading: 3 minutes

The webXRtools 360 SDK exposes an object attached the  window  which allows for access to a set of variables, methods, and event-listeners that enable developers to add custom logic within Embedded iFrame Hotspots. 

window.arlene

The main entry point for accessing the SDK, this object  is attached to the  window, exposing various methods and event-listeners.

Variables

arleneInstanceId

The ID for the current instance of the experience.

Methods

changeExitLink

changeExitLink(url) : Void
Updates the URL that will be loaded when the user exits the experience.

clickHotspotByID

clickHotspotByID(hotspotId) : Void
Simulates a click on the hotspot with the given ID.

closeIFramePopUp

closeIntro() : Void
Closes the current iFrame overlay.

closeIntro

closeIFramePopUp() : Void
Call’s the close method for the intro overlay.

getHotspotId

getHotspotId() : Int
Returns the ID of the Hotspot that opened the current iFrame

getHotspotId

getHotspotId() : Int
Returns the ID of the Hotspot that opened the current iFrame

hideById

hideById(hotspotId) : Void
Sets the Hotspot with the given ID hidden

isAudioPlaying

isAudioPlaying() : Promise => Bool
Returns a Promise that resolves to a Boolean

isAudioPlaying

isMobile() : Bool
Returns a True if the device accessing the current is on mobile and False if on desktop

lastPersistentState

lastPersistentState : Object
Returns an Object whose contents were set using setPersistentState()

playAudio

playAudio(audioUrl,loop) : Void
Plays the audio file from the given URL, loop is set to True by default.

retrieveLastState

retrieveLastState : Object
Returns an Object whose contents were set using setState()

setPersistentState

setPersistentState(newPersistentState) : Void
Sets the values to be stored and persist across sessions.

setState

setState(newState) : Void
Sets the values to be stored for the current session.

showById

showById(hotspotId) : Void
Sets the Hotspot with the given ID visible

showMessage

showMessage(message,type) : Void
Displays a message on the screen

stopAudio

stopAudio() : Void
Stops playing the current audio track

trackAnalyticsEvent

trackAnalyticsEvent(category, action, label) : Void
Sends an event to the analytics server

Share this Doc
CONTENTS