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:

  • OGG Theora without audio

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

Z.VideoTexture(...) Constructs a new Z.VideoTexture object.

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

mipmap( ) Gets the mipmapping mode of the texture.
mipmap(...) Sets the mipmapping mode of the texture.
position( ) Gets the position offset of the texture.
position(...) Sets the position offset of the texture.
rotation( ) Gets the rotation of the texture.
rotation(...) Sets the rotation of the texture.
scale( ) Gets the scale of the texture.
scale(...) Sets the scale of the texture.
size( ) Gets the size of the texture.
wrap( ) Gets the wrap mode of the texture.
wrap(...) Sets the wrap mode of the texture.

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.
zapcode branded_zapcode i