-
Notifications
You must be signed in to change notification settings - Fork 3
feat: PE-1037: Add example for roCecInterface #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Added examples for sending CEC commands in brightscript and javascript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds example implementations demonstrating how to use the roCecInterface to send CEC (Consumer Electronics Control) commands on BrightSign devices. The examples show how to turn a display on and off using both BrightScript and JavaScript.
- Complete working examples for both BrightScript and JavaScript implementations
- Each example includes HTML files for display, logic files for CEC commands, autorun scripts for deployment, and comprehensive README documentation
- Both examples demonstrate sending "Image View On" and "Standby" commands with a 15-second delay
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/cec-interface/javascript/index.js | JavaScript implementation for sending CEC commands using the @brightsign/cec package |
| examples/cec-interface/javascript/index.html | HTML page for the JavaScript CEC example with styling |
| examples/cec-interface/javascript/autorun.brs | BrightScript autorun launcher for the JavaScript example with Node.js enabled |
| examples/cec-interface/javascript/README.md | Documentation explaining the JavaScript CEC example usage and setup |
| examples/cec-interface/brightscript/index.html | HTML page for the BrightScript CEC example with styling |
| examples/cec-interface/brightscript/autorun.brs | BrightScript implementation demonstrating CEC command sending using roCecInterface |
| examples/cec-interface/brightscript/README.md | Documentation explaining the BrightScript CEC example usage and setup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cec.SendRawMessage(bufferStandby) | ||
| print "Sent Standby: " + bufferStandby.ToHexString() | ||
|
|
||
| ' Optionally, uncomment the block below to repeat the cycle every 15 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What purpose does this serve? Just curious in what case this may be applicable for a user. I can't think of a situation when applying standby every 15 seconds would be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh it was most helpful to me while testing to make sure the display was turning on and off every single time, and not just a one-off thing in the beginning. It may help testing other CEC commands the same way.
📝 Description
🧪 Steps to Test
Follow steps in README files to deploy the application and test it.
✔️ Dev Complete Checklist