/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace KinesisVideoWebRTCStorage { /** *

*/ class AWS_KINESISVIDEOWEBRTCSTORAGE_API KinesisVideoWebRTCStorageClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods { public: typedef Aws::Client::AWSJsonClient BASECLASS; static const char* SERVICE_NAME; static const char* ALLOCATION_TAG; typedef KinesisVideoWebRTCStorageClientConfiguration ClientConfigurationType; typedef KinesisVideoWebRTCStorageEndpointProvider EndpointProviderType; /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ KinesisVideoWebRTCStorageClient(const Aws::KinesisVideoWebRTCStorage::KinesisVideoWebRTCStorageClientConfiguration& clientConfiguration = Aws::KinesisVideoWebRTCStorage::KinesisVideoWebRTCStorageClientConfiguration(), std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG)); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ KinesisVideoWebRTCStorageClient(const Aws::Auth::AWSCredentials& credentials, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::KinesisVideoWebRTCStorage::KinesisVideoWebRTCStorageClientConfiguration& clientConfiguration = Aws::KinesisVideoWebRTCStorage::KinesisVideoWebRTCStorageClientConfiguration()); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ KinesisVideoWebRTCStorageClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::KinesisVideoWebRTCStorage::KinesisVideoWebRTCStorageClientConfiguration& clientConfiguration = Aws::KinesisVideoWebRTCStorage::KinesisVideoWebRTCStorageClientConfiguration()); /* Legacy constructors due deprecation */ /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ KinesisVideoWebRTCStorageClient(const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ KinesisVideoWebRTCStorageClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ KinesisVideoWebRTCStorageClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration); /* End of legacy constructors due deprecation */ virtual ~KinesisVideoWebRTCStorageClient(); /** *

Join the ongoing one way-video and/or multi-way audio WebRTC session as a * video producing device for an input channel. If there’s no existing session for * the channel, a new streaming session needs to be created, and the Amazon * Resource Name (ARN) of the signaling channel must be provided.

Currently * for the SINGLE_MASTER type, a video producing device is able to * ingest both audio and video media into a stream, while viewers can only ingest * audio. Both a video producing device and viewers can join the session first, and * wait for other participants.

While participants are having peer to peer * conversations through webRTC, the ingested media session will be stored into the * Kinesis Video Stream. Multiple viewers are able to playback real-time media.

*

Customers can also use existing Kinesis Video Streams features like * HLS or DASH playback, Image generation, and more with * ingested WebRTC media.

Assume that only one video producing device * client can be associated with a session for the channel. If more than one client * joins the session of a specific channel as a video producing device, the most * recent client request takes precedence.

See Also:

AWS * API Reference

*/ virtual Model::JoinStorageSessionOutcome JoinStorageSession(const Model::JoinStorageSessionRequest& request) const; /** * A Callable wrapper for JoinStorageSession that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::JoinStorageSessionOutcomeCallable JoinStorageSessionCallable(const JoinStorageSessionRequestT& request) const { return SubmitCallable(&KinesisVideoWebRTCStorageClient::JoinStorageSession, request); } /** * An Async wrapper for JoinStorageSession that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void JoinStorageSessionAsync(const JoinStorageSessionRequestT& request, const JoinStorageSessionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&KinesisVideoWebRTCStorageClient::JoinStorageSession, request, handler, context); } void OverrideEndpoint(const Aws::String& endpoint); std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const KinesisVideoWebRTCStorageClientConfiguration& clientConfiguration); KinesisVideoWebRTCStorageClientConfiguration m_clientConfiguration; std::shared_ptr m_executor; std::shared_ptr m_endpointProvider; }; } // namespace KinesisVideoWebRTCStorage } // namespace Aws