Class adways.interactive.Experience

Extends: adways.event.EventDispatcher

SUMMARY



Overview

"Experience" is the climax of the interactive video underlying processes. It brings in one "easy to deal with" class all the required stuff to manage the interactive video. It is a kind of "entry point" for developers who want to investigate more around the capabilities of the Adways interactive engine. It is a top level "public" tool to enhance productivity and help the setup of the interactivity in front of a video.

Live demo.



Setting the player

The "player builder" object
The player parameters
The media parameters


Setting the delegate

The "delegate builder" object
The delegate parameters


Additional options



Setting the scene

A scene is tied to a publication ID and the corresponding publication JSON.



Examples

Reminder:

  • The static method "createExperience" is a helper that performs the "new" operation.
  • There is a live demo here.
  • Importing the Adways library is a pre-requisit:
    <script src="//dj5ag5n6bpdxo.cloudfront.net/adways/libs/interactive/loader.js"></script>
    


Example #1: simple interactivity setup

The "Example #1: quick and simple interactive video setup" on the "AdwaysLib - interactive" documentation home page shows the most simple and quick way to instanciate the interactivity. But it uses the createExperience static method. Here is how to manually perform the same operations:

// creates the new "Experience" object
var experience = new adways.interactive.Experience();
console.log("new experience created: "+experience.getExperienceID());
// sets where the player will have to be instanciated
experience.setPlayerContainer(domEelementOrDomId);
// sets the publication ID (ie: the interactivity id)
experience.setPublicationID("GSPfHsV");
// loads and builds everything
experience.load();

Example #2: manual setup progression

It is possible to avoid the use of the load method by manually orchestrating the setups progression:

// creates the new "Experience" object
var experience = new adways.interactive.Experience();
console.log("new experience created: "+experience.getExperienceID());
// sets where the player will have to be instanciated
experience.setPlayerContainer(domEelementOrDomId);
// sets the publication ID (ie: the interactivity id)
experience.setPublicationID("GSPfHsV");
//since requesting the data is an async process, building the objects will have to wait until its
// reception before starting:
experience.addEventListener(adways.interactive.Experience.Event.PUBLICATION_JSON_CHANGED, function(){
    if (experience.getPublicationJSON()!=null) {
        // builds the player from the data (asynchronous process)
        experience.buildPlayer();
        // builds the scene from the data
        experience.buildScene();
    }
});
// The delegate cannot be built before the player is. But since building the player is an async process
// (as for requesting the data), building the delegate has to wait for the player to be built:
experience.addEventListener(adways.interactive.Experience.Event.PLAYER_STATE_CHANGED, function(){
    if (experience.getPlayerState().valueOf()==adways.interactive.Experience.playerStates.BUILT) {
        // builds the delegate
        experience.buildDelegate();
    }
});
// gather the data of the publication (asynchronous process)
experience.requestPublicationJSON();

Example #3: adding interactivity on top of an already instanciated video player

Here, the engine is not responsible of loading the player. The interactivity is added on top of an already instanciated one.
Yes, it is possible to add any interactive scenario on top of any stream of a known player.
(Contact the team to know if your player is compatible)

    
<!-- standard HTML5 video player instanciation -->
<video id="video-player" style="width:600px;max-width:100%;" controls>
   <source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
   <source src="http://www.w3schools.com/html/mov_bbb.ogg" type="video/ogg">
   Your browser does not support HTML5 video.
</video>
<script type="text/javascript"> // creates the new "Experience" object var experience = new adways.interactive.Experience(); // sets the player helper constant corresponding to the existing player experience.setPlayerClass("HTML5"); // adways.playerHelpers.HTML5 parameter is deprecated // sets the player API // the argument is the javascript object that represents the player API experience.setPlayerAPI(document.getElementById("video-player")); // sets the publication ID (ie: the interactivity id) experience.setPublicationID("GSPfHsV"); // loads and builds everything experience.load(); </script>

Example #4: gathering information on the interactions that occured while a video is playing

The next example shows the most easiest way to be aware of the "user media route".
Before launching the load of everything, it is possible to add some "event listeners" that will be triggered as soon as something happens.

Creates the experience object:

var experience = new adways.interactive.Experience();
experience.setPublicationID("GSPfHsV");
experience.setPlayerContainer("adways-interactive-video");

Now, prior to calling the "load" method, define and add a set of callback methods:

  • Being aware of the scene loading:
    // definning the callback
    var sceneStateChangedCB = function () {
        var s = "scene state changed: ";
        switch (experience.getSceneState().valueOf()) {
            case adways.interactive.Experience.sceneStates.EMPTY:
                s += "is now \"EMPTY\"";
                break;
            case adways.interactive.Experience.sceneStates.BUILDING:
                s += "is currently \"BUILDING\"";
                break;
            case adways.interactive.Experience.sceneStates.BUILT:
                s += "is now \"BUILT\" and available";
                break;
        }
        console.log(s);
    };
    // adding the event listener
    experience.addEventListener (adways.interactive.Experience.Event.SCENE_STATE_CHANGED, sceneStateChangedCB);
    
  • Being aware of an action:
    var actionExecutedCB = function (event) {
        var s = "action executed: ";
        switch (arguments[0].getAction().getKind()) {
            case adways.hv.actionKinds.SEEK_TO:
                s += "SEEK_TO ("+event.getAction().getTime().valueOf()+" seconds)";
                break;    
            case adways.hv.actionKinds.ACTIVATION:
                var enrichment = event.getAction().getEnrichment();
                s += "enrichment ACTIVATION ("+enrichment.getName().valueOf()+" , "+enrichment.getEnrichmentId().valueOf()+")";
                break;    
            case adways.hv.actionKinds.PLAYPAUSE:
                s += "PLAY/PAUSE state changed to "+event.getAction().getPlayState().valueOf();
                break;    
            case adways.hv.actionKinds.URL:
                s += "URL opened ("+event.getAction().getURL().valueOf()+")";
                break;   
        }
        console.log (s);
    };
    experience.addEventListener(adways.interactive.Experience.Event.ACTION_EXECUTED, actionExecutedCB);
    
  • Being aware of a user click on a content:
    var contentClickedCB = function (event) {
        var s = "content clicked. It belongs to the enrichment ";
        var enrichment = event.getContent().getEnrichment();
        s += enrichment.getName().valueOf();
        s += " of id ";
        s += enrichment.getEnrichmentId().valueOf();
        console.log(s);
    };
    experience.addEventListener(adways.interactive.Experience.Event.CONTENT_CLICKED, contentClickedCB);
    
  • Being aware of a stat sent from on a content:
    var contentStatCB = function (event) {
        var statKey = event.getKey();
        var statValue = event.getValue();
        var s = "stat sent. Key : "+statKey+", value : "+statValue+". It belongs to the enrichment ";
        var enrichment = event.getContent().getEnrichment();
        s += enrichment.getName().valueOf();
        s += " of id ";
        s += enrichment.getEnrichmentId().valueOf();
        console.log(s);
    };                          
    experience.addEventListener(adways.interactive.Experience.Event.CONTENT_STAT, contentStatCB);
    
  • Being aware of an enrichment open/close operation:
    var enrichmentActivationChangedCB = function (event) {
        var enrichment = event.getEnrichment();
        var s = "enrichment (";
        s += enrichment.getName().valueOf();
        s += " , ";
        s += enrichment.getEnrichmentId().valueOf();
        s += ") activation changed to: ";
        s += enrichment.getActivated().valueOf();
        console.log(s);
    };
    experience.addEventListener(adways.interactive.Experience.Event.ENRICHMENT_ACTIVATION_CHANGED, enrichmentActivationChangedCB);
    

And now it is possible to launch the experience's "load" method:

    
experience.load();



Nested classes: Event, PercentConsumedEvent, ActionEvent, ContentEvent, ContentStatEvent, EnrichmentEvent,

adways.interactive.Experience( ) public

Fires: <adways.interactive.Experience.PercentConsumedEvent>: of kind adways.interactive.Experience.Event.PERCENT_CONSUMED:

Fired every 10 percent played of video total time.

Fires: <adways.interactive.Experience.ContentStatEvent>: of kind adways.interactive.Experience.Event.CONTENT_STAT:

Fired when a content sends a custom stat.

Fires: <adways.interactive.Experience.ActionEvent>: of kind adways.interactive.Experience.Event.ACTION_EXECUTED:

Fired when the engine execute an action.

<Number> addEventListener( kind, callback, [instance=null], [priority=0], [useWeakReference=false] ) public
Adds an event listener of a specific event kind.

Parameters:

  • kind <Constant>
    kind of the event to listen
  • callback <FUNCTION>
    function called when the event is fired
  • [instance=null] <Object> optional
    callback's instance. Useful when the callback is binded to an object:
                        Class = function () {};
                        Class.prototype.callback = function () {};
                        var a = new Class();
                        aDispatcher.addEventListener(AN_EVENT_KIND, a.callback, a);
  • [priority=0] <Number> optional
    priority
  • [useWeakReference=false] <Boolean> optional
    not yet used
Return: <Number>: 1 if event added, 0 otherwise (already added callback). When instance==null, the callback should be accessible from the global context and be a "static" method. Exemple:
                    namespaceA.subnamespace.myCallback = function (event) {
                        ...
                    };
                    aDispatcher.addEventListener(AN_EVENT_KIND, namespaceA.subnamespace.myCallback);
<Number> buildDelegate( ) public

Builds the delegate calling the delegate builder class.

see delegate

Return: <Number>:
  • 1: delegateBuilder successfully called
  • -1: invalid playerAPI or no player already built
  • -2: invalid delegateBuilderClassname
  • -3: invalid delegateBuilderURL
.
<Number> buildPlayer( ) public

Builds the player calling the player builder class.

see player

Return: <Number>:
    .
  • 1: player builder successfully called
  • -1: the playerContainer is not valid (not a DOMElement)
  • -2: invalid playerBuilderCassname
  • -3: invalid playerBuilderURL
  • -4: a player may be under construction
<Number> buildScene( ) public

Builds the scene if a publication JSON is valid.

The scene could be built asynchronously once a publication JSON is given / requested.

see scene

Return: <Number>:

1 if success, 0 otherwise.

<Number> clearAll( ) public

Resets the experience into the same state as it was right after a simple "new".

Return: <Number>:

1 if success, 0 otherwise (currently always 1 since it is currently "brute forced").

<Number> clearPlayer( [withConfig=false] ) public

May destroy the player and the associated delegate object. There is 2 cases to consider:

  1. the current "Experience" object is used to build everything: the player and the interactivity above
    Since the experience was responsible of building the player, it is also responsible of destroying it. A call to "clearPlayer" then removes the player from the web page and destructs it.
  2. the current "Experience" object is used to add interactivity on top of an already instanciated player
    Since the experience was only responsible of adding the interactivity, not building the player, a call to "clearPlayer" then only removes and destroys what was added to make the interactivity working: the delegate. It does not modify the "already in place" player.
Moreover, depending on the optional parameter "withConfig", not all the data are cleared:
  • withConfig=false
    • the "delegate" object is destroyed and the attribute reset to null
    • the "delegateBuilder" is destroyed and the attribute reset to null
    • the "playerAPI" is reset to null
    • the "playerBuilder" is destroyed (if any, depending on the 2 cases above), which also destroys the player; and the attributes are reset to null

    => buildPlayer() is callable right after and the player will be rebuilt.
  • withConfig=true
    buildPlayer() is not callable right after because all the tied data are cleared. Performs the same operations as "withConfig=false", plus:
    • reset the delegate params to new Object()
    • reset the player params to new Object()
    • reset the media params to new Object()
    • reset the options to new Object()
    • reset the player container to null
    • reset the playerBuilderURL to null
    • reset the playerBuilderClassname to null
    • reset the delegateBuilderURL to null
    • reset the delegateBuilderClassname to null

Parameters:

  • [withConfig=false] <Boolean> optional

    whether to "deeply" clear all the attributes linked to the player.

Return: <Number>:

1 if success, 0 otherwise (currently always 1 since it is currently "brute forced").

<Number> clearScene( ) public

Clears the scene. Reset elements:

  • the "publicationID" string, to ""
  • the "publicationJSON" json, to null
  • the "scene" object
pause()is called on the "s2p" and "p2s" objects.
Return: <Number>:

1 if success, 0 otherwise (currently always 1 since it is currently "brute forced").

<?> getDelegate( ) public

Description is coming soon.

see delegate

Return: <?>:

?.

<String> getDelegateBuilderClassname( ) public

Description is coming soon.

Return: <String>:

?.

<String> getDelegateBuilderURL( ) public

Description is coming soon.

Return: <String>:

?.

<?> getDelegateParams( key ) public

Gives one "delegate parameter".

Parameters:

  • key <String>

    the parameter's name.

Return: <?>:

the "key" parameter's value.

<Object> getDelegateParams( ) public

Gives the "delegate parameters".
Be careful, the current method gives a pointer onto the parameters, not a copy of them. So changing them may impact a current running interactivity setup process. Example:

                    ...
                    experience.buildDelegate();                          // asynchronous
                    experience.getDelegateParams()["key1"] = newValue;  // dangerous !
                    ...
Such a code changes the parameters named "key1" while the delegate is building...
"Prefer using setDelegateParams() instead, it checks whether you can set or not."

Return: <Object>:

the JSON formatted set of <key,value>.

<adways.interactive.Experience.delegateStates> getDelegateState( ) public

Description is coming soon.

Return: <adways.interactive.Experience.delegateStates>:

?.

<String> getExperienceID( ) public

Description is coming soon.

Return: <String>:

?.

<Object> getMediaParams( ) public

Gives the "media parameters".
Be careful, the current method gives a pointer onto the parameters, not a copy of them. So changing them may impact a current running interactivity setup process. Example:

                    ...
                    experience.buildPlayer();
                    experience.getmediaParams()["key1"] = newValue;  // dangerous !
                    ...
Such a code changes the parameters named "key1" while the player is building...
"Prefer using setMediaParams() instead, it checks whether you can set or not."

Return: <Object>:

the JSON formatted set of <key,value>.

<?> getMediaParams( key ) public

Gives one "media parameter".

Parameters:

  • key <String>

    the parameter's name.

Return: <?>:

the "key" parameter's value.

<?> getOptions( key ) public

Gives one "option".

Parameters:

  • key <String>

    the option's name.

Return: <?>:

the "key" option's value.

<Object> getOptions( ) public

Gives the "options".
Be careful, the current method gives a pointer onto the options, not a copy of them. So changing them may impact a current running interactivity setup process. Example:

                    ...
                    experience.buildPlayer();
                    experience.getOptions()["key1"] = newValue;  // dangerous !
                    ...
Such a code changes the options named "key1" while the player is building...
"Prefer using setOptions() instead, it checks whether you can set or not."

Return: <Object>:

the JSON formatted set of <key,value>.

<Boolean> getOwnPlayer( ) public

Description is coming soon.

see player

Return: <Boolean>:

?.

<adways.interactive.SceneControllerWrapper> getP2S( ) public

Description is coming soon.

see "s2p" and "p2s" objects

Return: <adways.interactive.SceneControllerWrapper>:

?.

<Object> getPlayer( ) public

DEPRECATED. See getPlayerAPI.

see player

Return: <Object>:

?.

<Object> getPlayerAPI( ) public

Description is coming soon.

see player

Return: <Object>:

?.

<String> getPlayerBuilderClassname( ) public

Description is coming soon.

see player

Return: <String>:

?.

<String> getPlayerBuilderURL( ) public

Gives the player builder script url.
This points the script that holds the "player builder" class, a class capable of building, setuping and displaying the player acording to some parameters.

see player

Return: <String>:

the player builder script url.

<DOMElement> getPlayerContainer( ) public

Description is coming soon.

see player

Return: <DOMElement>:

?.

<Object> getPlayerParams( ) public

Gives the "player parameters".
Be careful, the current method gives a pointer onto the parameters, not a copy of them. So changing them may impact a current running interactivity setup process. Example:

                    ...
                    experience.buildPlayer();
                    experience.getPlayerParams()["key1"] = newValue;  // dangerous !
                    ...
Such a code changes the parameters named "key1" while the player is building...
"Prefer using setPlayerParams() instead, it checks whether you can set or not."

Return: <Object>:

the JSON formatted set of <key,value>.

<?> getPlayerParams( key ) public

Gives one "player parameter".

Parameters:

  • key <String>

    the parameter's name.

Return: <?>:

the "key" parameter's value.

<adways.interactive.Experience.playerStates> getPlayerState( ) public

Description is coming soon.

see player

Return: <adways.interactive.Experience.playerStates>:

?.

<String> getPublicationID( ) public

Description is coming soon.

see scene

Return: <String>:

.

<?> getPublicationJSON( ) public

Description is coming soon.

see scene

Return: <?>:

?.

<adways.interactive.SceneControllerWrapper> getS2P( ) public

Description is coming soon.

see "s2p" and "p2s" objects

Return: <adways.interactive.SceneControllerWrapper>:

?.

<adways.interactive.Scene> getScene( ) public

Description is coming soon.

see scene

Return: <adways.interactive.Scene>:

?.

<adways.interactive.Experience.sceneStates> getSceneState( ) public

Description is coming soon.

see scene

Return: <adways.interactive.Experience.sceneStates>:

?.

<Number> hasEventListener( kind, callback, [instance=null] ) public
Whether or not a listener has already been added.

Parameters:

  • kind <Constant>
    the event's kind
  • callback <FUNCTION>
    the listener's function
  • [instance=null] <Object> optional
    the listener callback's instance
Return: <Number>: the listeners count.
<Number> load( ) public

Description is coming soon.

Return: <Number>:

?.

<Number> nbEventListeners( kind ) public
Counts the listeners added for a specific event.

Parameters:

  • kind <Constant>
    the event's kind
Return: <Number>: the listeners count.
<Number> removeAllEventListeners( ) public
Removes all the listeners.
Return: <Number>: 1 on success (currently always), 0 otherwise.
<Number> removeEventListener( kind, callback, [instance=null] ) public
Removes an event listener of a specific event kind.

Parameters:

  • kind <Constant>
    kind of the event to listen
  • callback <FUNCTION>
    function called when the event is fired
  • [instance=null] <Object> optional
    callback's instance
Return: <Number>: 1 if event removed, 0 otherwise ( couple < instance + callback > not found).
<Number> requestPublicationJSON( ) public

Description is coming soon.

see scene

Return: <Number>:

1 if success, 0 otherwise.

<Number> setDelegateBuilderClassname( ) public

Description is coming soon.

Return: <Number>:
  • 1 on successful affectation
  • -1 when the argument is missing
  • -2 when the argument is not a string
  • -3 if the current experience already has a delegate, so when getDelegateState().valueOf()==delegateStates.EMPTY
<Number> setDelegateBuilderURL( ) public

Description is coming soon.

Return: <Number>:
  • 1 on successful affectation
  • -1 when the argument is missing
  • -2 when the argument is not a string
  • -3 if the current experience already has a delegate, so when getDelegateState().valueOf()==delegateStates.EMPTY
<Number> setDelegateParams( key, value ) public

Sets/updates one "delegate parameter".

Parameters:

  • key <String>

    the parameter's name.

  • value <?>

    the parameter's value.

Return: <Number>:
  • 1: the parameter is newly set
  • 2: the parameter is updated (the key already exists, the value is updated)
  • 0: nothing happened: trying to set the same value
  • -1: arguments error: expected 1 argument at least
  • -4: arguments error: the key is not a string or is an empty string
  • -5: arguments error: the value is undefined
  • -10: usage error: calling setDelegateParams while getDelegateState().valueOf()!==EMPTY
<Number> setDelegateParams( paramsSet ) public

Sets multiple "delegate parameters" at once.
Be careful: overrides all the already set "delegate parameters".

Parameters:

  • paramsSet <Object>

    a JSON formatted <key,value> set of parameters. Example:

                        {
                        "key1": value1,
                        "key2": value2,
                        ...
                        }

Return: <Number>:
  • 1: the parameters are set
  • -1: arguments error: there is no argument
  • -2: arguments error: the argument is not an object
  • -3: arguments error: the argument is null
  • -10: usage error: calling setDelegateParams while getDelegateState().valueOf()!==EMPTY
<Number> setMediaParams( key, value ) public

Sets/updates one "media parameter".

Parameters:

  • key <String>

    the parameter's name.

  • value <?>

    the parameter's value.

Return: <Number>:
  • 1: the parameter is newly set
  • 2: the parameter is updated (the key already exists, the value is updated)
  • 0: nothing happened: trying to set the same value
  • -1: arguments error: expected 1 argument at least
  • -4: arguments error: the key is not a string or is an empty string
  • -5: arguments error: the value is undefined
  • -10: usage error: calling setMediaParams while getPlayerState().valueOf()!==EMPTY
<Number> setMediaParams( paramsSet ) public

Sets multiple "media parameters" at once.
Be careful: overrides all the already set "media parameters".

Parameters:

  • paramsSet <Object>

    a JSON formatted <key,value> set of parameters. Example:

                        {
                        "key1": value1,
                        "key2": value2,
                        ...
                        }

Return: <Number>:
  • 1: the parameters are set
  • -1: arguments error: there is no argument
  • -2: arguments error: the argument is not an object
  • -3: arguments error: the argument is null
  • -10: usage error: calling setMediaParams while getPlayerState().valueOf()!==EMPTY
<Number> setOptions( optionsSet ) public

Sets multiple "options" at once.
Be careful: overrides all the already set "options".

Parameters:

  • optionsSet <Object>

    a JSON formatted <key,value> set of options. Example:

                        {
                        "key1": value1,
                        "key2": value2,
                        ...
                        }

Return: <Number>:
  • 1: the options are set
  • -1: arguments error: there is no argument
  • -2: arguments error: the argument is not an object
  • -3: arguments error: the argument is null
  • -10: usage error: calling setOptions while getPlayerState().valueOf()!==EMPTY
<Number> setOptions( key, value ) public

Sets/updates one "options".

Parameters:

  • key <String>

    the option's name.

  • value <?>

    the option's value.

Return: <Number>:
  • 1: the option is newly set
  • 2: the option is updated (the key already exists, the value is updated)
  • 0: nothing happened: trying to set the same value
  • -1: arguments error: expected 1 argument at least
  • -4: arguments error: the key is not a string or is an empty string
  • -5: arguments error: the value is undefined
  • -10: usage error: calling setOptions while getPlayerState().valueOf()!==EMPTY
<?> setPlayerAPI( ) public

Description is coming soon.

see player

Return: <?>:

?.

<Number> setPlayerBuilderClassname( ) public

Description is coming soon.

see player

Return: <Number>:
  • 1 on successful affectation
  • -1 when the argument is missing
  • -2 when the argument is not a string
  • -3 if the current experience already has a player, so when getPlayerState().valueOf()==playerStates.EMPTY
<Number> setPlayerBuilderURL( ) public

Description is coming soon.

see player

Return: <Number>:
  • 1 on successful affectation
  • -1 when the argument is missing
  • -2 when the argument is not a string
  • -3 if the current experience already has a player, so when getPlayerState().valueOf()==playerStates.EMPTY
<Number> setPlayerClass( ) public

Player and delegate setters ("builder URLs" and "builder classnames") shortcut.

Return: <Number>:
  • 1 on success
  • -1 when the argument is missing
  • -2 if the argument is not an object
<Number> setPlayerContainer( ) public

Description is coming soon.

see player

Return: <Number>:

?.

<Number> setPlayerParams( key, value ) public

Sets/updates one "player parameter".

Parameters:

  • key <String>

    the parameter's name.

  • value <?>

    the parameter's value.

Return: <Number>:
  • 1: the parameter is newly set
  • 2: the parameter is updated (the key already exists, the value is updated)
  • 0: nothing happened: trying to set the same value
  • -1: arguments error: expected 1 argument at least
  • -4: arguments error: the key is not a string or is an empty string
  • -5: arguments error: the value is undefined
  • -10: usage error: calling setPlayerParams while getPlayerState().valueOf()!==EMPTY
<Number> setPlayerParams( paramsSet ) public

Sets multiple "player parameters" at once.
Be careful: overrides all the already set "player parameters".

Parameters:

  • paramsSet <Object>

    a JSON formatted <key,value> set of parameters. Example:

                        {
                        "key1": value1,
                        "key2": value2,
                        ...
                        }

Return: <Number>:
  • 1: the parameters are set
  • -1: arguments error: there is no argument
  • -2: arguments error: the argument is not an object
  • -3: arguments error: the argument is null
  • -10: usage error: calling setPlayerParams while getPlayerState().valueOf()!==EMPTY
<Number> setPublicationID( ) public

Description is coming soon.

see scene

Return: <Number>:

1 if success, 0 otherwise.

<Number> setPublicationJSON( ) public

Description is coming soon.

see scene

Return: <Number>:

1 if success, 0 otherwise.

<Number> setSceneTimeReference( setSceneTimeReference ) public

Indicates whether the time reference for the interactivity is video time or scene time.

Parameters:

  • setSceneTimeReference <Boolean>

    the scene time reference indicator, true for scene time, false for video time.

Return: <Number>:
  • 1: the parameter is newly set
  • 0: nothing happened: trying to set the same value
  • -1: arguments error: expected 1 argument at least
  • -2: arguments error: the setSceneTimeReference is not a boolean
  • -3: usage error: calling setSceneTimeReference while getSceneState().valueOf()!==EMPTY
<Number> unsetDelegateParams( key ) public

Removes one "delegate parameter".

Parameters:

  • key <String>

    the parameter's name.

Return: <Number>:
  • 1: parameter unset success
  • 0: nothing to delete: key not found
  • -1: arguments error: there is no argument
  • -2: arguments error: the key is not a string or is an empty string
  • -10: usage error: calling unsetDelegateParams while getDelegateState().valueOf()!==EMPTY
<Number> unsetMediaParams( key ) public

Removes one "media parameter".

Parameters:

  • key <String>

    the parameter's name.

Return: <Number>:
  • 1: parameter unset success
  • 0: nothing to delete: key not found
  • -1: arguments error: there is no argument
  • -2: arguments error: the key is not a string or is an empty string
  • -10: usage error: calling unsetMediaParams while getPlayerState().valueOf()!==EMPTY
<Number> unsetOptions( key ) public

Removes one "option".

Parameters:

  • key <String>

    the option's name.

Return: <Number>:
  • 1: option unset success
  • 0: nothing to delete: key not found
  • -1: arguments error: there is no argument
  • -2: arguments error: the key is not a string or is an empty string
  • -10: usage error: calling unsetOptions while getPlayerState().valueOf()!==EMPTY
<Number> unsetPlayerParams( key ) public

Removes one "player parameter".

Parameters:

  • key <String>

    the parameter's name.

Return: <Number>:
  • 1: parameter unset success
  • 0: nothing to delete: key not found
  • -1: arguments error: there is no argument
  • -2: arguments error: the key is not a string or is an empty string
  • -10: usage error: calling unsetPlayerParams while getPlayerState().valueOf()!==EMPTY