Iframe API Reference
#
Methods#
PLAYPlays or resumes the video.
#
PAUSEPauses the video.
#
SEEKSeeks the video to the value of data in seconds. data must be an int or float.
#
GO_TO_TAGSeeks the video to the starting time of the tag. data is the spriteId of the tag.
#
OPEN_TAGSeeks the video to the starting time of the tag and opens the overlay associated with that tag. data is the spriteId of the tag.
#
CLOSE_WIDGETCloses widget/overlay.
#
Getters#
GET_CURRENT_TIMETriggers the return current time event.
#
IS_PLAYER_READYTriggers the player ready event if the player is ready.
#
Setters#
MUTE_VOLUMEMute volume.
#
UNMUTE_VOLUMEUnmute volume.
#
CHANGE_VOLUMEChanges the volume. The data is a float between 0 and 1.
Note: CHANGE_VOLUME is not supported on iOS, as iOS does not allow to set volume programmatically. We recommend to use MUTE_VOLUME and UNMUTE_VOLUME instead.
DEVICE_MOTION#
note
This event is for customization only in Player 4. Player 5 no longer support this event.
Inform the player of the device motion. The device motion can be retrieved from the window event “devicemotion”. The data must have the following properties:
DEVICE_ORIENTATION#
note
This event is for customization only in Player 4. Player 5 no longer support this event.
Inform the player of the device orientation. The device orientation can be retrieved from the window event “deviceorientation”.
The data must have the following properties:
DEVICE_SCREEN_ORIENTATION#
note
This event is for customization only in Player 4. Player 5 no longer support this event.
Inform the player of the device screen orientation. The device screen orientation can be retrieved from the window event “orientationchange” .
The data must be one of the following values: -90
, 0
, 90
, 180
.
CLIENT_CUSTOM_TRIGGER#
note
This event is for customization only in Player 4. Player 5 no longer support this event.
#
Event Listeners#
PLAYER_READYTriggered when the player is ready.
#
VIDEO_ENDTriggered when the video has ended.
#
HAS_PAUSEDTriggered when the video is paused.
#
HAS_PLAYEDTriggered when the video is played.
#
HAS_SEEKEDTriggered when the user seeks in the video. Passes information about the seeked to time to the callback.
STARTED_BUFFERING#
note
Player 5 no longer support this event.
Triggered when the player starts buffering.
ENDED_BUFFERING#
note
Player 5 no longer support this event.
Triggered the player has finished buffering.
#
TAG_CLICKTriggered when a tag is clicked. Passes the tag object which has been clicked through to the callback.
#
ADD_TO_CARTTriggered when an addToCart link is clicked (only for customisations where this has been implemented). Passes information about the added product to the callback.
#
RETURN_CURRENT_TIMETriggered when the getCurrentTime event is triggered. Passes information about the current time to the callback.
Note: Requesting the current time more than once per second might lead to player slowdown.
#
WIDGET_SHOWNTriggered when the widget/overlay is open.
Note: Only Player 5 will return hotspot meta data.
#
WIDGET_CLOSEDTriggered when the widget/overlay is closed.
Note: Only Player 5 will return hotspot meta data.
#
VOLUME_CHANGECLIENT_CUSTOM_EVENT#
note
Player 5 no longer support this event.
Triggered when the volume is changed.
#
OVERLAY_EVENTnote
This event is only available in Player 5.
Triggered when "Add to cart" or "Clickthrough" buttons inside overlay are clicked.
#
Breaking Changes- Player 4 doesn't support
OVERLAY_EVENT
listener. - Player 5 no longer support trigger event
DEVICE_MOTION
,DEVICE_ORIENTATION
,DEVICE_SCREEN_ORIENTATION
,CLIENT_CUSTOM_TRIGGER
, customization features are implemented within Studio now. - Player 5 no longer support listener event
STARTED_BUFFERING
,ENDED_BUFFERING
,CLIENT_CUSTOM_EVENT
, because of tech stacks upgrade. - Player 5 no longer support
enableGyro()
.