Files
ProjectIOT/application/dashboard/templates/live.html

15 lines
387 B
HTML

{%extends 'base.html' %}
{% block content %}
<div class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
<img id="live_feed" src="{{url_for('dash.live_image')}}" alt="live_feed">
</div>
<script>
setInterval(() => {
const img = document.getElementById('live_feed');
img.src = `/dash/live_image?t=${Date.now()}`;
}, 1000); // every 1 second
</script>
{% endblock %}