Using both oncanplay and oncanplaythrough

I was told people usually use both events.

oncanplay and oncanplaythrough

Because oncanplay isn’t reliable in some browsers.
https://jsfiddle.net/vhgL96se/142/

Because both events are fired when readyState did change, you can
use player.readyState to determine a current state and decide what
to do if events happen before you set listeners.

Right now it’s only using one of them, how would I set it up so it’s able to use both events as I was told?

player.oncanplay = function () {
        if (value.value !== "") {
            canPlay = true;
            playPauseIcon(true);
        }
    };