Client Scripting API - Movie

From Multiverse

Jump to: navigation, search

The Movie object is the representation of a movie that is loaded and playing. It responds to play, pause, stop, and volume commands.

For general information on playing video, see Displaying In-World Video and Web Pages.

Contents

Constructor

None. Use MovieCodec.LoadFile() to create an Movie instance.

Methods

CodecName

name = CodecName()

Returns

The string name of the codec used to create this movie.

Parameters

None.

Name

name = Name()

Returns

The string name of this movie, (the video file name).

Parameters

None.

Path

path = Path()

Returns

The full path, in Windows form if it's a file, or a URL if it's a stream.

Parameters

None.

Pause

isPaused = Pause()

Temporarily suspend playback on the current frame. Decoding and buffering continues to occur, but the display is frozen in position.

Returns

True if the movie paused, or False if it didn't due to an error.

Play

isStarted = Play()

Start the movie playing, continuing play until the end. May pause briefly to buffer.

Returns

True if the movie was able to start playing, or False if an error occurred.

ReplaceWorldObject

objectExists = ReplaceWorldObject(name)

Completely replace an entity in the scene, keeping its position, orientation, and scale, but replacing it with a movie width by movie height sized plane to play the movie on.

Returns

True if the object with the specified name exists in the scene. False otherwise.

Parameters

Parameter Datatype Default Value Description
name String None. The name of the world object to replace in the scene. Replaces the mesh, material, and texture of the object.

SetParameter

isSet = SetParameter(name, value)

Generic parameter setter, using strings as the transport. Each codec should determine which parameters make sense for the given video type and override the ValidateParameter() method to test whether or not the codec understands it.

Returns

True if the movie was able to set the parameter, False otherwise.

Parameters

Parameter Datatype Default Value Description
name String None. Name of the parameter to set.
value String None. Value of the parameter to set.

Stop

isStopped = Stop()

Halt playback of this movie and reset the position to the start of the movie. Buffering and decoding will also cease.

Returns

True if the movie stopped, or false if it didn't due to an error.

Texture

Texture()

Gets the Axiom texture object we're displaying the movie to.

Returns

The Texture object this movie is playing on, which is registered with the Axiom TextureManager. What kind of object is this in terms of the Client scripting API?

Parameters

None.

TextureName

name = TextureName()

A unique identifier for this movie. This number should be generated by a call to MovieManager.GetNewIdentifier().

Returns

The movie's unique string ID.

Parameters

None.

TextureSize

TextureSize()

The texture size is likely to be different from the movie size, because it will probably be rounded up to the next power of two.

Returns

The width and height in pixels of the texture that this movie targets. What kind of object or value is this? The Client API doesn't have a Size object.

Parameters

None.

Unload

Unload()

Immediately free any of the resources we hold.

Returns

None

VideoSize

VideoSize()

Description

Returns

The movie's width and height in pixels in a Size object. What kind of object or value is this? The Client API doesn't have a Size object.

Parameters

None.

Personal tools