






Embedding a media component in a compound document
The Time Media UI framework also supports adding a media component to a compound document. To embed a media component in a document, you create a TDocumentComponent, passing it a media model and a default presenter state. You use three media objects to do this:
- A sequence that contains the media data that you want to present, an instance of TMediaSequence
- A model that encapsulates the media sequence and presents the data using a TMediaPresenter, an instance of TMediaModel
- A presenter that manages the media presentation and processes the actions sent from the player controls, an instance of TMediaPresenter
For example, to embed an audio component in a document:
- Create an audio sequence that contains the audio data you want to play.
To embed a movie or MIDI component, create a TGraphicSequence or TMIDISequence instead.
- Create a media model to hold the sequence.
- Create a media presenter state.
- Create a new document component, passing in the media model and presenter state.
- Adopt and embed the new component into the containing model.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.
Generated with WebMaker