Add large-file-download example OS-20908#123
Merged
Merged
Conversation
Demonstrates downloading large files (multi-GB) to SD card on memory-constrained BrightSign players using Node.js streams with TCP-level backpressure via roHtmlWidget. Avoids OOM by never buffering more than ~48 KB regardless of file size.
74e79ce to
ad8c0fc
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new cookbook example demonstrating how to download multi‑GB files to SD storage on memory‑constrained BrightSign players using Node.js streaming in an roHtmlWidget, with UI progress updates that remain responsive.
Changes:
- Adds a new
large-file-downloadexample (HTML app + BrightScript autorun) that streams an HTTP(S) response to SD withstream.pipeline()backpressure. - Documents setup/configuration and adds the example to the main examples index.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| examples/README.md | Adds the new example to the catalog of available examples. |
| examples/large-file-download/README.md | Provides background, rationale, and usage instructions for the download approach. |
| examples/large-file-download/index.html | Implements the streaming download + progress UI using Node.js http/https + pipeline. |
| examples/large-file-download/autorun.brs | Boots an roHtmlWidget configured to run the HTML/Node example on the player. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Replace internal hostname with empty placeholder URL - Fix buffer size comment (48 KB not 64 KB) and align with README - Resolve relative redirect Location headers, add redirect limit - Use consistent units in progress display (auto-switch MB/GB) - Use roVideoMode for display resolution instead of hardcoded 1080p - Use file:///sd:/index.html to match other examples - Remove unnecessary websecurity: False
t-bashir-bs
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Demonstrates downloading large files (multi-GB) to SD card on memory-constrained BrightSign players using Node.js streams with TCP-level backpressure via roHtmlWidget. Avoids OOM by never buffering more than ~48 KB regardless of file size.
Issue: Url to Github Issue
📋 List of Changes
Added a large-file-download folder with sample code within.
🧪 Steps to Test
Edit the constants at the top of the
<script>section inindex.html:VIDEO_URL: The URL of the file to downloadOUTPUT_FILE: The destination path on the SD card (e.g./storage/sd/largevideo.mp4)autorun.brsandindex.htmlfiles to the root of the SD card.Notes to the Reviewer
📸 Screenshots
✔️ Dev Complete Checklist