Thank you for the information.  It is helpful to understand.

Because I want to size the player at the start of loading the file, and
I do not want to have to rearrange the contents of every file that is
uploaded, I think a server-side Java program that reads the metadata and
sends it to a custom player via RPC or POST is the best way for me to
go.  Here is a first attempt at such a program:
import javax.media.CannotRealizeException; import
javax.media.MediaLocator; import javax.media.NoPlayerException; import
javax.media.Player; import javax.media.Manager; import
java.awt.Component; import java.awt.Dimension; import
java.io.IOException; import java.net.URL;  public class
MediaMetadataReader {          public MediaMetadataReader(URL
mediaLocator) throws NoPlayerException, IOException,
CannotRealizeException {         Player player =
Manager.createPlayer(mediaLocator);         Component mediaViewer =
player.getVisualComponent();         Dimension mediaDimension =
mediaViewer.getPreferredSize();         double width =
mediaDimension.getWidth();         double height =
mediaDimension.getHeight();         System.out.println("width=" + width
+ ", height=" + height);     }          public static void main(String[]
args) throws NoPlayerException, IOException, CannotRealizeException {
if (args.length==0) {             System.out.println("Usage:
MediaMetadataReader fileToRead");             System.exit(-1);         }
MediaMetadataReader metaReader = new MediaMetadataReader(new
URL(args[0]));     } }
If anyone has a finished version of something similar, I'd like to hear
about it.

Reply via email to