---
title: "Video (_Video class)"
canonical: "https://docs.cuesystem.com/space/CVCHELP/512327943/Video%20(_Video%20class)"
format: markdown
---
> Macro (toc)

---

This class represents a video. It includes information, transport, and drawing functions. Drawing functions allow changing video size and opacity on the fly. All changes are provided in operating memory only and the primary video source is not affected.

# GetWidth

This function returns the width of the video in pixels.

#### Syntax

```visualbasic
Function GetWidth() As Long
```

#### Return value

<u>[Long](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Long)</u> as the width of the video in pixels.

# GetHeight

This function returns the height of the video in pixels.

#### Syntax

```visualbasic
Function GetHeight() As Long
```

#### Return value

<u>[Long](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Long)</u> It is the height of the video in pixels.

# GetPlayingTime

This function returns information about current playback position and the total length of the video.

> ℹ️ Firmware 15.00 or later is required and panels in revision R22 or higher are required. The current version of appCUE does not have this feature implemented.

#### Syntax

```visualbasic
Function GetPlayingTime(ByRef current As Time, ByRef total As Time) As Boolean
```

#### Parameters

current

<u>[Time](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Text)</u> as the current playback position.

total

<u>[Time](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Text)</u> as the total length of the video. If it is a live stream of unknown total length total, the parameter total is set to value :0.

#### Return value

This function returns True if the video is playing and time values were available.

# IsPlaying

This function returns True if the video is playing otherwise returns False.

> ℹ️ Firmware 15.00 or later is required and panels in revision R22 or higher are required. The current version of appCUE does not have this feature implemented.

#### Syntax

```visualbasic
Function IsPlaying() As Boolean
```

#### Return value

<u>[Boolean](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean)</u> True if the video is playing, False otherwise.

# IsPaused

This function returns True if the video is paused otherwise returns False.

> ℹ️ Firmware 21.40 or later is required and panels in revision R22 or higher are required. The current version of appCUE does not have this feature implemented.

#### Syntax

```visualbasic
Function IsPaused() As Boolean
```

#### Return value

<u>[Boolean](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean)</u> True if the video is paused, False otherwise.

# OnPlaybackStop

This event is invoked by the system when video playback is stopped.

> ℹ️ Firmware 15.00 or later is required and panels in revision R22 or higher are required. The current version of appCUE does not have this feature implemented.

#### Syntax

```visualbasic
Event OnPlaybackStop As Process (reason As Long)
```

#### Parameters

reason

<u>[Long](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Text)</u> as the reason for stopping video playback.

Values of reasons and their explanation:

1 – playback was stopped because of command Video.Stop was called

2 – playback was stopped because the end of the file was reached

3 – playback was stopped because some error in the source stream occurred

# Play

This function starts video playback. Function **DrawVideo has to be used in the OnDraw** function of the graphic object the video is drawn to.

#### Syntax

```visualbasic
Function Play(videoURL As Text) As Boolean
```

#### Parameters

videoURL

<u>[Text](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Text)</u> as the URL of the video source. It can be a 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) |

#### Return value

<u>[Boolean](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean)</u> True on success or False if an error occurs.

The function GetLastError returns the error number that occurred while executing the command. The errors that can happen: <u>[108](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/510525445/Command+errors#108)</u>, <u>[146](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/510525445/Command+errors#146)</u>, <u>[147](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/510525445/Command+errors#147)</u>.

# Stop

The function stops video playback.

#### Syntax

```visualbasic
Function Stop()
```

# Pause

The function pauses video playback, it does nothing if the video is not playing.

> ℹ️ Firmware 21.40 or later is required and panels in revision R22 or higher are required. The current version of appCUE does not have this feature implemented.

#### Syntax

```visualbasic
Function Pause()
```

# Resume

The function resumes video playback, it does nothing if the video is not paused.

> ℹ️ Firmware 21.40 or later is required and panels in revision R22 or higher are required. The current version of appCUE does not have this feature implemented.

#### Syntax

```visualbasic
Function Resume()
```