BrightScript Objects Reference#
This section provides reference documentation for BrightScript objects available on BrightSign players.
Object Categories#
| Object | Description |
|---|
roVideoPlayer | Video playback control |
roAudioPlayer | Audio playback control |
roImagePlayer | Image display |
roVideoMode | Display resolution and settings |
User Interface#
| Object | Description |
|---|
roHtmlWidget | HTML5 content display |
roTextWidget | Simple text display |
roRectangle | Screen region definition |
roImageWidget | Image display widget |
Networking#
| Object | Description |
|---|
roUrlTransfer | HTTP/HTTPS requests |
roNetworkConfiguration | Network interface configuration |
roStreamSocket | TCP socket connections |
roDatagramSocket | UDP communication |
File System#
| Object | Description |
|---|
roReadFile | File reading |
roCreateFile | File writing |
roSyncSpec | JSON/XML configuration parsing |
roStorageInfo | Storage device information |
Hardware#
| Object | Description |
|---|
roControlPort | GPIO control |
roSerialPort | Serial communication |
roI2C | I2C bus interface |
roTouchScreen | Touch input handling |
System#
| Object | Description |
|---|
roDeviceInfo | Device information |
roSystemTime | Time and timezone |
roRegistrySection | Persistent storage |
roMessagePort | Event handling |
Common Patterns#
Creating Objects#
' Basic object creation
player = CreateObject("roVideoPlayer")
' With parameters
serial = CreateObject("roSerialPort", 0, 9600)
' Validation
if type(player) <> "roVideoPlayer" then
print "Failed to create video player"
stop
end if
Event Handling#
Sub Main()
msgPort = CreateObject("roMessagePort")
player = CreateObject("roVideoPlayer")
player.SetPort(msgPort)
player.PlayFile("video.mp4")
while true
msg = wait(0, msgPort)
if type(msg) = "roVideoEvent" then
if msg.GetInt() = 8 then ' MediaEnded
print "Video finished"
end if
end if
end while
End Sub
Full Documentation#
For complete object documentation, see the BrightSign API Reference.