{% for camera in cameras %}
{% set local_stream_url = get_rtsp_url(camera, 'local') %}
{% set remote_stream_url = camera[CameraTableIndex.REMOTE_STREAM_URL] if streaming_method == 'ffmpeg'
else get_rtsp_url(camera, 'remote') %}
{% set _, remote_port = tunnel_helper.parse_address(remote_stream_url) %}
{% set status = ffmpeg_helper.check_stream_status(remote_stream_url) if streaming_method == 'ffmpeg'
else tunnel_helper.check_tunnel_status(remote_port) if remote_stream_url else None %}
{% if camera[CameraTableIndex.REMOTE_STREAM_URL] !=
None %}
Link
{% else %}
Not Available
{% endif %}
{% if camera[CameraTableIndex.STREAM_STATUS] == 1
and status in ['running', 'sleeping', 'waking', 'idle'] %}
Running
{% elif camera[CameraTableIndex.STREAM_STATUS] == 1
and status not in ['running', 'sleeping', 'waking', 'idle'] %}
Exited
{% else %}
Not Running
{% endif %}
{% if camera[CameraTableIndex.STREAM_STATUS] == 1
and status in ['running', 'sleeping', 'waking', 'idle'] %}
{% else %}
{% endif %}
{% endfor %}
{% for camera in cameras %}
{% set local_stream_url = get_rtsp_url(camera, 'local') %}
{% set remote_stream_url = get_rtsp_url(camera, 'remote') %}
{% set _, remote_port = tunnel_helper.parse_address(remote_stream_url) %}
{% set status = ffmpeg_helper.check_stream_status(remote_stream_url) if streaming_method == 'ffmpeg'
else
tunnel_helper.check_tunnel_status(remote_port) if remote_stream_url else None %}
Loading...
{% if camera[CameraTableIndex.STREAM_STATUS] == 1
and status in ['running', 'sleeping', 'waking', 'idle'] %}
Running
{% elif camera[CameraTableIndex.STREAM_STATUS] == 1
and status not in ['running', 'sleeping', 'waking', 'idle'] %}
Exited
{% else %}
Not Running
{% endif %}