Skip to main content

BrightScript code example roVideoPlayer

Updated 1 min readMarkdown
Part of seriesBrightScript

This example shows how to play a video loop and send out UDP message at the end of the video.


' This sample code loops a video and send out a UDP message at the end of the video.
' Created by BrightScripters

' Usage
' Place this script at the root of a blank microSD card.
' Typically this file would be renamed to autorun.brs so it starts automatically.
' Place a video file at the root of the microSD card. The script will look for file name video1.mp4.
' Every time the video file reaches its end, a UDP message is sent out and the video restarts.
' Make adjustments to the variables bellow.

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Variables
videoFileName$ = "video1.mp4"
udpMessage$ = "my_udp_message"
udpPort% = 5000
udpDestinationIp$ = "255.255.255.255"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''

u = createObject("roDatagramSender")
u.setDestination( udpDestinationIp$, udpPort% )

v = createObject("roVideoPlayer")

Find the rest of this code at
https://buymeacoffee.com/brightscripters/brightscript-code-example-rovideoplayer

No comments yet. Be the first to comment.

BrightScript

Part 15 of 19

BrightAuthor plugin development with BrightScript, the scripting programming language for the BrightSign player.

Up nextBrightSign User Agent StringHow to change the User Agent String on the BrightSign player’s browser.