static async createUIThroughAPI(videoContainer, video, config, canvas) {
    const player = new shaka.Player();
    await player.attach(video);
    // Create UI
    config = config || {};
    const ui = new shaka.ui.Overlay(player, videoContainer, video, canvas);
    // TODO: generate externs automatically from @event types
    // This event should be a shaka.Player.ErrorEvent
    ui.getControls().addEventListener('error', (e) => fail(e['detail']));
    ui.configure(config);
    return ui;
  }
@param {!HTMLElement} videoContainer
@param {!HTMLMediaElement} video
@param {!Object=} config
@param {?HTMLCanvasElement=} canvas
@return {!Promise<!shaka.ui.Overlay>}