no message
This commit is contained in:
parent
384ad282b5
commit
cc0097f2ae
2 changed files with 23 additions and 13 deletions
|
@ -128,6 +128,9 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene
|
||||||
public boolean isInitialized() {
|
public boolean isInitialized() {
|
||||||
return isSized;
|
return isSized;
|
||||||
}
|
}
|
||||||
|
//public Dimension getSize() {
|
||||||
|
// return player.getControlPanelComponent().getSize(); //tester avant si player exist
|
||||||
|
//}
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
private void showMediaComponent() {
|
private void showMediaComponent() {
|
||||||
if (isRealized && isCached) {
|
if (isRealized && isCached) {
|
||||||
|
@ -166,10 +169,10 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene
|
||||||
} else if (isCached) //must be http
|
} else if (isCached) //must be http
|
||||||
showMediaComponent();
|
showMediaComponent();
|
||||||
} else if (event instanceof StartEvent) {
|
} else if (event instanceof StartEvent) {
|
||||||
|
System.out.println("received StartEvent event");
|
||||||
launchAnnotationTimer(); //FIXME should have upper limit (stop time)
|
launchAnnotationTimer(); //FIXME should have upper limit (stop time)
|
||||||
|
|
||||||
if (timer != null)
|
if (timer != null) {
|
||||||
{
|
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +185,6 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene
|
||||||
player.stop();
|
player.stop();
|
||||||
}}, 0, 15);
|
}}, 0, 15);
|
||||||
} else if (event instanceof StopEvent) {
|
} else if (event instanceof StopEvent) {
|
||||||
System.out.println("received StopEvent");
|
|
||||||
pauseTime = player.getMediaTime();
|
pauseTime = player.getMediaTime();
|
||||||
cancelAnnotationTimer();
|
cancelAnnotationTimer();
|
||||||
|
|
||||||
|
@ -199,16 +201,28 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene
|
||||||
time.*/
|
time.*/
|
||||||
|
|
||||||
if (!(event instanceof RestartingEvent)) {
|
if (!(event instanceof RestartingEvent)) {
|
||||||
|
//player.setMediaTime(pauseTime);
|
||||||
|
//player.prefetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event instanceof StopAtTimeEvent) {
|
||||||
|
System.out.println("received StopAtTimeEvent");
|
||||||
|
} else if (event instanceof StopByRequestEvent) {
|
||||||
|
System.out.println("received StopByRequestEvent");
|
||||||
|
} else if (event instanceof RestartingEvent) {
|
||||||
System.out.println("received RestartingEvent");
|
System.out.println("received RestartingEvent");
|
||||||
player.setMediaTime(pauseTime);
|
} else if (event instanceof DataStarvedEvent) {
|
||||||
player.prefetch();
|
System.out.println("received DataStarvedEvent");
|
||||||
|
} else if (event instanceof DeallocateEvent) {
|
||||||
|
System.out.println("received DeallocateEvent");
|
||||||
|
} else if (event instanceof EndOfMediaEvent) {
|
||||||
|
System.out.println("received EndOfMediaEvent");
|
||||||
}
|
}
|
||||||
|
|
||||||
stopTime = null;
|
stopTime = null;
|
||||||
|
|
||||||
|
|
||||||
if (timer != null)
|
if (timer != null) {
|
||||||
{
|
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,25 +161,21 @@ public abstract class SmartMoviePanel extends Panel
|
||||||
System.out.println(hashStart.containsKey(theID));
|
System.out.println(hashStart.containsKey(theID));
|
||||||
return hashStart.containsKey(theID);
|
return hashStart.containsKey(theID);
|
||||||
}
|
}
|
||||||
public boolean cmd_playFrom(String fromID) {
|
public void cmd_playFrom(String fromID) {
|
||||||
Integer from = (Integer)hashStart.get(fromID);
|
Integer from = (Integer)hashStart.get(fromID);
|
||||||
try {
|
try {
|
||||||
cmd_playSegment(from, null);
|
cmd_playSegment(from, null);
|
||||||
return true;
|
|
||||||
} catch (SmartMoviePanelException smpe) {
|
} catch (SmartMoviePanelException smpe) {
|
||||||
smpe.printStackTrace();
|
smpe.printStackTrace();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public boolean cmd_playS(String fromID) {
|
public void cmd_playS(String fromID) {
|
||||||
Integer from = (Integer)hashStart.get(fromID);
|
Integer from = (Integer)hashStart.get(fromID);
|
||||||
Integer to = (Integer)hashEnd.get(fromID);
|
Integer to = (Integer)hashEnd.get(fromID);
|
||||||
try {
|
try {
|
||||||
cmd_playSegment(from, to);
|
cmd_playSegment(from, to);
|
||||||
return true;
|
|
||||||
} catch (SmartMoviePanelException smpe) {
|
} catch (SmartMoviePanelException smpe) {
|
||||||
smpe.printStackTrace();
|
smpe.printStackTrace();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void launchAnnotationTimer() { //FIXME: should have upper limit - stop time else end time
|
public void launchAnnotationTimer() { //FIXME: should have upper limit - stop time else end time
|
||||||
|
|
Loading…
Reference in a new issue