<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="noindex">
    <title>Widevine Protected Video Player</title>
    <style>
        body {
            background-color: #000;
            margin: 0;
            padding: 0;
        }
    </style>
    <script>
        function getParameterByName(name) {
            name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
            var regex = new RegExp("[?&]" + name + "=([^&#]*)"),
                results = regex.exec(location.search);
            return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
        }

        // Get the video file URL from the query parameter "pt"
        const getFileURL = getParameterByName("pt");

        // Redirect if no file URL is provided
        if (!getFileURL) {
            window.location.href = "https://google.com";
        }
    </script>
    <!-- JWPlayer Library -->
    <script src="https://content.jwplatform.com/libraries/KB5zFt7A.js"></script>
    <script>
        jwplayer.key = "XSuP4qMl+9tK17QNb+4+th2Pm9AWgMO/cYH8CI0HGGr7bdjo";  // JWPlayer license key
    </script>
</head>
<body>
    <div id="player"></div>
    <script>
        var config = {
            "playlist": [
                {
                    "sources": [
                        null,
                        {
                            "default": true,
                            "type": "mpd",  // DASH format for Widevine
                            "file": getFileURL,  // Video file URL
                            "drm": {
                                "widevine": {
                                    "url": "https://simple.donwolfoz.org"  // Widevine license server URL
                                },
                                "playready": {}  // PlayReady included if needed
                            },
                            "label": "1"
                        }
                    ]
                }
            ],
            "primary": "html5",
            "hlshtml": true,  // Enable HLS fallback if necessary
            "autostart": false  // Prevent auto-start
        };

        // JWPlayer instance
        var playerInstance = jwplayer("player");
        playerInstance.setup(config);
    </script>
</body>
</html>
