isMediaType = (context, type) => {
  const options = context.options[0] || {};
  return MEDIA_TYPES
    .concat(flatMap(MEDIA_TYPES, (mediaType) => options[mediaType]))
    .some((typeToCheck) => typeToCheck === type);
}
@fileoverview <audio> and <video> elements must have a <track> for captions.
@author Ethan Cohen
@flow