FileDocCategorySizeDatePackage
BasicDataRefQTPlayer.javaAPI DocExample2375Wed Nov 10 12:37:20 GMT 2004com.oreilly.qtjnotebook.ch02

BasicDataRefQTPlayer

public class BasicDataRefQTPlayer extends Frame

Fields Summary
Constructors Summary
public BasicDataRefQTPlayer(Movie m)

        super ("Basic QT Player");
        m.prePreroll(0, 1.0f);
        m.preroll(0, 1.0f);
        QTComponent qc = QTFactory.makeQTComponent (m);
        Component c = qc.asComponent();
        add (c);
        pack();
    
Methods Summary
public static voidmain(java.lang.String[] args)

        try {
            QTSessionCheck.check();
            String url = 
                JOptionPane.showInputDialog (null, 
                                             "Enter URL:");
            DataRef dr = new DataRef (url);
            Movie m = Movie.fromDataRef (dr,
                                         StdQTConstants.newMovieActive);
            System.out.println ("got movie");
            Frame f = new BasicDataRefQTPlayer (m);
            f.pack();
            f.setVisible(true);
            m.start();
        } catch (Exception e) {
            e.printStackTrace();
        }