DhivehiGPT Player
DhivehiGPT Player turns a standard HTML <audio> element into a branded "read aloud" control bar for audio generated by DhivehiGPT, so publishers can drop a listen-to-this-article player onto any page.
It ships as a single dependency-free JS library:
- No external runtime dependencies, all CSS is generated and injected by the JS itself.
- Works as a plain
<script>tag (e.g. via jsDelivr) or as an npm package. - Convert a standard
<audio>tag automatically with a singledata-dhivehigpt-playerattribute, configured entirely throughdata-*attributes. - Or initialize and control it programmatically from JavaScript.
- Optional React and Vue wrapper components.
- Light and dark themes, applied automatically based on the visitor's OS/browser preference, plus a solid brand-color "accent" skin.
- An optional "stick to the bottom of the screen while playing" behavior.
<audio data-dhivehigpt-player src="https://example.com/article-read-aloud.mp3"></audio>
import { AudioPlayer } from '@javaabu/dhivehigpt-player';
const player = new AudioPlayer('#my-audio', { accent: true });
player.play();