Player APIs (BrightScript & Ja...
...
Object Reference
Presentation and Widget Object...

roVideoInput

4min
this object allows playback of hdmi ® input or video provided by a video capture dongle note that the ifvideoinput methods do not apply to hdmi input, which can be achieved by passing an unmodified rovideoinput instance to the rovideoplayer playfile() method (see below for examples) the javascript equivalent is mediadevices getusermedia() object creation rovideoinput is created with no parameters createobject("rovideoinput") ifvideoinput getstandards() as roarray getinputs() as roarray these return an array of strings describing the various inputs and video standards that the video capture device supports the following are the possible standards that can be returned pal d/k, pal g, pal h, pal i, pal d, pal d1, pal k, pal m, pal n, pal nc, pal 60, secam b/g, ecam b, secam d, secam g, secam h, secam k, secam k1, secam l, secam lc, secam d/k, ntsc m, ntsc mj, ntsc 443, ntsc mk, pal b and pal b1 inputs returned are s video and composite setstandard(standard as string) as boolean getcurrentstandard() as string setinput(input as string) as boolean getcurrentinput() as string use the above to get and set the input and video standard getcontrols() as roarray returns the possible controls on the input these include "brightness," "contrast," "saturation," "hue," and others setcontrolvalue(control name as string, value as integer) as boolean sets the value of the specified control getcurrentcontrolvalue(control name as string) as roassociativearray returns an associative array with 3 members "value," "minimum," and "maximum " "value" is the current value, and the possible range is specified by "minimum" and "maximum " getformats() as object setformat(a as string, b as integer, c as integer) as boolean getcurrentformat() as string example this script uses the hdmi input as the video source to create a full screen display v = createobject("rovideoplayer") i = createobject("rovideoinput") p = createobject("romessageport") vm = createobject("rovideomode") vm setmode("1920x1080x60p") r = createobject("rorectangle", 0, 0, 1920, 1080) v setrectangle(r) v playfile(i) this script uses the video capture dongle as the video source to create a full screen display v=createobject("rovideoplayer") i=createobject("rovideoinput") p=createobject("romessageport") vm=createobject("rovideomode") vm setmode("1280x720x60p") r = createobject("rorectangle", 0, 0, 1280, 720) v setrectangle(r) i setinput("s video") i setstandard("ntsc m") v playfile(i)