34b660b8f9
This makes more sense, since all this stuff is accessed by both Savant and QuillDriver.
20 lines
No EOL
569 B
Text
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();
|
|
}
|
|
} |