Z.VideoTexture
Inherits from Z.Texture
The Z.VideoTexture object represents an video file loaded for use as a texture on an object. For more information see the video article.
The following format is supported:
Both dimensions of the video file must be an even power-of-two number of pixels in size, for example 256px x 128px.
Mobile devices have significant hardware limitations that affect video playback as a texture. For this reason the following recommendations are made:
- Do not use video files above 256px by 256px is size
- Avoid playing more than one Z.VideoTexture at once
Example
var myvideo = Z.VideoTexture("snakes.ogv");
var myplane = Z.Object("plane.aro");
myplane.skin(myvideo);
myvideo.start();
Provided by Z.VideoTexture
Constructor
Events
finish |
Emitted when the video has finished playing. |
Functions
mask( ) |
Gets whether the VideoTexture is set to be a mask. |
mask(...) |
Sets whether the VideoTexture is to be a mask. |
pause( ) |
Pauses playback at the current seek position. |
restart( ) |
Restarts playback from the start of the video file. |
source( ) |
Gets the filename or URL of the video file. |
source(...) |
Sets the filename or URL of the video file. |
start( ) |
Continues playback from the current seek position. |
Inherited from Z.Texture
Enumerations
Channel |
A color channel of a texture. |
Mipmap |
The mipmapping mode for textures. |
Wrap |
The wrap mode for textures. |
Functions
Inherited from Z.Base
Functions
emit(...) |
Calls the handler functions attached to an event. |
hasTag(...) |
Returns true if this object has the specified tag. |
off(...) |
Removes a handler function from an event. |
on(...) |
Attaches a handler function to an event. |
one(...) |
Attaches a single-use handler function to an event. |
pushTag(...) |
Adds a tag to this object. |
removeTag(...) |
Removes a tag from this object. |
tags( ) |
Gets an array of the tags that this object belongs to. |
tags(...) |
Sets the array of the tags that this object belongs to. |