Jskad/source/org/thdl/media/SmartPlayerFactory.bak
eg3p 34b660b8f9 Moved all media related stuff to new package.
This makes more sense, since all this stuff is
accessed by both Savant and QuillDriver.
2002-10-25 20:19:56 +00:00

20 lines
No EOL
569 B
Text

import java.lang.reflect.*;
import java.util.*;
public static class SmartPlayerFactory {
static final String[] possiblePlayers
= {"org.thdl.media.SmartJMFPlayer", "org.thdl.media.SmartQT4JPlayer"};
static Class[] getAllAvailableSmartPlayers() {
List playerClasses = new ArrayList();
for (int i=0; i<possiblePlayers.length; i++) {
try {
Class mediaClass = Class.forName(possiblePlayers[i]);
playerClasses.add(mediaClass);
} catch (ClassNotFoundException cnfe) {
cnfe.printStackTrace();
}
}
return (Class[])playerClasses.toArray();
}
}