From a7bc9e97c07806a0963739083d155fdf50aa54b2 Mon Sep 17 00:00:00 2001 From: michel_jacobson Date: Tue, 19 Nov 2002 21:26:01 +0000 Subject: [PATCH] no more need. It have been replaced by SmartJMFApplet.java --- source/org/thdl/media/SmartApplet.java | 94 -------------------------- 1 file changed, 94 deletions(-) delete mode 100644 source/org/thdl/media/SmartApplet.java diff --git a/source/org/thdl/media/SmartApplet.java b/source/org/thdl/media/SmartApplet.java deleted file mode 100644 index e72a6fb..0000000 --- a/source/org/thdl/media/SmartApplet.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.thdl.media; - -/*-----------------------------------------------------------------------*/ -import java.applet.*; -import java.util.*; -import java.net.*; -import javax.media.*; -import netscape.javascript.JSObject; -import java.awt.*; -import org.thdl.savant.AnnotationPlayer; - -/*-----------------------------------------------------------------------*/ -public class SmartApplet extends Applet implements AnnotationPlayer { - - static public String FIC_SOUND; - private SmartJMFPlayer myJMFplayer; - -/*-----------------------------------------------------------------------*/ - public void init() { - FIC_SOUND = getParameter("Sound"); - String TAB_STARTS = getParameter("STARTS"); - String TAB_ENDS = getParameter("ENDS"); - String TAB_IDS = getParameter("IDS"); - - myJMFplayer = new SmartJMFPlayer(); - myJMFplayer.setParentContainer(this); - myJMFplayer.initForSavant(convertTimesForSmartMoviePanel(TAB_STARTS), convertTimesForSmartMoviePanel(TAB_ENDS), TAB_IDS); - myJMFplayer.addAnnotationPlayer(this); - setLayout(new BorderLayout()); - add("Center", myJMFplayer); - } -/* public void stop() { - //player.close(); - player.stop(); - player.deallocate(); - }*/ - public void start() { - try { - myJMFplayer.loadMovie(new URL(FIC_SOUND)); - } catch (Exception e) { - System.out.println(e.getMessage()); - } - } -/*-----------------------------------------------------------------------*/ - public boolean cmd_isRealized() { - return myJMFplayer.isInitialized(); - } - public String cmd_firstS() { - return myJMFplayer.cmd_firstS(); - } - public boolean cmd_stop() { - try { - myJMFplayer.cmd_stop(); - return true; - } catch (SmartMoviePanelException err) { - System.out.println(err.getMessage()); - return false; - } - } - public boolean cmd_isID(String theID) { - return myJMFplayer.cmd_isID(theID); - } - public boolean cmd_playFrom(String fromID) { - return myJMFplayer.cmd_playFrom(fromID); - } - public boolean cmd_playS(String fromID) { - return myJMFplayer.cmd_playS(fromID); - } -/*-----------------------------------------------------------------------*/ - public void startAnnotation(String id) { - sendMessage("startplay", id); - } - public void stopAnnotation(String id) { - sendMessage("endplay", id); - } - private void sendMessage(String method, String mess) { - Object args[] = { mess }; - try { - JSObject.getWindow(this).call(method, args); - } catch (Exception e) { - System.out.println("Erreur appel javascript: "+e+" "+mess); - } - } -/*-----------------------------------------------------------------------*/ - private String convertTimesForSmartMoviePanel(String s) { - StringBuffer sBuff = new StringBuffer(); - StringTokenizer sTok = new StringTokenizer(s, ","); - while (sTok.hasMoreTokens()) { - sBuff.append(String.valueOf(new Float(Float.parseFloat(sTok.nextToken()) * 1000).intValue())); - sBuff.append(','); - } - return sBuff.toString(); - } -}; \ No newline at end of file