getContext2D_() {
    const ctx = this.canvas_.getContext('2d');
    if (!ctx) {
      shaka.log.error('2D context is not available');
      return null;
    }
    return /** @type {!CanvasRenderingContext2D} */ (ctx);
  }
Gets the 2D rendering context safely
@return {?CanvasRenderingContext2D}
@private