Currently, the Endpoint#play method takes either a single file (as a string) or an array of files (as an array). I would like to offer another possibility:
the method takes an object, which contains a single file to play and a seek offset at which to start playing it (ie can play from somewhere in the middle of the file). See here for details on how to play a file on freeswitch from a given offset.
The method should then play the fill starting from the given offset.
This option is only available when playing a single file, not an array of files.
Furthermore, when the play is done we currently call the callback and pass back playbackSeconds and playbackMilliseconds to tell the caller how much of the call was played. This payload should be enhanced to include:
Currently, the Endpoint#play method takes either a single file (as a string) or an array of files (as an array). I would like to offer another possibility:
So for example, this would be possible:
If an object is passed it can have the following properties:
file
: required, the name of the file to play (string),seekOffset
: optional, the seek offset to start play (integer, default: 0)timeoutSecs
: optional, the number of seconds after which to automatically stop the play, (integer, default: play entire file)The method should then play the fill starting from the given offset.
This option is only available when playing a single file, not an array of files.
Furthermore, when the play is done we currently call the callback and pass back
playbackSeconds
andplaybackMilliseconds
to tell the caller how much of the call was played. This payload should be enhanced to include: