flyingfox-mjpeg-server

Stream MJPEG frames over HTTP with FlyingFox in Swift.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/co-labs-co/context-harness-skills --skill flyingfox-mjpeg-server
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flyingfox-mjpeg-server
Source: https://github.com/co-labs-co/context-harness-skills/tree/main/skill/flyingfox-mjpeg-server
Command: npx skills add https://github.com/co-labs-co/context-harness-skills --skill flyingfox-mjpeg-server

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streaming MJPEG frames over HTTP in a cross-browser compatible way, including Tesla's browser, using a Swift-based server with frame polling instead of multipart streaming. This approach reduces compatibility headaches and simplifies client support while enabling PIN-based access control and proper caching behavior.

Core Features & Use Cases

  • Actor-based HTTP server architecture in Swift using FlyingFox
  • Frame-by-frame polling endpoint to deliver JPEG frames for broad browser support
  • Optional HTTP Basic Auth for PIN protection
  • Proper cache headers to ensure live streaming without client-side caching
  • Use Case: Stream live camera frames to web clients and embedded devices with low capability

Quick Start

Start the server and verify that the /frame endpoint streams JPEG frames to clients.

Frequently Asked Questions about flyingfox-mjpeg-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stream MJPEG frames over HTTP in Swift without multipart compatibility issues?

To stream MJPEG frames in Swift, use FlyingFox to set up an actor-based HTTP server with a dedicated frame endpoint. Clients poll the endpoint to fetch JPEG frames sequentially, ensuring broad browser compatibility without relying on multipart streaming.

Does MJPEG frame polling work with Tesla browsers and other low-capability embedded devices?

Yes, MJPEG frame polling works with Tesla browsers and low-capability embedded devices. Fetching individual JPEG frames via standard HTTP polling avoids complex client processing requirements, ensuring broad cross-browser compatibility.

How can I add PIN-based access control to a Swift HTTP server?

Add PIN-based access control to a Swift HTTP server by applying optional HTTP Basic Auth. The server architecture intercepts incoming requests and validates the credentials before authorizing access to the frame endpoint.

Why are my live MJPEG frames caching on the client side?

Live MJPEG frames cache on the client when HTTP responses lack proper cache headers. Configuring robust cache headers on the frame endpoint instructs the browser to fetch fresh frames continuously, preventing stale image display.

What is the best way to build a scalable HTTP server for live camera streaming in Swift?

Build a scalable HTTP server for live camera streaming in Swift using an actor-driven design with FlyingFox. This modular architecture safely manages concurrent connections, frame polling, and authentication efficiently.