Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

Movie Properties

void SetRate(float rate)
float GetRate()

Gets and sets the playback rate of the movie. A value of "1" indicates that the movie is playing in normally. A paused movie has a rate of "0". Negative values indicate that the movie is playing in reverse. Setting the rate of a paused movie to a non-zero value starts the movie playing.

void SetTime(int time)
int GetTime()

Gets and sets the current time of the specified QuickTime movie. Setting this property causes the movie to go to that time in the movie and stop.

void SetVolume(int volume)
int GetVolume()

Gets and sets the audio volume of the movie. A negative value mutes the movie.

void SetMovieName(string movieName)
string GetMovieName()

Gets and sets the name optionally used by a wired sprite when targeting an external movie. This is the same as the "MOVIENAME" embed tag.

void SetMovieID(int movieID)
int GetMovieID()

Gets and sets the ID optionally used by a wired sprite when targeting an external movie. This is the same as the "MOVIEID" embed tag.

void SetStartTime(int time)
int GetStartTime()

Gets and sets the time at which it begins to play, and the time at which it loops when playing in reverse. Initially, the startTime of a movie is set to "0" unless specified in the "STARTTIME" embed tag. It cannot be set to a time greater than the endTime. This is the same as the "STARTTIME" embed tag.

void SetEndTime(int time)
int GetEndTime()

Gets and sets the time at which the movie will loop or stop playing. Initially, the endTime of a movie is set to its duration unless specified in the "ENDTIME" embed tag. It cannot be set to a time less than the startTime, nor greater than the movie's duration. This is the same as the "ENDTIME" embed tag.

void SetBgColor(string color)
string GetBgColor()

Gets and sets the color used to fill any space withing the embed region not covered by the movie. This is the same as the "BGCOLOR" embed tag and takes the same values. Regardless of how the color was specified, GetBgColor() always returns the color number, e.g., if the bgcolor was set to "Navy", GetBgColor() will return "#000080".

void SetIsLooping(boolean loop)
boolean GetIsLooping()

Gets and sets whether or not a movie loops when it reaches its end. A movie loops in either reverse or forward play. This is the same as the "LOOP=TRUE" or "LOOP=FALSE" embed tag.

void SetLoopIsPalindrome(boolean loop)
boolean GetLoopIsPalindrome()

Gets and sets whether or not a looping movie will reverse direction when it loops. The "LOOP" property must be true for this to have any effect. This is the same as the "LOOP=PALINDROME" embed tag.

boolean GetMute()
void SetMute(boolean mute)

Gets and sets the audio mute of a movie while maintaining the magnitude of the volume, so turning mute off restores the volume.

void SetPlayEveryFrame(boolean playAll)
boolean GetPlayEveryFrame()

This is the same as the PLAYEVERYFRAME embed tag.

void SetAutoPlay(boolean autoPlay)
boolean GetAutoPlay()

This is the same as the AUTOPLAY embed tag.

void SetControllerVisible(boolean visible)
boolean GetControllerVisible()

Gets and sets the visibility of the movie controller. This is the same as the CONTROLLER embed tag.

void SetHREF(string url)
string GetHREF()

Gets and sets the movie's HREF url. This is the same as the "HREF" embed tag.

void SetTarget(string target)
string GetTarget()

Gets and sets the movie's HREF url target. This is the same as the "TARGET" embed tag.

void SetQTNEXTUrl(int index, string url)
string GetQTNEXTUrl(int index)

Gets and sets the specified QTNEXT url and target. This is the same as the "QTNEXTnn" embed tag).

void SetHotspotUrl(int hotspotID, string url)
string GetHotspotUrl(int hotspotID)

Gets and sets the specified VR movie hotspot url. This is the same as the "HOTSPOTnn" embed tag).

void SetHotspotTarget(int hotspotID, string target)
string GetHotspotTarget(int hotspotID)

Gets and sets the specified VR movie hotspot url target. This is the same as the "TARGETnn" embed tag).

void SetURL(string url)

Replaces the movie with that specified by the parameter.

string GetURL()

Returns the movie's fully specified URL.

void SetKioskMode(boolean kioskMode)

This is the same as the KIOSKMODE embed tag.

Note:   If the movie's embed tag or user data has \xB8"KIOSKMODE=TRUE", SetKioskMode() does nothing.

boolean GetKioskMode()

Returns the current KIOSKMODE setting.

int GetDuration()

Returns the length of the movie (in the movie's time scale).

int GetMaxTimeLoaded()

Returns the amount of the movie that has been downloaded (in the movie's time scale).

int GetTimeScale()

Returns the number of units of time per second in the movie.

int GetMovieSize()

Returns the size of the movie in bytes.

int GetMaxBytesLoaded()

Returns the number of bytes of the movie that have been downloaded.

void SetMatrix(string matrix)
string GetMatrix()

These allow you to get and set the movie's transformation matrix. QuickTime uses a 3 x 3 transformation matrix, represented in JavaScript by three lines of three numbers separated by commas:

a, b, u

c, d, v

h, k, w

Note:   Normally, the QuickTime Plug-in keeps the movie centered within the embed area, even if the embed area changes. Once a movie's location is changed with SetRect or SetMatrix, the movie's absolute location within the embed area is maintained rather than centering it.

void SetRectangle(string rect)
string GetRectangle()

These allow you to get and set location and dimensions of the movie within the embed area.

Note:   Normally, the QuickTime Plug-in keeps the movie centered within the embed area, even if the embed area changes. Once a movie's location is changed with SetRect or SetMatrix, the movie's absolute location within the embed area is maintained rather than centering it.

void SetLanguage(string language)

Sets the movie's current language. This causes the tracks associated with that language to be enabled and tracks associated with other languages to be disabled. If it cannot find an appropriate track for the specified language, the movie's language is not changed.

string GetLanguage()

Returns the name of movie's current language.

Supported language names are shown in Table 1.

Table 1  Supported language names

Language

Script system

English Roman script
French Roman script
German Roman script
Italian Roman script
Dutch Roman script
Swedish Roman script
Spanish Roman script
Danish Roman script
Portuguese Roman script
Norwegian Roman script
Hebrew Hebrew script
Japanese Japanese script
Arabic Arabic script
Finnish Roman script
Greek Greek script using Roman script code
Icelandic variant Roman script
Maltese variant Roman script
Turkish variant Roman script
Croatian Serbo-Croatian in variant Roman script
TradChinese Chinese (Mandarin) in traditional characters
Urdu Arabic script

string GetMIMEType()

Returns the movie's MIME type.

string GetUserData(string type)

Returns the movie user data text with the specified tag. The tag is specified with a four character string, for example `@cpy' returns a movie's copyright string. For a more complete list of user data tags, see

<http://developer.apple.com/documentation/quicktime/RM/rmMTFundamentals.htm>.


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |