The Yospace API contains the following objects and interfaces for inspecting the current state of a Yospace integration. This API is available from version 2.14.7 onward and only if you have a player with this feature enabled.

Yospace

The yospace object provides the following properties, methods and events:

Properties

Property Type Description
session YospaceSession A reference to the current Yospace session object. A Yospace API reference can be found here (Yospace credentials required).

Methods

Method Arguments Description
registerPlayer YospaceCallbackObject Registers a callback object which contains a set of standard callback functions which are invoked when the session manager wants to interact (with the player).
addEventListener type : string, callback : function Allows you to add an eventlistener to the THEOplayer Yospace API object. See the list of available events below.
removeEventListener type : string, callback : function Allows you to remove an eventlistener from the THEOplayer Yospace API object. See the list of available events below.

Events

Event Description
sessionavailable Indicates that a new Yospace session has been started.

 

YospaceCallbackObject

The YospaceCallbackObject interface is used to specify a set of standard callback functions for Yospace session manager events. A Yospace API reference can be found here (Yospace credentials required). The following callbacks are defined:

Callbacks

Callback Arguments Description
AdBreakStart none Function gets called whenever an advert break starts.
AdvertStart mediaID : string Function gets called at the start of each advert within a break.
AdvertEnd mediaID : string Function gets called at the end of each advert within a break.
AdBreakEnd none Function gets called at the end of an advert break signalling a return to main content.
UpdateTimeline timeline Function gets called whenever there is updated information concerning the playback timeline.