Player & Embed Integrations
Nov 1, 2026 ยท 170 views
Controlling Embedded Video Playback with Player.js SDK
F
Frontend Team
Developer
Published on 11/1/2026
### Programmatic Player Integration
The Hunny video player natively implements the **Player.js** cross-platform specification.
```html
<iframe id="video-frame" src="http://localhost:4317/embed/LIBRARY_ID/VIDEO_ID" allow="autoplay; fullscreen" width="640" height="360"></iframe>
<script src="https://cdn.jsdelivr.net/npm/playerjs@0.0.12/dist/player.min.js"></script>
<script>
const iframe = document.getElementById('video-frame');
const player = new playerjs.Player(iframe);
player.on('ready', () => {
console.log('Player is ready for playback');
});
player.on('play', () => {
console.log('Video started');
});
player.on('timeupdate', (data) => {
console.log('Current time:', data.seconds, 'Duration:', data.duration);
});
// Programmatic controls:
// player.play();
// player.pause();
// player.setCurrentTime(45);
// player.setVolume(80);
</script>
```
#player#embed#playerjs#javascript