|QMedia Text media commands|
|QM_AddChapterList(movieRef; chapterTrackID; refTrackID; chapterTitles; chapterTimes):error|
||chapterTrackID||Longint||Chapter track ID|
||refTrackID||Longint||Link track ID|
||chapterTitles||Array string||Chapter titles|
||chapterTimes||Array longint||Chapter times|
Creates a chapter list track.
A chapter list is a pop-up menu that appears in the standard movie controller. It gives users a way to quickly get to points in a movie.
Technically, a chapter list is a text track that references another track in the movie. The text samples from the chapter list track are used to build the pop-up menu. When an item is selected from the pop-up menu, the movie controller sets the movie's current time to the point where the corresponding text sample appears. Chapter list tracks are usually disabled.
Parameter movieRef is the reference to the movie instance. The movie reference must have been previously obtained with a call to QM_NewMovieFromFile.
Parameter chapterTrackID receives the ID of the chapter list track.
Parameter refTrackID is the ID of the track that is referenced from the chapter list.
Parameter chapterTitles is a string array that holds the chapter titles. The chapter titles are used by the movie controller to build the pop-up menu.
Parameter chapterTimes is a longint array that holds the time values for the corresponding chapters. These time values must be expressed in the movie's time scale.
Before creating the chapter list, QMedia sorts the chapterTitles and chapterTimes arrays using the contents of chapterTimes as the sort key.