Player overview
Configure MP4, WebM, HLS, and DASH playback with accessible custom controls.
Supported playback
BaPlay uses native HTML5 media for MP4 and WebM, HLS.js with native Safari fallback for M3U8 playlists, and Shaka Player for MPEG-DASH MPD manifests. Adapter code loads only when a matching source needs it.
Accessible controls
Keyboard focus, semantic labels, captions, speed, quality, volume, PiP, and fullscreen.
Responsive input
16:9 sizing, pointer controls, and left/right double-tap seeking on touch screens.
JavaScript initialization
const player = BaPlayPlayer.init('#player', {
source: { src: 'https://cdn.example/video.m3u8', type: 'hls' },
title: 'Example stream',
autoplay: false,
muted: false,
analytics: false,
});
await player.ready;
Persisted player and embed routes serialize source, subtitle, advertising, analytics, skin, accent, and control configuration into the same engine. Use the player demo to verify all formats.
Keyboard shortcuts
Space/K play, arrows seek or change volume, M mutes, F toggles fullscreen, C toggles captions, and P toggles picture-in-picture.