MRVideoEntity

MRVideoEntity ⇐ MRMediaEntity

Base html video represented in 3D space. mr-video

Kind: global class
Extends: MRMediaEntity

mrVideoEntity.MRVideoEntity

Kind: instance class of MRVideoEntity

new exports.MRVideoEntity()

Constructs a base video entity using a UIPlane and other 3D elements as necessary.

mrVideoEntity.mediaWidth() ⇒ number

Calculates the width of the video based on the video tag itself

Kind: instance method of MRVideoEntity
Returns: number - - the resolved width

mrVideoEntity.mediaHeight() ⇒ number

Calculates the height of the video based on the video tag itself

Kind: instance method of MRVideoEntity
Returns: number - - the resolved height

mrVideoEntity.loadMediaTexture()

Loads the associated video into 3D based on its html properties.

Kind: instance method of MRVideoEntity

mrVideoEntity.connected()

(async) handles setting up this video and associated 3D geometry style (from css) once it is connected to run as an entity component.

Kind: instance method of MRVideoEntity

mrVideoEntity.srcObject(src)

Sets the srcObject of the video media (since it uses ‘srcObject’ instead of ‘src’ like other items).

Kind: instance method of MRVideoEntity

Param Type Description
src string the string to the new source object we want

mrVideoEntity.play()

Plays the video in the shadow root

Kind: instance method of MRVideoEntity

mrVideoEntity.pause()

Pauses the video in the shadow root

Kind: instance method of MRVideoEntity