- Date:
- 2024 – present
- Status:
- [live] served from jsDelivr
- Stack:
- JavaScript, HTML5 Media APIs, CSS
Subject: SopPlayer: a video player you add with one script tag
An open-source HTML5 video player with no dependencies. You add one script tag from jsDelivr and mark a <video> element; it handles the controls, skins and Picture-in-Picture.
The problem
Full-featured player libraries are heavy and often expect a build step. For a blog or a small site that just wants a decent-looking player, that is too much.
What I built
- Plain JavaScript on top of the browser's own media APIs, with no framework and no dependencies.
- Seek bar with buffered progress, volume, playback-rate selection, fullscreen and Picture-in-Picture.
- CSS skins, so the player can match the site it is embedded in.
<script src="https://cdn.jsdelivr.net/gh/playlikeboy/Sopplayer/dist/sopplayer.min.js"></script> <video class="sopplayer" controls> <source src="video.mp4" type="video/mp4" /> </video>
Usage
My LinkedIn post shows jsDelivr statistics of about 1.18M requests and 38 GB served. These are self-reported. jsDelivr paths include the GitHub owner, which is why this repo stays on my profile rather than moving to an archive.