player
Class JALoadingPlayer

java.lang.Object
  extended by player.JAFramesPlayer
      extended by player.JALoadingPlayer
All Implemented Interfaces:
AvatarEventHandler
Direct Known Subclasses:
JASocketPlayer

public class JALoadingPlayer
extends JAFramesPlayer

A JALoadingPlayer is a JAFramesPlayer equipped with the ability to load an animation sequence for a given SiGML or CAS source (URL or string), and then to play that sequence.


Nested Class Summary
static interface JALoadingPlayer.SiGMLPipeWriter
          Interface for piped SiGML generation.
 
Field Summary
 
Fields inherited from class player.JAFramesPlayer
SZ_CAM_DATA
 
Constructor Summary
JALoadingPlayer(JAOptions jopts, JACanvasEmbedder embedder)
          Constructs a new JA Loading Player using the given options and avatar-canvas embedder, with no avatar-event handler, no player-event handler, no speed control, and with the player's cyclic-play and single-sign flags both initially false.
JALoadingPlayer(JAOptions jopts, JACanvasEmbedder embedder, AvatarEventHandler aehdlr, JALoadingPlayerEventHandler lpehdlr, SpeedProvider sp)
          Constructs a JALoadingPlayer using the given options, avatar-canvas embedder, avatar-event handler, player-event handler, speed control, and with the player's cyclic-play and single-sign flags both initially false.
JALoadingPlayer(JAOptions jopts, JACanvasEmbedder embedder, AvatarEventHandler aehdlr, JALoadingPlayerEventHandler lpehdlr, SpeedProvider sp, boolean cyclic, boolean onesign)
          Constructs a JALoadingPlayer using the given options, avatar-canvas embedder, avatar-event handler, player-event handler, speed control, and initial cyclic-play and single-sign flag settings.
 
Method Summary
 void playSiGML(java.lang.String sigml)
          Plays the animation generated from the given SiGML string.
 JALoadingPlayer.SiGMLPipeWriter playSiGMLPiped()
          Starts playing the animation generated via a new SiGML pipe, returning the SiGML pipe writer via which the SiGML is to be generated by the caller.
 void playSiGMLURL(java.net.URL url)
          Plays the animation generated from the given SiGML URL, which is assumed to be non-null.
 void processSiGMLInput(java.io.InputStream sins, boolean doplay)
          Plays the animation generated from the given SiGML InputStream.
 void replay()
          Replays this player's current animation, which is assumed to exist as a result of a previous call to one of the play...() methods.
 void saveCAS(java.lang.String av, java.io.File caspath)
          Writes this player's current animation, which is assumed to exist, as a CAS document to the given filesystem path, using the given avatar name.
 
Methods inherited from class player.JAFramesPlayer
avatarIsLoaded, avatarIsUnloaded, awaitPlayerInactive, clearAnimation, countFrames, countSigns, createStandardCameraChangeMonitor, currentSign, doVideoGen, ensureAnimationIsComplete, framePlayFinishes, framePlayStarts, getAnimation, getFrameIndexAccess, handleDoIdleAmbientChange, hasAnimationData, makeSignStatusRecord, playerIsActive, requestSwitchAvatar, resumePlaying, sequencePlayFinishes, sequencePlayStarts, setAnimation, setCyclicPlay, setSingleSignPlay, showFrame, showFrame, startPlaying, startPlayingStreamed, stopPlaying, suspendPlaying, terminate, videoGenIsPossible, videoServiceIsAvailable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JALoadingPlayer

public JALoadingPlayer(JAOptions jopts,
                       JACanvasEmbedder embedder)
Constructs a new JA Loading Player using the given options and avatar-canvas embedder, with no avatar-event handler, no player-event handler, no speed control, and with the player's cyclic-play and single-sign flags both initially false.


JALoadingPlayer

public JALoadingPlayer(JAOptions jopts,
                       JACanvasEmbedder embedder,
                       AvatarEventHandler aehdlr,
                       JALoadingPlayerEventHandler lpehdlr,
                       SpeedProvider sp)
Constructs a JALoadingPlayer using the given options, avatar-canvas embedder, avatar-event handler, player-event handler, speed control, and with the player's cyclic-play and single-sign flags both initially false.


JALoadingPlayer

public JALoadingPlayer(JAOptions jopts,
                       JACanvasEmbedder embedder,
                       AvatarEventHandler aehdlr,
                       JALoadingPlayerEventHandler lpehdlr,
                       SpeedProvider sp,
                       boolean cyclic,
                       boolean onesign)
Constructs a JALoadingPlayer using the given options, avatar-canvas embedder, avatar-event handler, player-event handler, speed control, and initial cyclic-play and single-sign flag settings.

Method Detail

playSiGMLURL

public void playSiGMLURL(java.net.URL url)
                  throws java.lang.InterruptedException
Plays the animation generated from the given SiGML URL, which is assumed to be non-null.

Throws:
java.lang.InterruptedException

playSiGML

public void playSiGML(java.lang.String sigml)
               throws java.lang.InterruptedException
Plays the animation generated from the given SiGML string.

Throws:
java.lang.InterruptedException

playSiGMLPiped

public JALoadingPlayer.SiGMLPipeWriter playSiGMLPiped()
                                               throws java.io.IOException,
                                                      java.lang.InterruptedException
Starts playing the animation generated via a new SiGML pipe, returning the SiGML pipe writer via which the SiGML is to be generated by the caller. An IO exception is thrown if the streamed animation build option is not set for this JARP instance.

Throws:
java.io.IOException
java.lang.InterruptedException

processSiGMLInput

public void processSiGMLInput(java.io.InputStream sins,
                              boolean doplay)
                       throws java.lang.InterruptedException
Plays the animation generated from the given SiGML InputStream.

Throws:
java.lang.InterruptedException

replay

public void replay()
Replays this player's current animation, which is assumed to exist as a result of a previous call to one of the play...() methods.


saveCAS

public void saveCAS(java.lang.String av,
                    java.io.File caspath)
Writes this player's current animation, which is assumed to exist, as a CAS document to the given filesystem path, using the given avatar name.