Class: VideoSource

Source#VideoSource(renderer, options)

new VideoSource(renderer, options)

The videosource allows for playback of video files in the Mixer project
VideoSource Example on codepen:
codepen

The videosource allows for playback of video files in the Mixer project

Parameters:
Name Type Description
renderer GlRenderer

GlRenderer object

options Object

JSON Object

Implements:
Source:
Example
let myVideoSource = new VideoSource( renderer, { src: 'myfile.mp4' } );

Members

video

exposes the HTMLMediaElement Video for listeners and control

Source:

Methods

currentTime(time)

skip to time (in seconds) or gets currentTime in seconds

Parameters:
Name Type Description
time float

time in seconds

Source:

duration()

give the duration of the video in seconds (cannot be changed)

Source:

pause()

pauses the video

Source:

paused()

returns true then the video is paused. False otherwise

Source:

play()

start the current video

Source:

src(Videofile)

gets or sets source @file for the videosource
file has to be compatible with HTMLMediaElement Video ie. webm, mp4 etc.
We recommend mp4

Parameters:
Name Type Description
Videofile file

full path to file

Source: