sears.tools.player
Interface PlayerInterface

All Known Implementing Classes:
DefaultPlayer, VLCPlayer

public interface PlayerInterface

Class PlayerInterface. Summary: This class defines the interface to play subtitled video files.


Method Summary
 int getLength()
          Method getLength Summary: This method permit to get the video time length(in seconds).
 int getPosition()
          Method getPosition Summary: This method permit to get the current position (in seconds) in the video.
 void pause()
          Method pause Summary: Pause the video.
 void play(java.lang.String videoFile, java.lang.String subtitleFile)
          Method play Summary: Use it to launch a video, with its subtitles.
 void quit()
          Method quit Summary: This method allows to kill the player.
 void setPosition(int offset)
          Method setPosition Summary: This method permit to shift to the correct offset (in s) in the video.
 void stop()
          Method stop Summary: stop the video.
 

Method Detail

play

void play(java.lang.String videoFile,
          java.lang.String subtitleFile)
          throws PlayerException
Method play Summary: Use it to launch a video, with its subtitles. Or to resume from pause.

Parameters:
videoFile - The path to the videoFile.
subtitleFile - The path to the subtitleFile.
Throws:
PlayerException - if an error occurs

pause

void pause()
           throws PlayerException
Method pause Summary: Pause the video. Or to resume from previous pause.

Throws:
PlayerException - if an error occurs

stop

void stop()
          throws PlayerException
Method stop Summary: stop the video.

Throws:
PlayerException - if an error occurs

setPosition

void setPosition(int offset)
                 throws PlayerException
Method setPosition Summary: This method permit to shift to the correct offset (in s) in the video.

Parameters:
offset - The offset in the video to go.
Throws:
PlayerException - if an error occurs

getPosition

int getPosition()
                throws PlayerException
Method getPosition Summary: This method permit to get the current position (in seconds) in the video.

Returns:
the current position in the video or -1 if video is currently stopped;
Throws:
PlayerException - if an error occurs

getLength

int getLength()
              throws PlayerException
Method getLength Summary: This method permit to get the video time length(in seconds).

Returns:
the video time length or -1 if video is currently stopped;
Throws:
PlayerException - if an error occurs

quit

void quit()
Method quit Summary: This method allows to kill the player.