<!DOCTYPE HTML>
<html>
<head>
    <title>Kaltura Editor Minamal</title>
    <script src="https://www.kaltura.com/apps/expressrecorder/latest/express-recorder.js"></script>
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <link rel="stylesheet" href="stylesheets/style.css">
</head>

<body>
    <div class="recorder" id="recorder">
        <script type="text/javascript">
            var expRec = Kaltura.ExpressRecorder.create('recorder', {
                "ks": "<%=ks%>",
                "serviceUrl": "<%=process.env.KALTURA_SERVICE_URL%>",
                "playerUrl": "<%=process.env.KALTURA_SERVICE_URL%>",
                "partnerId": "<%=process.env.KALTURA_PARTNER_ID %>",
                "uiConfId": "<%=process.env.KALTURA_REC_PLAYER_ID %>",
                "app": "Edit Test",
                "conversionProfileId": null,
                "browserNotSupportedText": "Your browser is not supported",
                "showUploadUI": true
            });

            //when upload of video is complete, redirect user to editor
            expRec.instance.addEventListener("mediaUploadEnded", function (event) {
                window.onbeforeunload = null;
                window.location = "edit?entryId=" + event.detail.entryId;
            });

        </script>
    </div>
</body>
</html>