modules/dfpAdServerVideo.js
function getCustParams(bid, options) {
  const adserverTargeting = (bid && bid.adserverTargeting) || {};

  let allTargetingData = {};
  const adUnit = options && options.adUnit;
  if (adUnit) {
    let allTargeting = targeting.getAllTargeting(adUnit.code);
    allTargetingData = (allTargeting) ? allTargeting[adUnit.code] : {};
  }

  const optCustParams = deepAccess(options, 'params.cust_params');
  let customParams = Object.assign({},
    // Why are we adding standard keys here ? Refer https://github.com/prebid/Prebid.js/issues/3664
    { hb_uuid: bid && bid.videoCacheKey },
    // hb_uuid will be deprecated and replaced by hb_cache_id
    { hb_cache_id: bid && bid.videoCacheKey },
    allTargetingData,
    adserverTargeting,
    optCustParams,
  );
  return encodeURIComponent(formatQS(customParams));
}
function getCustParams(bid, options) {
  const adserverTargeting = (bid && bid.adserverTargeting) || {};

  let allTargetingData = {};
  const adUnit = options && options.adUnit;
  if (adUnit) {
    let allTargeting = targeting.getAllTargeting(adUnit.code);
    allTargetingData = (allTargeting) ? allTargeting[adUnit.code] : {};
  }

  const optCustParams = deepAccess(options, 'params.cust_params');
  let customParams = Object.assign({},
    // Why are we adding standard keys here ? Refer https://github.com/prebid/Prebid.js/issues/3664
    { hb_uuid: bid && bid.videoCacheKey },
    // hb_uuid will be deprecated and replaced by hb_cache_id
    { hb_cache_id: bid && bid.videoCacheKey },
    allTargetingData,
    adserverTargeting,
    optCustParams,
  );
  return encodeURIComponent(formatQS(customParams));
}
function getCustParams ( bid , options ) { const adserverTargeting = ( bid && bid . adserverTargeting ) || { } ; let allTargetingData = { } ; const adUnit = options && options . adUnit ; if ( adUnit ) { let allTargeting = targeting . getAllTargeting ( adUnit . code ) ; allTargetingData = ( allTargeting ) ? allTargeting [ adUnit . code ] : { } ; } const optCustParams = deepAccess ( options , 'params.cust_params' ) ; let customParams = Object . assign ( { } , // Why are we adding standard keys here ? Refer https://github.com/prebid/Prebid.js/issues/3664 { hb_uuid : bid && bid . videoCacheKey } , // hb_uuid will be deprecated and replaced by hb_cache_id { hb_cache_id : bid && bid . videoCacheKey } , allTargetingData , adserverTargeting , optCustParams , ) ; return encodeURIComponent ( formatQS ( customParams ) ) ; }
Returns the encoded `cust_params` from the bid.adserverTargeting and adds the `hb_uuid`, and `hb_cache_id`. Optionally the options.params.cust_params
@param {AdapterBidResponse} bid
@param {Object} options this is the options passed in from the `buildDfpVideoUrl` function
@return {Object} Encoded key value pairs for cust_params
Returns the encoded cust_params from the bid . adserverTargeting and adds the hb_uuid and hb_cache_id . Optionally the options . params . cust_params