The HTMLMediaElement.readyState property indicates the readiness state of the media.
HTMLMediaElement.readyState
MDN Reference