Ads = function() {
  this.player = videojs('video-player');

  this.liveRadio = document.getElementById('live-radio');
  this.vodRadio = document.getElementById('vod-radio');
  this.liveSample = document.getElementById('sample-live-link');
  this.vodSample = document.getElementById('sample-vod-link');
  this.assetKeyField = document.getElementById('asset-key');
  this.liveApiField = document.getElementById('live-api-key');
  this.cmsIdField = document.getElementById('cms-id');
  this.videoIdField = document.getElementById('video-id');
  this.vodApiField = document.getElementById('vod-api-key');
  this.liveInputs = document.getElementById('live-inputs');
  this.vodInputs = document.getElementById('vod-inputs');
  this.loadButton = document.getElementById('dai-load-button');
  this.console = document.getElementById('ima-sample-console');

  this.liveRadio.checked = true;
  this.onRadioClick('live'); // Defaults page to live stream selected.

  this.liveRadio.addEventListener('click', () => {
    this.onRadioClick('live');
  });
  this.vodRadio.addEventListener('click', () => {
    this.onRadioClick('vod');
  });
  this.liveSample.addEventListener('click', () => {
    this.assetKeyField.value = HLS_ASSET_KEY;
  });
  this.vodSample.addEventListener('click', () => {
    this.cmsIdField.value = HLS_CMS_ID;
    this.videoIdField.value = HLS_VIDEO_ID;
  });
  this.loadButton.addEventListener('click', () => {
    this.initStream();
  });
}
Registers UI components and sets up click handlers.