Is there an alternative approach than using player.h?

Is there a different approach that is more stable and works no matter whether it is j or h or anything else?

Can that part be written a different way in the code?

const iframe = player.h; https://jsfiddle.net/eo8s4zt9/

function onPlayerReady(event) {
    player = event.target;
    player.setVolume(100);
    shufflePlaylist(player);
    const iframe = player.h;
    iframe.dispatchEvent(events.afterPlayerReady);
  }

    const iframe = player.h;
    const eventHandler = eventHandlers.afterPlayerReady;
    iframe.addEventListener("afterPlayerReady", eventHandler);
  }