|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asterisk.fastagi.command.AGICommand net.sf.asterisk.fastagi.command.ControlStreamFileCommand
public class ControlStreamFileCommand
Plays the given file, allowing playback to be interrupted by the given
digits, if any, and allows the listner to control the stream.
If offset is provided then the audio will seek to sample offset before play
starts.
Returns 0 if playback completes without a digit being pressed, or the ASCII
numerical value of the digit if one was pressed, or -1 on error or if the
channel was disconnected.
Remember, the file extension must not be included in the filename.
Available since Asterisk 1.2
Constructor Summary | |
---|---|
ControlStreamFileCommand(java.lang.String file)
Creates a new ControlStreamFileCommand, streaming from the beginning. |
|
ControlStreamFileCommand(java.lang.String file,
java.lang.String escapeDigits)
Creates a new ControlStreamFileCommand, streaming from the beginning. |
|
ControlStreamFileCommand(java.lang.String file,
java.lang.String escapeDigits,
int offset)
Creates a new ControlStreamFileCommand, streaming from the given offset. |
|
ControlStreamFileCommand(java.lang.String file,
java.lang.String escapeDigits,
int offset,
java.lang.String forwardDigit,
java.lang.String rewindDigit,
java.lang.String pauseDigit)
Creates a new ControlStreamFileCommand, streaming from the given offset. |
Method Summary | |
---|---|
java.lang.String |
buildCommand()
Returns a string suitable to be sent to asterisk. |
java.lang.String |
getEscapeDigits()
Returns the digits that allow the user to interrupt this command. |
java.lang.String |
getFile()
Returns the name of the file to stream. |
java.lang.String |
getForwardDigit()
Returns the digit for fast forward. |
int |
getOffset()
Returns the offset samples to skip before streaming. |
java.lang.String |
getPauseDigit()
Retruns the digit for pause and unpause. |
java.lang.String |
getRewindDigit()
Returns the digit for rewind. |
void |
setControlDigits(java.lang.String forwardDigit,
java.lang.String rewindDigit)
Sets the control digits for fast forward and rewind. |
void |
setControlDigits(java.lang.String forwardDigit,
java.lang.String rewindDigit,
java.lang.String pauseDigit)
Sets the control digits for fast forward, rewind and pause. |
void |
setEscapeDigits(java.lang.String escapeDigits)
Sets the digits that allow the user to interrupt this command. |
void |
setFile(java.lang.String file)
Sets the name of the file to stream. |
void |
setOffset(int offset)
Sets the offset samples to skip before streaming. |
Methods inherited from class net.sf.asterisk.fastagi.command.AGICommand |
---|
escapeAndQuote, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ControlStreamFileCommand(java.lang.String file)
file
- the name of the file to stream, must not include extension.public ControlStreamFileCommand(java.lang.String file, java.lang.String escapeDigits)
file
- the name of the file to stream, must not include extension.escapeDigits
- contains the digits that allow the user to interrupt
this command.public ControlStreamFileCommand(java.lang.String file, java.lang.String escapeDigits, int offset)
file
- the name of the file to stream, must not include extension.escapeDigits
- contains the digits that allow the user to interrupt
this command. Maybe null
if you don't want the
user to interrupt.offset
- the offset samples to skip before streaming.public ControlStreamFileCommand(java.lang.String file, java.lang.String escapeDigits, int offset, java.lang.String forwardDigit, java.lang.String rewindDigit, java.lang.String pauseDigit)
file
- the name of the file to stream, must not include extension.escapeDigits
- contains the digits that allow the user to interrupt
this command. Maybe null
if you don't want the
user to interrupt.offset
- the offset samples to skip before streaming.forwardDigit
- the digit for fast forward.rewindDigit
- the digit for rewind.pauseDigit
- the digit for pause and unpause.Method Detail |
---|
public java.lang.String getFile()
public void setFile(java.lang.String file)
file
- the name of the file to stream, must not include extension.public java.lang.String getEscapeDigits()
public void setEscapeDigits(java.lang.String escapeDigits)
escapeDigits
- the digits that allow the user to interrupt this
command or null
for none.public int getOffset()
public void setOffset(int offset)
offset
- the offset samples to skip before streaming.public java.lang.String getForwardDigit()
public java.lang.String getRewindDigit()
public java.lang.String getPauseDigit()
public void setControlDigits(java.lang.String forwardDigit, java.lang.String rewindDigit)
forwardDigit
- the digit for fast forward.rewindDigit
- the digit for rewind.public void setControlDigits(java.lang.String forwardDigit, java.lang.String rewindDigit, java.lang.String pauseDigit)
forwardDigit
- the digit for fast forward.rewindDigit
- the digit for rewind.pauseDigit
- the digit for pause and unpause.public java.lang.String buildCommand()
AGICommand
buildCommand
in class AGICommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |