Get started with openplayerjs CDN

MIT licensed

OpenPlayerJS is a lightweight HTML5 audio player library for the web.

Tags:
  • media
  • video
  • audio
  • hls
  • dash
  • mp4
  • mp3
  • openplayer
  • openplayerjs
  • vast
  • vpaid
  • player
  • video-player
  • audio-player
  • html5-media
  • hlsjs
  • ima-sdk

Stable version

Copied!

How to start using openplayerjs CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with openplayerjs CDN - cdnhub.io</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/open-player/dist/open-player.css" />
    <script src="https://cdn.cdnhub.io/openplayerjs/2.14.2/openplayer.min.js"></script>
</head>
<body>
    <div id="player"></div>
    <script>
        const player = new OpenPlayer.Player({
            target: document.getElementById('player'),
            width: '100%',
            height: '100%',
            controls: true,
            autoplay: false,
            sources: [
                {
                    type: 'video',
                    src: 'https://example.com/video.mp4'
                }
            ]
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions