# VideoPanorama

Video Panorama

## Constructor

#### new VideoPanorama(src, optionsopt, radiusopt)

Source:
  - panorama/VideoPanorama.js, line 17

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`src` | string |  |  | Equirectangular video url
`options` | object | <optional> |  | Option for video settings ###### Properties
Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`videoElement` | HTMLElement | <optional> |  | HTML5 video element contains the video
`loop` | boolean | <optional> | `true` | Specify if the video should loop in the end
`muted` | boolean | <optional> | `true` | Mute the video or not. Need to be true in order to autoplay on some browsers
`autoplay` | boolean | <optional> | `false` | Specify if the video should auto play
`playsinline` | boolean | <optional> | `true` | Specify if video should play inline for iOS. If you want it to auto play inline, set both autoplay and muted options to true
`crossOrigin` | string | <optional> | `"anonymous"` | Sets the cross-origin attribute for the video, which allows for cross-origin videos in some browsers (Firefox, Chrome). Set to either "anonymous" or "use-credentials".
`radius` | number | <optional> | `5000` | The minimum radius for this panoram

### Methods

#### dispose()

Source:
  - panorama/VideoPanorama.js, line 478

Dispose video panorama

#### getVideoElement() → {HTMLElement}

Source:
  - panorama/VideoPanorama.js, line 467

Returns the video element

##### Returns:

Type
  HTMLElement

#### isVideoMuted() → {boolean}

Source:
  - panorama/VideoPanorama.js, line 417

Check if video is muted

##### Returns:

- is video muted or not

Type
  boolean

#### isVideoPaused() → {boolean}

Source:
  - panorama/VideoPanorama.js, line 242

Check if video is paused

##### Returns:

- is video paused or not

Type
  boolean

#### load()

Source:
  - panorama/VideoPanorama.js, line 69

Load video panorama

##### Fires:

- Panorama#event:panolens-viewer-handler

#### muteVideo()

Source:
  - panorama/VideoPanorama.js, line 428

Mute video

#### pauseVideo()

Source:
  - panorama/VideoPanorama.js, line 335

Pause video

##### Fires:

- VideoPanorama#event:pause

#### playVideo()

Source:
  - panorama/VideoPanorama.js, line 290

Play video

##### Fires:

- VideoPanorama#event:play
- VideoPanorama#event:play-error

#### reset()

Source:
  - panorama/VideoPanorama.js, line 228

Reset

#### resetVideo()

Source:
  - panorama/VideoPanorama.js, line 399

Reset video at stating point

#### resumeVideoProgress()

Source:
  - panorama/VideoPanorama.js, line 360

Resume video

#### setVideoCurrentTime(event)

Source:
  - panorama/VideoPanorama.js, line 269

Set video currentTime

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | object | Event contains percentage. Range from 0.0 to 1.0

#### setVideoTexture(video)

Source:
  - panorama/VideoPanorama.js, line 210

Set video texture

##### Parameters:

Name | Type | Description
--- | --- | ---
`video` | HTMLVideoElement | The html5 video element

##### Fires:

- Panorama#event:panolens-viewer-handler

#### toggleVideo()

Source:
  - panorama/VideoPanorama.js, line 253

Toggle video to play or pause

#### unmuteVideo()

Source:
  - panorama/VideoPanorama.js, line 447

Unmute video

### Events

#### pause

Source:
  - panorama/VideoPanorama.js, line 345

Pause event

##### Type:

- object

#### play

Source:
  - panorama/VideoPanorama.js, line 297

Play event

##### Type:

- object

#### play-error

Source:
  - panorama/VideoPanorama.js, line 311

Play event

##### Type:

- object