import { h } from 'preact';
import { closestTo, format, parseISO } from 'date-fns';
import ActivityIndicator from '../components/ActivityIndicator';
import Heading from '../components/Heading';
import RecordingPlaylist from '../components/RecordingPlaylist';
import VideoPlayer from '../components/VideoPlayer';
import { FetchStatus, useApiHost, useRecording } from '../api';
export default function Recording({ camera, date, hour, seconds }) {
const apiHost = useApiHost();
const { data, status } = useRecording(camera);
if (status !== FetchStatus.LOADED) {
return
No Recordings Found
Make sure you have enabled the record role in your configuration for the {camera} camera.