use of com.amazonaws.kinesisvideo.internal.client.mediasource.MediaSourceConfiguration in project aws-sdk-android by aws-amplify.
the class CameraUtils method getCameras.
/**
* Lists only cameras by getting known media sources known to the KinesisVideoClient
*/
public static List<CameraMediaSourceConfiguration> getCameras(final KinesisVideoClient kinesisVideoClient) {
final List<CameraMediaSourceConfiguration> cameras = new ArrayList<CameraMediaSourceConfiguration>();
for (final MediaSourceConfiguration.Builder mediaSourceConfiguration : kinesisVideoClient.listSupportedConfigurations()) {
if (!(mediaSourceConfiguration instanceof CameraMediaSourceConfiguration.Builder)) {
continue;
}
final CameraMediaSourceConfiguration configuration = ((CameraMediaSourceConfiguration.Builder) mediaSourceConfiguration).build();
cameras.add(configuration);
}
return cameras;
}
Aggregations