FileDocCategorySizeDatePackage
QTJSound.javaAPI DocExample1951Mon Jan 09 11:02:00 GMT 2006None

QTJSound

public class QTJSound extends Object

Fields Summary
File
soundFile
JDialog
playingDialog
Movie
movie
Constructors Summary
public QTJSound(File f)

        soundFile = f;
        // prepare a dialog to display while playing
        JOptionPane pane = new JOptionPane ("Playing " + f.getName(),
                                            JOptionPane.PLAIN_MESSAGE);
        playingDialog = pane.createDialog (null, "QTJ Sound");
        playingDialog.pack();

        // get and play sound
        QTSession.open();
        QTFile qtf = new QTFile (f);
        OpenMovieFile omf = OpenMovieFile.asRead (qtf);
        movie = Movie.fromFile (omf);
        MyDemoCloser closer = new MyDemoCloser (movie);
        TaskAllMovies.addMovieAndStart ();
        movie.start();
        playingDialog.setVisible(true);
    
Methods Summary
public static voidmain(java.lang.String[] args)

        JFileChooser chooser = new JFileChooser();
        chooser.showOpenDialog(null);
        File f = chooser.getSelectedFile();
        try {
            QTJSound s = new QTJSound (f);
        } catch (Exception e) {
            e.printStackTrace();
        }