<script src="/whitelist-domain.js" ></script><!DOCTYPE html>
<html>

<head>
    <script src="https://cdn.jsdelivr.net/clappr/latest/clappr.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/clappr/dash-shaka-playback@latest/dist/dash-shaka-playback.js"></script>
    <script type="text/javascript"
            src="https://cdn.jsdelivr.net/gh/clappr/clappr-level-selector-plugin@latest/dist/level-selector.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://streamtp2.com/cssm.css">
    <style>
        body,
        html {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        #player {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        /*        .sound-button {
            position: absolute;
            top: 10px;
            left: 10px;
            padding: 10px 20px;
            background-color: #002cec;
            color: #fff;
            border: none;
            border-radius: 5px;
            font-size: 14px;
            cursor: pointer;
            transition: background-color 0.3s;
        }*/
        .sound-button {
            position: absolute;
            top: 10px;
            left: 10px;
            box-sizing: border-box;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-color: transparent;
            border: 2px solid #e74c3c;
            border-radius: 0.6em;
            color: #e74c3c;
            cursor: pointer;
            display: flex;
            align-self: center;
            font-size: 14px;
            font-weight: 400;
            line-height: 1;
            margin: 20px;
            padding: 1em 1em;
            text-decoration: none;
            text-align: center;
            text-transform: uppercase;
            font-family: "Montserrat", sans-serif;
            font-weight: 700;
            min-width: 100px;
            max-width: 250px;
        }

            .sound-button:hover,
            .btn:focus {
                color: #fff;
                outline: 0;
            }

        .btn-effect {
            border-color: #3498db;
            color: #fff;
            box-shadow: 0 0 40px 40px #3498db inset, 0 0 0 0 #3498db;
            transition: all 150ms ease-in-out;
        }

            .btn-effect:hover {
                box-shadow: 0 0 10px 0 #3498db inset, 0 0 10px 4px #3498db;
            }

        /*.sound-button:hover {
                background-color: #001f4d;
            }*/
    </style>
</head>

<body>
    <div id="player"></div>
    <button class="sound-button btn-effect" id="soundButton" onclick="unmutePlayer();">Click To Activate Sound</button>
    <script>

        var player;
        player = new Clappr.Player({
            parentId: "#player",
            poster: '',
            width: '100%',
            height: '100%',
            autoPlay: true,
            mute: true,
            plugins: [DashShakaPlayback, LevelSelector],
            source: 'https://av-ch-cdn.mncnow.id/live/eds/iNewsTV-HDD/sa_dash_vmx/iNewsTV-HDD.mpd',
            shakaConfiguration: {
                drm: {
                    clearKeys: {
                        'a31cf5136789514b7e12b9cc99307c84': '980e54d671ffc2b2f4cf54e75cae0ac2',
                    }
                }
            }, levelSelectorConfig: {
                title: 'Quality',
                labels: {
                    2: 'High', // 500kbps
                    1: 'Med', // 240kbps
                    0: 'Low', // 120kbps
                },
                labelCallback: function (playbackLevel, customLabel) {
                    return customLabel + playbackLevel.level.height + 'p'; // High 720p
                }
            },
        });

        function unmutePlayer() {
            var pl = false;
            if (player) {
                player.setVolume(100);
                player.configure({ mute: false });
                pl = true;
                document.getElementById('soundButton').style.display = 'none';
            }
            /*if (pl) { document.getElementById('soundButton').style.display = 'none'; }*/
        }
    </script>
</body>

</html>