Player p = javax.media.Manager.createPlayer(ds); if (p == null) return;
/** Construct the player object and the GUI. */ public JMFPlayer(JFrame pf, String media) { parentFrame = pf; mediaName = media; // cp = getContentPane(); cp = this; cp.setLayout(new BorderLayout()); try { theURL = new URL(getClass().getResource("."), mediaName); thePlayer = Manager.createPlayer(theURL); thePlayer.addControllerListener(this); } catch (MalformedURLException e) { System.err.println("JMF URL creation error: " + e); } catch (Exception e) { System.err.println("JMF Player creation error: " + e); return; } System.out.println("theURL = " + theURL); // Start the player: this will notify our ControllerListener. thePlayer.start(); // start playing }
Player p = javax.media.Manager.createPlayer(ds); if (p == null) return;
Player p = javax.media.Manager.createPlayer(ds); if (p == null) return;