mirror of
https://github.com/flavioribeiro/donut.git
synced 2025-09-26 19:11:11 +08:00
66 lines
1.5 KiB
HTML
66 lines
1.5 KiB
HTML
<html>
|
|
|
|
<head>
|
|
<title>donut</title>
|
|
<script src="demo.js"></script>
|
|
<link rel="stylesheet" href="demo.css">
|
|
</link>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"
|
|
rel="stylesheet">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<fieldset>
|
|
<legend>Remote streaming</legend>
|
|
<p>
|
|
<label for="stream-url">URL: <span aria-label="required">*</span></label>
|
|
<input id="stream-url" type="text" name="stream-url" required value="srt://haivision_srt:40052" />
|
|
<label class="hint">rtmp://nginx_rtmp/live</label>
|
|
</p>
|
|
<p>
|
|
<label for="stream-id">ID: <span aria-label="required">*</span></label>
|
|
<input id="stream-id" type="text" name="stream-id" required value="stream-id" />
|
|
<label class="hint">app</label>
|
|
</p>
|
|
<p>
|
|
<button onclick="onConnect()"> Connect </button>
|
|
</p>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>Video</legend>
|
|
<div id="remoteVideos"></div>
|
|
</fieldset>
|
|
|
|
|
|
<fieldset>
|
|
<legend>Metadata</legend>
|
|
<div id="metadata"></div>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>Logs</legend>
|
|
<div id="log"></div>
|
|
</fieldset>
|
|
</body>
|
|
|
|
<script>
|
|
function docReady(fn) {
|
|
if (document.readyState === "complete" || document.readyState === "interactive") {
|
|
setTimeout(fn, 1);
|
|
} else {
|
|
document.addEventListener("DOMContentLoaded", fn);
|
|
}
|
|
}
|
|
|
|
docReady(function () {
|
|
window.onConnect = () => {
|
|
window.startSession();
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</html> |