Class CallRecordingAsync
java.lang.Object
com.azure.communication.callautomation.CallRecordingAsync
CallRecordingAsync.
-
Method Summary
Modifier and TypeMethodDescriptionDelete the content located at the deleteUrldeleteWithResponse(String deleteUrl) Delete the content located at the deleteUrl Recording deletion will be done using parallel workers.Mono<com.azure.core.util.BinaryData> downloadContent(String sourceUrl) Reads the entire content.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> downloadContentWithResponse(String sourceUrl, com.azure.core.http.HttpRange range) Reads a range of bytes from a content.downloadStream(String sourceUrl) Download the recording content, e.g.Mono<com.azure.core.http.rest.Response<Flux<ByteBuffer>>> downloadStreamWithResponse(String sourceUrl, com.azure.core.http.HttpRange range) Download the recording content, (e.g.downloadTo(String sourceUrl, Path destinationPath) Download the content located inendpointinto a file marked bypath.downloadTo(String sourceUrl, Path destinationPath, DownloadToFileOptions options) Download the content located inendpointinto a file marked bypath.Get current recording state by recording id.Mono<com.azure.core.http.rest.Response<RecordingStateResult>> getStateWithResponse(String recordingId) Get current recording state by recording id.Pause recording of the call.pauseWithResponse(String recordingId) Pause recording of the call.Resume recording of the call.resumeWithResponse(String recordingId) Resume recording of the call.start(StartRecordingOptions options) Start recording of the call.Mono<com.azure.core.http.rest.Response<RecordingStateResult>> startWithResponse(StartRecordingOptions options) Start recording of the call.Stop recording of the call.stopWithResponse(String recordingId) Stop recording of the call.
-
Method Details
-
start
Start recording of the call.- Parameters:
options- AStartRecordingOptionsobject containing different options for recording.- Returns:
- Response for a successful start recording request.
- Throws:
InvalidParameterException- is recordingStateCallbackUri is absolute uri.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
startWithResponse
public Mono<com.azure.core.http.rest.Response<RecordingStateResult>> startWithResponse(StartRecordingOptions options) Start recording of the call.- Parameters:
options- AStartRecordingOptionsobject containing different options for recording.- Returns:
- Response for a successful start recording request.
- Throws:
InvalidParameterException- is recordingStateCallbackUri is absolute uri.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
stop
Stop recording of the call.- Parameters:
recordingId- Recording id to stop.- Returns:
- Response for a successful stop recording request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
stopWithResponse
Stop recording of the call.- Parameters:
recordingId- Recording id to stop.- Returns:
- Response for a successful stop recording request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
pause
Pause recording of the call.- Parameters:
recordingId- Recording id to stop.- Returns:
- Response for a successful pause recording request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
pauseWithResponse
Pause recording of the call.- Parameters:
recordingId- Recording id to stop.- Returns:
- Response for a successful pause recording request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
resume
Resume recording of the call.- Parameters:
recordingId- Recording id to stop.- Returns:
- response for a successful resume recording request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
resumeWithResponse
Resume recording of the call.- Parameters:
recordingId- Recording id to stop.- Returns:
- response for a successful resume recording request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getState
Get current recording state by recording id.- Parameters:
recordingId- Recording id to stop.- Returns:
- Response for a successful get recording state request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getStateWithResponse
public Mono<com.azure.core.http.rest.Response<RecordingStateResult>> getStateWithResponse(String recordingId) Get current recording state by recording id.- Parameters:
recordingId- Recording id to stop.- Returns:
- Response for a successful get recording state request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
downloadStream
Download the recording content, e.g. Recording's metadata, Recording video, from the ACS endpoint passed as parameter.- Parameters:
sourceUrl- - URL where the content is located.- Returns:
- A
Fluxobject containing the byte stream of the content requested.
-
downloadStreamWithResponse
public Mono<com.azure.core.http.rest.Response<Flux<ByteBuffer>>> downloadStreamWithResponse(String sourceUrl, com.azure.core.http.HttpRange range) Download the recording content, (e.g. Recording's metadata, Recording video, etc.) from theendpoint.- Parameters:
sourceUrl- - URL where the content is located.range- - An optionalHttpRangevalue containing the range of bytes to download. If missing, the whole content will be downloaded.- Returns:
- A
Monoobject containing aResponsewith the byte stream of the content requested.
-
downloadContent
Reads the entire content.Code Samples
This method supports downloads up to 2GB of data. Use
downloadStream(String)()} to download larger blobs.- Parameters:
sourceUrl- - URL where the content is located.- Returns:
- A reactive response containing the content data.
-
downloadContentWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> downloadContentWithResponse(String sourceUrl, com.azure.core.http.HttpRange range) Reads a range of bytes from a content.This method supports downloads up to 2GB of data. Use
downloadStreamWithResponse(String, HttpRange)to download larger blobs.- Parameters:
sourceUrl- - URL where the content is located.range- - An optionalHttpRangevalue containing the range of bytes to download. If missing, the whole content will be downloaded.- Returns:
- A reactive response containing the blob data.
-
downloadTo
Download the content located inendpointinto a file marked bypath. This download will be done using parallel workers.- Parameters:
sourceUrl- - ACS URL where the content is located.destinationPath- - File location.- Returns:
- Response for a successful downloadTo request.
-
downloadTo
Download the content located inendpointinto a file marked bypath. This download will be done using parallel workers.- Parameters:
sourceUrl- - ACS URL where the content is located.destinationPath- - File location.options- - an optionalDownloadToFileOptionsobject to modify how the download will work.- Returns:
- Response containing the http response information from the download.
-
delete
Delete the content located at the deleteUrl- Parameters:
deleteUrl- - ACS URL where the content is located.- Returns:
- Response for successful delete request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteWithResponse
Delete the content located at the deleteUrl Recording deletion will be done using parallel workers.- Parameters:
deleteUrl- - ACS URL where the content is located.- Returns:
- Response for successful delete request.
- Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.
-