function createMediaSignalingPayload(dominantSpeaker, networkQuality, trackPriority, trackSwitchOff) {
  const transports = { transports: [{ type: 'data-channel' }] };
  return Object.assign(
    dominantSpeaker
      // eslint-disable-next-line
      ? { active_speaker: transports }
      : {},
    networkQuality
      // eslint-disable-next-line
      ? { network_quality: transports }
      : {},
    trackPriority
      // eslint-disable-next-line
      ? { track_priority: transports }
      : {},
    trackSwitchOff
      // eslint-disable-next-line
      ? { track_switch_off: transports }
      : {}
  );
}
/**
 * Create the Media Signaling payload included in an RSP connect message.
 * @param {boolean} dominantSpeaker - whether to enable the Dominant Speaker
 *   protocol or not
 * @param {boolean} networkQuality - whether to enable the Network Quality
 *   protocol or not
 * @param {boolean} trackPriority - whether to enable the Track Priority
 *   protocol or not
 * @param {boolean} trackSwitchOff - whether to enable the Track Switch-Off
 *   protocol or not.
 * @returns {object}
 */
Create the Media Signaling payload included in an RSP connect message.
Create the Media Signaling payload included in an RSP connect message .
function createMediaSignalingPayload(dominantSpeaker, networkQuality, trackPriority, trackSwitchOff) {
  const transports = { transports: [{ type: 'data-channel' }] };
  return Object.assign(
    dominantSpeaker
      ? { active_speaker: transports }
      : {},
    networkQuality
      ? { network_quality: transports }
      : {},
    trackPriority
      ? { track_priority: transports }
      : {},
    trackSwitchOff
      ? { track_switch_off: transports }
      : {}
  );
}
function createMediaSignalingPayload ( dominantSpeaker , networkQuality , trackPriority , trackSwitchOff ) { const transports = { transports : [ { type : 'data-channel' } ] } ; return Object . assign ( dominantSpeaker ? { active_speaker : transports } : { } , networkQuality ? { network_quality : transports } : { } , trackPriority ? { track_priority : transports } : { } , trackSwitchOff ? { track_switch_off : transports } : { } ) ; }
Create the Media Signaling payload included in an RSP connect message.
Create the Media Signaling payload included in an RSP connect message .
// eslint-disable-next-line // eslint-disable-next-line // eslint-disable-next-line // eslint-disable-next-line