MRVideoEntity
MRMediaEntity
MRVideoEntity ⇐ Base html video represented in 3D space. mr-video
Kind: global class
Extends: MRMediaEntity
- MRVideoEntity ⇐
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.
number
mrVideoEntity.mediaWidth() ⇒ Calculates the width of the video based on the video tag itself
Kind: instance method of MRVideoEntity
Returns: number
- - the resolved width
number
mrVideoEntity.mediaHeight() ⇒ 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