QTIAW Xtra alpha


Welcome to the alpha release of our new QuickTimeInAWindow (QTIAW) Xtra.

The xtra is intended to replace MacroMedias QuickTime Xtra, which is causing disappointments and troubles for many users. You can playback QT movies without "weak import" of external files to the cast. Playback will not occupy a sprite and the movie image will not remain on the stage – as it has never been on the stage.
This is the real difference to MacroMedias xtra: it plays QT Movies in a native window, not on the stage. This window can have any size or position on the screen(s). You can e.g. show all movies fullscreen or e.g. 1024 * 768, even if the stage is limited to 640 * 480.

The development of the xtra is in a very early stage. Therefore it has not yet been ported to windows. On the other hand we build the skeleton and included only the first few methods to the xtra and many methods and features will follow soon.

At this point we like to get as many suggestions as possible, to support most users demands on an Xtra for QT playback.

Your comments, bug reports or feature requests are welcome!

QuickTimeInAWindow (QTIAW) xtra alpha

How to use it:

I am sure, you know how to install an Xtra, so I skip this point.

The Xtra is a Scritping / Lingo Xtra. When the Xtra is installed, you have the following new Lingo commands available:

new
Sample: set qt = new( xtra "QTIAW" )

This creates a new instance of the xtra. You can also open and play more than one movie.

qtPlay
Sample: qtplay(qt, filename, area)

This is the easiest way to play back QT movies.
filename: the absolute path and filename of the movie file.
area: the rectangle, where to play the movie. The movie will be scaled to the rectangle. These are global coordinates, not measured in stage coordinates.

This method loads the movie file. It also preloads the tracks, in case preloading is activated in the track properties (via MoviePlayer). It opens a borderless window, plays the movie until the end or until the mousebutton is pressed. Afterwards the window is closed and the memory occupied by the movie is freed. While the movie is playing, Director is hogged - the control does not leave the xtra.

changed (0.2.0)
qtOpen
Sample: qtopen(qt, filename)

filename: the absolute path and filename of the movie file.

This method loads the movie file. The properties of the movie are available after opening the movie.

new (0.2.0)
qtShow
Sample: qtshow(qt, area)

area: the rectangle, where to play the movie. The movie will be scaled to the rectangle. These are global coordinates, not measured in stage coordinates.

This method opens a borderless window for movie playback. Afterwards the method returns to lingo.

new (0.3.0)
qtHide
Sample: qthide(qt)

This method closes the movie window but leaves the movie open. When calling qtShow afterwards, the movie will be shown, at hte time qtHide was called.

qtStart
Sample: qtstart(qt)

This method starts a previously opened movie.

new (0.3.0)
qtStop
Sample: qtstop(qt)

This method stops a previously opened movie.

qtClose
Sample: qtclose(qt)

This method closes a previously opened movie, regardless wether it is playing or not.

qtTask
Sample: qttask(qt, time)

time: The amount of milliseconds you pass to QuickTime to do his job.

This method passes processing time to the xtra and to QuickTime. Call this as often as possible otherwise movie playback (video tracks) will hang. The method returns after time milliseconds. With time = 0 QuickTime will process only one frame of each movie until it returns.

qtDone
Sample: set done = qtstart(qt)

This method returns 0 (false) while the movie is running and 1 (true) when the movie has reached the end.

new (0.2.0)
qtMovieInfo
Sample: put qtMovieInfo(qt)

This method returns a property list with information about the movie (rate, volume, preferred rate, preferred volume, timebase, duration).

new (0.2.0)
qtGetVolume
Sample: put qtGetVolume(qt)

This method returns the actual volume level of the movie. The value range is from -255 to 255. Values below 1 will mute the movie, but the original volume can easily be restored.

new (0.2.0)
qtSetVolume
Sample: qtSetVolume(qt, 255)

This method sets the actual volume level of the movie. The value range is from -255 to 255. Values below 1 will mute the movie.

new (0.2.0)
qtGetRate
Sample: put qtGetRate(qt)

This method returns the actual movierate as a floating point value.

new (0.2.0)
qtSetRate
Sample: qtSetRate(qt, 1.0)

This method sets the actual movierate. If the movie window is not opened (via qtShow), a call to this method is ignored. When the movie is opened, movie playback will start, when the rate is set to a value different to 0.0. A value of 1.0 will playback the movie in original speed. Negativ values will playback the movie in reverse speed.

new (0.2.0)
qtGetTime
Sample: put qtGetTime(qt)

This method returns the actual movie time, measured in its time scale. The time scale in general has a value of 600. The time scale is also returned with the qtmovieinfo() method.

new (0.2.0)
qtSetTime
Sample: qtSetTime(qt, time)

time: The time where the movie should go to, measured in the movies timescale.

This method (re-)winds the movie to the position defined with the time parameter. The time is measured in the movies timescale - in general a value of 600.

new (0.2.0)
qtTrackInfo
Sample: put qtTrackInfo(qt)

This method will return a list with informations about the tracks in the movie. Each item represents one track. So count( qtTrackInfo( qt)) will offer the number of tracks of the movie.
Each item is a property list with infomrations about the individual track´(track number, track volume, track sound balance, track media type, track enabled).

new (0.2.0)
qtTrackEnable
Sample: qtTrackEnable(qt, trackid, enable)

trackid: the number of the track to enable.
enable: a value of 0 disables the track, all other values enable the track

This method allows to en-/disable the specified track. Track numbers start from 1 and end with the number of tracks.

new (0.2.0)
qtTrackVolume
Sample: qtTrackVolume(qt, trackid, volume)

trackid: the number of the track to enable.
volume: set the volume of the track. the value ranges from -255 to 255

This method allows to set the volume of individual tracks. All values below 1 mute the track. Track number start from 1 and end with the number of tracks.

new (0.3.0)
qtGetChapters
Sample: put qtgetchapters(qt)

This method looks for the first chapter track. Chapter tracks owned by disabled tracks are ignored. It returns a property list with the name of the chapter as property and the time (measured in the movies timescale) it starts as value. In case no (active) chapter track is found, qtgetchapters returns an empty list.

For more information about chapter tracks look at Apples QuickTime tutorial pages.

new (0.3.0)
qtGoChapter
Sample: put qtGoChapter(qt, chapterid)

chapterid: the number of the chapter to go to.

This method rolls the movie to the time, where the chapter starts. When the movie is playing, playback continues as before. It is just a shortcut to evaluating the list returned by getchapters and calling qtSetMovieTime afterwards. Chapter ids have a range from 1 to the number of chapters.

qtversion
Sample: put qtversion()

This global method (you don't need an instance for calling this method) returns the top level version number as an integer. So it is very easy to find out, whether the actual machine runs QuickTime 3 or 4 or later. If the method returns 0, QuickTime is not installed on the actual machine.

qtversionstring
Sample: put qtversionstring()

This global method (you don't need an instance for calling this method) returns the complete version information as string. This can be used to evaluate, if the actual machine has QT 4.1.2 installed or earlier - in case you might suggest an update to the user.

register
Sample: register( xtra "qtiaw", string( 0 )) -- enter your serial here

This method is used to avoid the annoying unregistered alerts in projectors. Registration is not available at this early stage of development of the xtra.

There are the following limitations to the QTIAW Xtra:
  • When you stop the playback of the Director movie, while a QT movie is started (via qtstart) the movie will continue playback until you destroy the instance. As qttask isn't called anymore, the video track(s) will not update, but sound will continue. In this case you should destroy the instance in the stopmovie handler or in the message window. Otherwise the instance with the loaded movie will stay in memory.
QuickTimeInAWindow (QTIAW) xtra alpha

Version History:

v 0.3.0
This version includes chapter track support and some bug fixes:
  • qtOpen now Prerolls the first frame of the movie
  • qtShow opened the window, but doesn't show the movie
  • qtShow wasn't aware, that the window might alredy be opened
  • I simply forgot qtHide and qtStop
v 0.2.0
This version covers several new features, esp. with movie and track handling. Thos version can now set /get the movie or track volumes, en-/disable tracks, getting and setting of the movie time and rate.
v 0.1.0
After a first simple build, which only included the new and the qtplay methods, I began to add the other features step by step, as my time allows it to. I then experimented with several ways to implement lingo behaviours.
further plans
support as many features as you request.
Currently requested are wired sprites, audio-only movies without a window.
QuickTimeInAWindow (QTIAW) xtra alpha

Contact:

Bugreports & Comments
Developer: Stefan Schmidt-Bilkenroth – ssb@mcmm.com
Please contact me with all feature requests, comments and bug reports.
Ordering
As the Xtra is in a very early stage of development, ordering is only available on request.
media connect multimedia or Erich Geiersberger – erichg@mcmm.com
QuickTimeInAWindow (QTIAW) xtra download

Download:

here (about 122 kB)
The file contains a simple Director movie, Apples Sample Movie, to show the usage of the xtra. They are prepared with Director 6.5, but can easily be updated to Director 7 and 8. The sample movie does not exhibit all the features, that are implemented.

Back to the homepage of media connect multimedia