Use the player below. Event chips light up as the HTMLMediaElement fires them. The property readout updates live — this is the API surface every custom control reads from.
A full player built from scratch: play/pause, seek, volume, mute, playback speed. Every control reads and writes the media element. Click the video to play/pause.
This big progress bar shows both regions: grey = buffered (downloaded), red = played (watched). Seek around to create multiple buffered ranges and watch the TimeRanges object update.
Play the video — captions appear from a simulated WebVTT track. Switch the track mode and restyle the cues live. The active cue highlights in the VTT source.
Both are Promise-based and need feature detection. The simulated player demonstrates the state transitions and events each API fires.
document.pictureInPictureEnabled → truerequestPictureInPicture() returns a Promiseenterpictureinpicture, leavepictureinpicture
webkitRequestFullscreenvideo.webkitEnterFullscreen()