JWPlayer example

Currently reading:
 JWPlayer example

Iturpe

Member
LV
0
Joined
Jan 24, 2024
Threads
3
Likes
0
Awards
1
Credits
800©
Cash
0$
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JWPlayer with ClearKey DRM and MPD</title>
    <script src="https://cdn.jwplayer.com/libraries/your-library-key.js"></script>
</head>
<body>

<div id="my-player"></div>

<script type="text/javascript">
    // Initialize the JWPlayer
    jwplayer("my-player").setup({
        playlist: [{
            sources: [{
                file: "https://example.com/path/to/your/manifest.mpd", // URL to your MPD file
                type: "application/dash+xml",
                drm: {
                    clearkey: {
                        keyId: "your-key-id", // Your ClearKey ID
                        key: "your-clear-key" // Your ClearKey
                    }
                }
            }],
            image: "https://example.com/path/to/your/thumbnail.jpg", // URL to your thumbnail image
            title: "My Video Title", // Title of your video
            description: "A short description of your video." // Description of your video
        }],
        width: "640", // Width of the player
        height: "360", // Height of the player
        autostart: false, // Set to true to enable auto start
        controls: true // Set to false to hide player controls
    });
</script>

</body>
</html>
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Tips
Top Bottom