Video server and embed #44

Merged
quoije merged 1 commits from cursor/video-server-and-embed-7ca8 into 2026-video.backend 2025-12-22 00:13:52 -05:00
quoije commented 2025-12-22 00:12:19 -05:00 (Migrated from github.com)

Add server-side video streaming with HTTP Range support and an authentication cookie mechanism.

The <video> HTML element cannot send Authorization headers, which makes it difficult to stream authenticated content directly from the backend. This PR introduces a dedicated /api/video endpoint that streams files with HTTP Range support (for seeking) and uses a session cookie (video_auth) for authentication. player.html now calls /api/video/session once with the JWT to set this cookie, allowing subsequent <video> requests to /api/video/:movieId to be authenticated automatically.


Open in Cursor Open in Web

Add server-side video streaming with HTTP Range support and an authentication cookie mechanism. The `<video>` HTML element cannot send `Authorization` headers, which makes it difficult to stream authenticated content directly from the backend. This PR introduces a dedicated `/api/video` endpoint that streams files with HTTP Range support (for seeking) and uses a session cookie (`video_auth`) for authentication. `player.html` now calls `/api/video/session` once with the JWT to set this cookie, allowing subsequent `<video>` requests to `/api/video/:movieId` to be authenticated automatically. --- <a href="https://cursor.com/background-agent?bcId=bc-9dd54d74-4906-4e11-81dd-7745cefebc2f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-9dd54d74-4906-4e11-81dd-7745cefebc2f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a>
cursor[bot] commented 2025-12-22 00:12:20 -05:00 (Migrated from github.com)

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Cursor Agent can help with this pull request. Just `@cursor` in comments and I'll start working on changes in this branch. <sub>[Learn more](https://cursor.com/docs/background-agent/web-and-mobile) about Cursor Agents</sub>
Sign in to join this conversation.