Kind: global class
- HoloVideoObject
- new HoloVideoObject()
- static
- .States :
enum
- .ErrorStates :
enum
- .StreamMode :
enum
- .VideoStates :
enum
- .States :
- inner
- ~errorCallback :
function
- ~errorCallback :
HoloVideoObject is the internal web player implementation that interacts directly with WebGL (independent of three.js). HoloVideoObjectThreeJS defines the public interface for three.js development.
HoloVideoObject States
Kind: static enum of HoloVideoObject
Read only: true
Properties
Name | Type | Default | Description |
---|---|---|---|
Closed | number |
-1 |
A previously loaded capture has been unloaded. A new capture may be opened by calling open |
Empty | number |
0 |
Initial state of all HoloVideoObjectThreeJS instances |
Opening | number |
1 |
A capture is in the process of opening and buffering data for playback. |
Opened | number |
2 |
The capture loaded and ready for play to be called |
Playing | number |
3 |
Capture playback is in progress |
Paused | number |
4 |
Playback is paused and may be resumed by calling play |
HoloVideoObject ErrorStates
Kind: static enum of HoloVideoObject
Read only: true
Properties
Name | Type | Default |
---|---|---|
NetworkError | number |
-1 |
VideoError | number |
-2 |
PlaybackPrevented | number |
-3 |
HoloVideoObject StreamMode - set as an option to HoloVideoObject.open() to force the StreamMode for the video element
Kind: static enum of HoloVideoObject
Properties
Name | Type | Default |
---|---|---|
Automatic | number |
0 |
MP4 | number |
1 |
HLS | number |
2 |
Dash | number |
3 |
HoloVideoObject VideoStates
Kind: static enum of HoloVideoObject
Read only: true
Properties
Name | Type | Default |
---|---|---|
Undefined | number |
0 |
CanPlay | number |
1 |
CanPlayThrough | number |
2 |
Waiting | number |
3 |
Suspended | number |
4 |
Stalled | number |
5 |
Playing | number |
6 |
Kind: inner typedef of HoloVideoObject
Param | Type | Description |
---|---|---|
error | ErrorStates |
type - Value from HoloVideoObject#ErrorStates enum indicating the type of error encountered. |
additional | Object |
error information (see description of specific HoloVideoObject#ErrorStates value for more information). |
Kind: global class
- HoloVideoObjectThreeJS
- new HoloVideoObjectThreeJS(renderer, callback, options)
- instance
- inner
- ~openCallback :
function
- ~openCallback :
Creates a new HoloVideoObjectThreeJS instance
Param | Type | Description |
---|---|---|
renderer | THREE.WebGLRenderer |
WebGLRenderer that will be used to render the capture. |
callback | openCallback |
Callback invoked when initial loading is complete. |
options | Object |
Optional collection of options that permanently affect behavior of this HoloVideoObjectThreeJS instance. |
options.disableAsyncDecode | boolean |
Disables asynchronous video decoding path which may result in improved audio sync but incurs a performance penalty. This is the only decoding path available in WebGL1 environments. |
options.numAsyncFrames | boolean |
Controls how many asynchronous frames are buffered in WebGL2 async. decode path resulting in 'numAsyncFrames' - 1 frames of latency. The default value is 3. |
function |
Callback invoked when currentFrame is updated | |
errorCallback |
Callback invoked when unexpected error condition is encountered, see HoloVideoObject#ErrorStates for list of possible conditions. |
holoVideoObjectThreeJS.state : States
The current state of this HoloVideoObjectThreeJS instance.
Kind: instance property of HoloVideoObjectThreeJS
Opens and capture and begins buffering data for playback
Kind: instance method of HoloVideoObjectThreeJS
Param | Type | Description |
---|---|---|
url | string |
Capture URL, e.g. "http://127.0.0.1/mycapture.hcap" |
options | Object |
Optional collection of options related to capture loading and playback. |
options.audioEnabled | boolean |
Specifies whether audio playback is enabled initially |
options.autoplay | boolean |
Specifies whether capture should automatically begin playback when loaded. If enabled will disable audio as many browsers do not allow automatic audio playback without user input. |
options.streamMode | StreamMode |
Force the streamMode for the video object. Default is Automatic. |
options.minBuffers | number |
Minimum number of .bin segments that must be buffered before capture is considered preloaded. Default value is 2. |
options.maxBuffers | number |
Maximum number of .bin segments that can be buffered and kept in memory at one time. |
options.keepAllMeshesInMemory | boolean |
Overrides maxBuffers setting and keeps all mesh in memory to prevent further loading. |
options.startTime | boolean |
Time in seconds where playback should begin from. Defaults to 0 if not specified. |
Updates capture mesh and texture to latest playback frame. This should be called periodically from the application's animate/update loop.
Kind: instance method of HoloVideoObjectThreeJS
Rewinds capture back to the first frame and pauses.
Kind: instance method of HoloVideoObjectThreeJS
Seeks playback position to the specified time.
Kind: instance method of HoloVideoObjectThreeJS
Param | Type | Description |
---|---|---|
seekTime | number |
Time (in seconds) to seek to. |
displayImmediately | boolean |
Specifies whether to update to and display target frame immediately. |
Starts capture playback if sufficient data has been buffered, or resumes paused playback.
Kind: instance method of HoloVideoObjectThreeJS
Stops playback and releases capture-specific resources. A new capture can then be loaded by calling open
Kind: instance method of HoloVideoObjectThreeJS
Pauses playback.
Kind: instance method of HoloVideoObjectThreeJS
Sets verbosity level of log output
Kind: instance method of HoloVideoObjectThreeJS
Param | Type | Description |
---|---|---|
level | number |
0 = errors, 1 = warnings, 2 = info, 3 = debug. Default setting is = 0. |
Enables or disables audio playback. May be called at any time.
Kind: instance method of HoloVideoObjectThreeJS
Param | Type | Description |
---|---|---|
enabled | boolean |
Specifies whether audio should be enabled or disabled. |
Returns whether audio playback is currently enabled.
Kind: instance method of HoloVideoObjectThreeJS
Sets audio volume.
Kind: instance method of HoloVideoObjectThreeJS
Param | Type | Description |
---|---|---|
volume | number |
Value between 0 and 1 specifying volume level. |
Specifies whether capture should loop automatically. May be called at any time.
Kind: instance method of HoloVideoObjectThreeJS
Param | Type |
---|---|
loop | boolean |
Kind: inner typedef of HoloVideoObjectThreeJS
Param | Type | Description |
---|---|---|
mesh | THREE.Mesh |
THREE.Mesh object that will be populated with capture geometry during playback. |