# Class: video

## video

#### new video(id)

Creates a video object

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | string | The id of the dom element containing the video

Source:
  - video.js, line 12

### Methods

#### GetAvailHeight()

gets available height (6.14.06)

Source:
  - video.js, line 241

#### GetAvailWidth()

gets available width (6.14.06)

Source:
  - video.js, line 235

#### GetDirName()

Gets mode

Source:
  - video.js, line 334

#### GetFileInfo()

Returns self object in order to be compliant with the functions from file_info

Source:
  - video.js, line 65

#### GetFullName()

Gets full image name

Source:
  - video.js, line 349

#### GetImagePath()

Gets image path

Source:
  - video.js, line 344

#### GetImName()

Gets image name

Source:
  - video.js, line 339

#### GetImRatio()

Returns the ratio of the available width/height to the original width/height. For now, it is always 1

Source:
  - video.js, line 60

#### GetInterpolatedPoints(xinit, yinit, xend, yend, tinit, tend, tcurrent)

Computes a set of points representing a linearly interpolated polygon.

##### Parameters:

Name | Type | Description
--- | --- | ---
`xinit` | array | xcoordinates of the polygon at tinit
`yinit` | array | ycoordinates of the polygon at tinit
`xend` | array | xcoordinates of the polygon at tend
`yend` | array | ycoordinates of the polygon at tend
`tinit` | int | first ground truth frame number
`tend` | int | last ground truth frame number
`tcurrent` | int | frame that has to be interpolated

Source:
  - video.js, line 381

#### GetNewVideo()

Fetches a new video based on the URL string. Creates a div container to store the video

Source:
  - video.js, line 41

#### GetTemplatePath()

Gets template path

Source:
  - video.js, line 354

#### GetURLField()

String is assumed to have field=value form. Parses string to return the field.

Source:
  - video.js, line 361

#### GetURLValue()

String is assumed to have field=value form. Parses string to return the value.

Source:
  - video.js, line 368

#### IsFitImage()

Returns true if the image is zoomed to the original (fitted) resolution.

Source:
  - video.js, line 252

#### IsPointVisible()

Returns true if (x,y) is viewable.

Source:
  - video.js, line 257

#### ParseURL()

Parses url again, knowing that is a video. The function is almost a replica of that in file_info

Source:
  - video.js, line 270

#### ScaleFrame()

Tells the picture to take up the available space in the browser, if it needs it. 6.29.06

Source:
  - video.js, line 202

#### ScrollbarsOff()

Turn off image scrollbars if zoomed in.

Source:
  - video.js, line 118

#### ScrollbarsOn()

Turn on image scrollbars if zoomed in.

Source:
  - video.js, line 126

#### SetImageDimensions()

Sets the dimensions of the image based on browser setup. For now it sets 640x480

Source:
  - video.js, line 71

#### SetOrigImDims(im)

Retrieves and sets the original image's dimensions (width/height).

##### Parameters:

Name | Type | Description
--- | --- | ---
`im` | image |

Source:
  - video.js, line 228

#### SlideWindow(x, y) → {intarray}

If (x,y) is not in view, then scroll it into view. Return adjusted (x,y) point that takes into account the slide offset.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | int |
`y` | int |

Source:
  - video.js, line 106

##### Returns:

Type
  intarray

#### SubmitEditObject()

Submits an edited object, stored in select_anno

Source:
  - video.js, line 464

#### SubmitObject()

Submits an object for the first time. It is the equivalent of SubmitQuery for video

Source:
  - video.js, line 513

#### UpdateObjectPosition(anno)

Update the position of an annotation. Modifies the xml file information about a given annotation.

##### Parameters:

Name | Type | Description
--- | --- | ---
`anno` | annotation | annotation containing the info about the polygon

Source:
  - video.js, line 395

#### Zoom()

Not working now

Source:
  - video.js, line 133