index.js
function _setParams(params){

    if(params){

        // set the data collection params
        if(params.defaultEvents){

            for (let i = 0; i < params.defaultEvents.length; i++){

                dataCollector.configureEventCollection(
                    params.defaultEvents[i].name,
                    params.defaultEvents[i].status,
                    params.defaultEvents[i].timePeriod
                );

            }

        }

        // set the session Info
        if(params.sessionInfo){

            for(let i = 0; i < params.sessionInfo.length; i++){

                dataManager.addSessionExtra(
                    params.sessionInfo[i].key,
                    params.sessionInfo[i].value
                );

            }
            
        }

        // set pauseOnHeadsetRemove
        if('pauseOnHeadsetRemove' in params){

            timeManager.setRemoveHeadsetPausesPlay(!!params['pauseOnHeadsetRemove']);

        }

    }

}
function _setParams(params){

    if(params){

        // set the data collection params
        if(params.defaultEvents){

            for (let i = 0; i < params.defaultEvents.length; i++){

                dataCollector.configureEventCollection(
                    params.defaultEvents[i].name,
                    params.defaultEvents[i].status,
                    params.defaultEvents[i].timePeriod
                );

            }

        }

        // set the session Info
        if(params.sessionInfo){

            for(let i = 0; i < params.sessionInfo.length; i++){

                dataManager.addSessionExtra(
                    params.sessionInfo[i].key,
                    params.sessionInfo[i].value
                );

            }
            
        }

        // set pauseOnHeadsetRemove
        if('pauseOnHeadsetRemove' in params){

            timeManager.setRemoveHeadsetPausesPlay(!!params['pauseOnHeadsetRemove']);

        }

    }

}
function _setParams ( params ) { if ( params ) { // set the data collection params if ( params . defaultEvents ) { for ( let i = 0 ; i < params . defaultEvents . length ; i ++ ) { dataCollector . configureEventCollection ( params . defaultEvents [ i ] . name , params . defaultEvents [ i ] . status , params . defaultEvents [ i ] . timePeriod ) ; } } // set the session Info if ( params . sessionInfo ) { for ( let i = 0 ; i < params . sessionInfo . length ; i ++ ) { dataManager . addSessionExtra ( params . sessionInfo [ i ] . key , params . sessionInfo [ i ] . value ) ; } } // set pauseOnHeadsetRemove if ( 'pauseOnHeadsetRemove' in params ) { timeManager . setRemoveHeadsetPausesPlay ( ! ! params [ 'pauseOnHeadsetRemove' ] ) ; } } }
set the params for the application
@param {Object} params
@param {Object[]} params.defaultEvents array containing the configuretion for default events
@param {Object[]} params.sessionInfo array containing the meta data for session
set the params for the application