function updatePipelineSource() {
    const sourceType =
        sourceSelector.options[sourceSelector.selectedIndex].value;
    if (!sourceType || !pipeline) {
      initPipeline();
    } else {
      updatePipelineSourceIfSet();
    }
  }
Updates the pipeline based on the current settings of the sourceSelector
and sourceVisible UI elements. If the "stopped" option is selected,
reinitializes the pipeline instead.