Add ONVIF client and server support

This commit is contained in:
Alexey Khit
2023-04-29 13:58:10 +03:00
parent 8dbaa4ba93
commit 1e14dc9ab2
8 changed files with 746 additions and 0 deletions
+25
View File
@@ -182,6 +182,31 @@
</script>
<button id="onvif">ONVIF</button>
<div class="module">
<form id="onvif-form" style="padding: 10px">
<input type="text" name="src" placeholder="onvif://user:pass@192.168.1.123:80" size="50">
<input type="submit" value="test">
</form>
<table id="onvif-table"></table>
</div>
<script>
document.getElementById('onvif').addEventListener('click', async ev => {
ev.target.nextElementSibling.style.display = 'block'
await getStreams('api/onvif', 'onvif-table')
})
document.getElementById('onvif-form').addEventListener('submit', async ev => {
ev.preventDefault()
const url = new URL('api/onvif', location.href)
url.searchParams.set('src', ev.target.elements['src'].value)
await getStreams(url.toString(), 'onvif-table')
})
</script>
<button id="roborock">Roborock</button>
<div class="module">
<form id="roborock-form" style="margin-bottom: 10px">