Skip to content

Add large-file-download example OS-20908#123

Merged
caneraltinbasak merged 2 commits into
mainfrom
cal/OS-20908
Apr 10, 2026
Merged

Add large-file-download example OS-20908#123
caneraltinbasak merged 2 commits into
mainfrom
cal/OS-20908

Conversation

@caneraltinbasak
Copy link
Copy Markdown
Contributor

📝 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.

  • Please provide a concise list of the main changes.

🧪 Steps to Test

Edit the constants at the top of the <script> section in index.html:

  • VIDEO_URL: The URL of the file to download
  • OUTPUT_FILE: The destination path on the SD card (e.g. /storage/sd/largevideo.mp4)
  1. Copy the autorun.brs and index.html files to the root of the SD card.
  2. Insert the SD card into the player.
  3. Reboot the player.
  4. Observe the screen with progress bar for the download. Check frame rate.

Notes to the Reviewer

📸 Screenshots

✔️ Dev Complete Checklist

  • PR template filled out
  • Change is tested by submitter
  • PR follows all linting and coding standards
  • Github Issue exists (if applicable)
  • Team member has been assigned
  • At least one commit message is in Conventional Commit format

Copilot AI review requested due to automatic review settings April 10, 2026 10:16
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.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-download example (HTML app + BrightScript autorun) that streams an HTTP(S) response to SD with stream.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.

Comment thread examples/large-file-download/index.html Outdated
Comment thread examples/large-file-download/index.html Outdated
Comment thread examples/large-file-download/index.html
Comment thread examples/large-file-download/index.html
Comment thread examples/large-file-download/autorun.brs Outdated
Comment thread examples/large-file-download/autorun.brs Outdated
Comment thread examples/large-file-download/autorun.brs Outdated
Comment thread examples/large-file-download/README.md Outdated
- 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
@caneraltinbasak caneraltinbasak merged commit 637f0b1 into main Apr 10, 2026
2 checks passed
@caneraltinbasak caneraltinbasak deleted the cal/OS-20908 branch April 10, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants