GOES-19 Satellite Viewer
O satelite GOES-19 captura imagens full-disk do hemisferio ocidental a cada 10 minutos. A Imagery API serve timelapses em MP4 prontos para uso — 24h, 3 dias e 7 dias. Neste tutorial, montamos um player com seletor de periodo.
The GOES-19 satellite captures full-disk images of the Western Hemisphere every 10 minutes. The Imagery API serves ready-to-use MP4 timelapses — 24h, 3 days, and 7 days. In this tutorial, we build a player with a period selector.
| Rota / Route | Conteudo / Content | CDN TTL |
|---|---|---|
/goes19/latest | Timelapse das ultimas 24 horas / Last 24h timelapse | 10 min |
/goes19/3days | Timelapse de 3 dias / 3-day timelapse | 30 min |
/goes19/week | Timelapse de 7 dias / 7-day timelapse | 1 hora / 1 hour |
Todos retornam video/mp4 e exigem autenticacao via ?key=.
const API_KEY = 'YOUR_API_KEY';
const BASE = 'https://imagery.api.insyde.one';
// Periods: 'latest' (24h), '3days', 'week'
function getSatelliteUrl(period = 'latest') {
return `${BASE}/goes19/${period}?key=${API_KEY}`;
}
O video pode ser usado diretamente em um elemento <video> com autoplay e loop:
<video id="sat" autoplay loop muted playsinline>
<source src="https://imagery.api.insyde.one/goes19/latest?key=YOUR_KEY"
type="video/mp4">
</video>
muted e playsinline para autoplay funcionar no mobile. O atributo loop cria um timelapse contínuo.
muted and playsinline for autoplay to work on mobile. The loop attribute creates a continuous timelapse.
function switchPeriod(period) {
const video = document.getElementById('sat');
video.src = getSatelliteUrl(period);
video.load();
video.play();
}
// Wire up buttons
document.querySelectorAll('[data-period]').forEach(btn => {
btn.addEventListener('click', () => switchPeriod(btn.dataset.period));
});
A resposta e um stream MP4 binario. Os headers relevantes:
HTTP/2 200
Content-Type: video/mp4
Content-Length: 11515838
Cache-Control: public, max-age=60, s-maxage=600
Access-Control-Allow-Origin: *
Os videos sao gerados automaticamente pelo servico goes/ e enviados ao S3. O CDN cacheia por 10min (latest), 30min (3days) ou 1h (week). O browser cacheia por 60s. Para forcar uma nova versao, espere o TTL expirar — nao e necessario invalidar cache manualmente.
Videos are automatically generated by the goes/ service and uploaded to S3. CDN caches for 10min (latest), 30min (3days) or 1h (week). Browser caches for 60s. To get a fresh version, just wait for the TTL to expire — no manual cache invalidation needed.