---
title: "VideoBox (Video Objects)"
canonical: "https://docs.cuesystem.com/space/CVCGC/440041478/VideoBox%20(Video%20Objects)"
format: markdown
---
# Description

This object allows to playback streaming video. Source of the video is defined as URL and it can be network stream address or file path.

Background fill color defined by property is displayed if video doesn’t play. An outline line marking the outer contours of an object can be used.

If enabled by property, it allows switching between normal and fullscreen mode by touching the object.

![image](media://1c698e29-eff8-46ae-a4e4-39229ee1b30c)

# Properties

See [Common section](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/490176564). In addition, this object uses the following properties.

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Behavior |
| Events | Boolean | True  
False | False | If True event OnTouch is enabled.  
If False event OnTouch is disabled. |
| Play | Boolean | True   
False | True | If True it starts playback of the stream. If False it stops the playback. |
| URL | Text | Any | Empty text | It is URL of video source. It can be network stream address or file path. |
| Appearance |
| ConstrainProportion | Boolean | True False | False | If True the object preserves the original proportions of video source. |
| FillColor | Long | _COLOR_BLACK |  | Solid color of object |
| Font | AddressOf _Font |  | fntDefault16 | It defines font for URL text.  
fntDefault16 is Verdana 16 pixels height. |
| FontColor | Long | Any | _COLOR_WHITE | Color of URL text |
| Fullscreen | Boolean | True   
False | False | If True the video box dimensions are automatically resized to fit the screen. |
| FullscreenControl | Boolean | True   
False | False | True enables switching between normal and fullscreen mode by touching the object. |
| LineWeight | Long | Any non-negative | 2 | It defines outline lineweight in pixels. |
| OutlineColor | Long | Any | &HFF484848 | It defines solid color of outline. |
| ShowFullscreenMessage | Boolean | True   
False | True | While switching from normal to fullscreen mode and this property is True, it displays the message how to return back to normal mode. |
| ShowURL | Boolean | True  
False | True | Specifies whether the URL is shown. |

# Functions

See [Common section](https://cue.atlassian.net/wiki/spaces/CVCGC/pages/490176564). In addition, this object uses the following functions.

## SetConstrainProportion

This function sets ConstrainProportion to newconstrainproportion value. Function returns always true.

#### Syntax 

```visualbasic
Function SetConstrainProportion(newconstrainproportion As Boolean) As Boolean
```

## GetConstrainProportion

This function returns current ConstrainProportion.

#### Syntax 

```visualbasic
Function GetConstrainProportion() As Boolean
```

## SetFillColor

This function sets FillColor of video box. See CVC / Commands / Graphics help for details, how to create long number representing required color. Function returns always true.

#### Syntax 

```visualbasic
Function SetFillColor(newfillcolor As Long) As Boolean
```

## GetFillColor

This function returns current FillColor of video box.

#### Syntax 

```visualbasic
Function GetFillColor() As Long
```

## SetFullscreen

This function sets Fullscreen to newfullscreen. Function returns always true.

#### Syntax 

```visualbasic
Function SetFullscreen(newfullscreen As Boolean) As Boolean
```

## GetFullscreen

This function returns current Fullscreen value.

#### Syntax 

```visualbasic
Function GetFullscreen() As Boolean
```

## SetFullscreenControl

This function sets FullscreenControl to newfullscreencontrol. Function returns always true.

#### Syntax 

```visualbasic
Function SetFullscreenControl(newfullscreencontrol As Boolean) As Boolean
```

## GetFullscreenControl

This function returns current FullscreenControl value.

#### Syntax 

```visualbasic
Function GetFullscreenControl() As Boolean
```

## SetLineWeight

This function sets outline LineWeight to newlineweight in pixels. Function returns true, if newlineweight >= 0, otherwise it returns false.

#### Syntax 

```visualbasic
Function SetLineWeight(newlineweight As Long) As Boolean
```

## GetLineWeight

This function returns current LineWeight of outline.

#### Syntax 

```visualbasic
Function GetLineWeight() As Long
```

## SetOutlineColor

This function sets OutlineColor to newoutlinecolor value. See CVC / Commands / Graphics help for details, how to create long number representing required color. Function returns always true.

#### Syntax 

```visualbasic
Function SetOutlineColor(newoutlinecolor As Long) As Boolean
```

## GetOutlineColor

This function returns current OutlineColor.

#### Syntax 

```visualbasic
Function GetOutlineColor() As Long
```

## SetPlay

This function starts (newplay = True) or stops (newplay = False) video playback. Function returns always True.

#### Syntax 

```visualbasic
Function SetPlay(newplay As Boolean) As Boolean
```

## GetPlay

This function returns current value of property Play.

#### Syntax 

```visualbasic
Function GetPlay() As Boolean
```

## SetShowFullscreenMessage

This function sets ShowFullscreenMessage to newshowfullscreenmessage. Function returns always true.

#### Syntax 

```visualbasic
Function SetShowFullscreenMessage(newshowfullscreenmessage As Boolean) As Boolean
```

## GetShowFullscreenMessage

This function returns current ShowFullscreenMessage value.

#### Syntax 

```visualbasic
Function GetShowFullscreenMessage() As Boolean
```

## SetShowURL

This function states whether URL is shown or not. Function returns always True.

#### Syntax 

```visualbasic
Function SetShowURL(newshowurl As Boolean) As Boolean
```

## GetShowURL

This function returns whether URL is visible or not.

#### Syntax 

```visualbasic
Function GetShowURL() As Boolean
```

## SetURL

This function sets new URL of video source to newurl value. It can be file or stream. Examples of URL

|  |  |
| --- | --- |
| - file://filestorage/CUENIUM2_800x450_h263p_3000.avi | (file stored in the unit) |
| - rtsp://169.254.0.99/live.sdp | (typical Vivotek IP camera or videoserver) |
| - rtsp://192.168.0.90:554/mpeg4/1/media.amp | (typical Axis videoserver) |

Function returns always True.

#### Syntax 

```visualbasic
Function SetURL(newurl As Text) As Booleanc
```

## GetURL

This function returns current URL of video source.

#### Syntax 

```visualbasic
Function GetURL() As AddressOf Text
```

# Events

#### OnTouch 

This event is generated when the object is touched and property Events is set to True.

#### Syntax 

```visualbasic
Event OnTouch As Process()
```