constructor() {
    /** @private {boolean} */
    this.visibility_ = false;
    /**
     * @private {?HTMLCanvasElement} canvas element providing the MediaStream.
     */
    this.canvas_ = null;
    /**
     * @private {?CanvasRenderingContext2D} the 2D context used to draw the
     *     animation.
     */
    this.ctx_ = null;
    /**
     * @private {?MediaStream} the MediaStream from captureStream.
     */
    this.stream_ = null;
    /**
     * @private {?CanvasCaptureMediaStreamTrack} the capture track from
     *     canvas_, obtained from stream_. We manually request new animation
     *     frames on this track.
     */
    this.captureTrack_ = null;
    /** @private {number} requestAnimationFrame handle */
    this.requestAnimationFrameHandle_ = 0;
    /** @private {!Array<string>} text to render */
    this.text_ = ['WebRTC samples'];
    /** @private {string} */
    this.debugPath_ = '<unknown>';
    fetch(TEXT_SOURCE)
        .then(response => {
          if (response.ok) {
            return response.text();
          }
          throw new Error(`Request completed with status ${response.status}.`);
        })
        .then(text => {
          this.text_ = text.trim().split('\n');
        })
        .catch((e) => {
          console.log(`[CanvasSource] The request to retrieve ${
            TEXT_SOURCE} encountered an error: ${e}.`);
        });
  }
Draws text on a Canvas.
@implements {MediaStreamSource} in pipeline.js