VideoPanorama

VideoPanorama

Video Panorama

Constructor

new VideoPanorama(src, optionsopt, radiusopt)

Source:
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:

Dispose video panorama

getVideoElement() → {HTMLElement}

Source:

Returns the video element

Returns:
Type
HTMLElement

isVideoMuted() → {boolean}

Source:

Check if video is muted

Returns:
  • is video muted or not
Type
boolean

isVideoPaused() → {boolean}

Source:

Check if video is paused

Returns:
  • is video paused or not
Type
boolean

load()

Source:

Load video panorama

Fires:

muteVideo()

Source:

Mute video

pauseVideo()

Source:

Pause video

Fires:

playVideo()

Source:

Play video

Fires:

reset()

Source:

Reset

resetVideo()

Source:

Reset video at stating point

resumeVideoProgress()

Source:

Resume video

setVideoCurrentTime(event)

Source:

Set video currentTime

Parameters:
Name Type Description
event object

Event contains percentage. Range from 0.0 to 1.0

setVideoTexture(video)

Source:

Set video texture

Parameters:
Name Type Description
video HTMLVideoElement

The html5 video element

Fires:

toggleVideo()

Source:

Toggle video to play or pause

unmuteVideo()

Source:

Unmute video

Events

pause

Source:

Pause event

Type:
  • object

play

Source:

Play event

Type:
  • object

play-error

Source:

Play event

Type:
  • object