// Check without contacting a server. Replace the fictional endpoint privately.
// A finite HTTP snapshot uses no redirects; authenticated snapshots require HTTPS.
import aner.video

let source = video.snapshot_url("https://camera.example.invalid/snapshot.jpg",
    timeout_ms: 3000)
let frame = video.frame_slot()
let status = source.read_into(frame, timeout_ms: 4000)
if status == "ready" {
    print(frame.width())
    print(frame.height())
} else {
    print(status)
    print(source.error())
}
source.close()

// For continuous media, configure an explicit RTSP or HTTP(S) media URL:
// let live = video.stream("rtsp://camera.example.invalid/live")
// For an authenticated single image, add an opaque stored SecretRef:
// import aner.secrets
// let image = video.snapshot_url("https://camera.example.invalid/snapshot.jpg",
//     authorization: secrets.stored("camera-authorization"))
