Java Media Player J/Direct Sample

This sample is located in \Samples\JDirect\MediaPlayer.

Description
Using the Sample
Key Project Files
Technologies Demonstrated

Description

The Java Media Player calls one function (MCISendCommand) to play different media files (audio and video) for the Microsoft® Windows® format.

Using the Sample

To run the sample

  1. Type the following command in the %SDKDIR%\Samples\Jdirect\MediaPlayer directory to build the MediaPlayer.class file from the Java source file:

    Nmake MediaPlayer

    This also builds the MediaPlayer.exe file.

  2. Run MediaPlayer.exe from the same directory.

  3. Select the media you want to play from the Device menu. The choices are:
  4. Select a file from the dialog box and click Open.

  5. Click Play in the media player. (The Pause button will pause the file. When you click Play a second time, it continues from the point at which it was paused.)

  6. Alternatively, you can open the media files from the File menu.

Help Topics in the Help menu contains detailed information on how to play the different media.

If you select About in the Help menu, you will see a 3-D walk-through maze. This simple maze demonstrates Raycasting. To move through the maze, just click the buttons at the bottom. The maze does not contain texture mapping.

Key Project Files

formMediaPlayer.java

This class can take a variable number of parameters on the command line. Program execution begins with the main method. The class constructor is not invoked unless an object of type formMediaPlayer is created in the main method.

Technologies Demonstrated

J/Direct

© 1999 Microsoft Corporation. All rights reserved. Terms of use.