Class CallMedia

java.lang.Object
com.azure.communication.callautomation.CallMedia

public class CallMedia extends Object
CallContent.
  • Method Details

    • play

      public void play(PlaySource playSource, List<com.azure.communication.common.CommunicationIdentifier> playTo)
      Play
      Parameters:
      playSource - A PlaySource representing the source to play.
      playTo - the targets to play to.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • playToAll

      public void playToAll(PlaySource playSource)
      Play to all participants
      Parameters:
      playSource - A PlaySource representing the source to play.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • playWithResponse

      public com.azure.core.http.rest.Response<Void> playWithResponse(PlaySource playSource, List<com.azure.communication.common.CommunicationIdentifier> playTo, PlayOptions options, com.azure.core.util.Context context)
      PlayWithResponse
      Parameters:
      playSource - A PlaySource representing the source to play.
      playTo - the targets to play to.
      options - play options.
      context - A Context representing the request context.
      Returns:
      Response for successful play request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • playToAllWithResponse

      public com.azure.core.http.rest.Response<Void> playToAllWithResponse(PlaySource playSource, PlayOptions options, com.azure.core.util.Context context)
      PlayAllWithResponse
      Parameters:
      playSource - A PlaySource representing the source to play.
      options - play options.
      context - A Context representing the request context.
      Returns:
      Response for successful playAll request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • startRecognizing

      public void startRecognizing(CallMediaRecognizeOptions callMediaRecognizeOptions)
      Recognize tones.
      Parameters:
      callMediaRecognizeOptions - Optional elements for recognize.
    • startRecognizingWithResponse

      public com.azure.core.http.rest.Response<Void> startRecognizingWithResponse(CallMediaRecognizeOptions callMediaRecognizeOptions, com.azure.core.util.Context context)
      Recognize tones.
      Parameters:
      callMediaRecognizeOptions - Optional elements for recognize.
      context - A Context representing the request context.
      Returns:
      Response for a successful recognize request.
    • cancelAllMediaOperations

      public void cancelAllMediaOperations()
      Cancels all the queued media operations.
    • cancelAllMediaOperationsWithResponse

      public com.azure.core.http.rest.Response<Void> cancelAllMediaOperationsWithResponse(com.azure.core.util.Context context)
      Cancels all the queued media operations
      Parameters:
      context - A Context representing the request context.
      Returns:
      Response for successful playAll request.