Skip to content

join_storage_session_as_viewer

join_storage_session_as_viewer(
    channel_arn: ChannelArn,
    client_id: ClientId,
    *,
    config_overrides: Optional[KinesisVideoWebRTCStorageClientConfig] = None,
) -> None

Join the ongoing one way-video and/or multi-way audio WebRTC session as a viewer for an input channel. If there’s no existing session for the channel, create a new streaming session and provide the Amazon Resource Name (ARN) of the signaling channel (channelArn) and client id (clientId).

Currently for 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 a 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. If there’s an existing session with the same clientId that's found in the join session request, the new request takes precedence.

Parameters:

  • channel_arn (ChannelArn) –

    The Amazon Resource Name (ARN) of the signaling channel.

  • client_id (ClientId) –

    The unique identifier for the sender client.

Raises:

Source code in docs_src/capo_kinesis_video_webrtc_storage/_services/kinesis_video_web_rtc_storage.py
def join_storage_session_as_viewer(
    self,
    channel_arn: "capo_kinesis_video_webrtc_storage.types.channel_arn.ChannelArn",
    client_id: "capo_kinesis_video_webrtc_storage.types.client_id.ClientId",
    *,
    config_overrides: Optional[KinesisVideoWebRTCStorageClientConfig] = None,
) -> None:
    """<p> Join the ongoing one way-video and/or multi-way audio WebRTC session as a viewer for an input channel. If there’s no existing session for the channel, create a new streaming session and provide the Amazon Resource Name (ARN) of the signaling channel (<code>channelArn</code>) and client id (<code>clientId</code>). </p> <p>Currently for <code>SINGLE_MASTER</code> 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 a 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. </p> <p>Customers can also use existing Kinesis Video Streams features like <code>HLS</code> or <code>DASH</code> playback, Image generation, and more with ingested WebRTC media. If there’s an existing session with the same <code>clientId</code> that's found in the join session request, the new request takes precedence.</p>

    Args:
        channel_arn: <p> The Amazon Resource Name (ARN) of the signaling channel. </p>
        client_id: <p> The unique identifier for the sender client. </p>

    Raises:
        capo_kinesis_video_webrtc_storage.errors.access_denied_exception.AccessDeniedException: <p>You do not have required permissions to perform this operation.</p>
        capo_kinesis_video_webrtc_storage.errors.client_limit_exceeded_exception.ClientLimitExceededException: <p> Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later. </p>
        capo_kinesis_video_webrtc_storage.errors.invalid_argument_exception.InvalidArgumentException: <p>The value for this input parameter is invalid.</p>
        capo_kinesis_video_webrtc_storage.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource is not found.</p>
        capo_kinesis_video_webrtc_storage.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_kinesis_video_webrtc_storage.types.join_storage_session_as_viewer_input.JoinStorageSessionAsViewerInput]",
    ) -> OperationResponse[None]:
        import capo_kinesis_video_webrtc_storage._operations.aws_acuity_routing_service_lambda.join_storage_session_as_viewer

        output, http_response = (
            capo_kinesis_video_webrtc_storage._operations.aws_acuity_routing_service_lambda.join_storage_session_as_viewer.join_storage_session_as_viewer(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("JoinStorageSessionAsViewer")
    )
    input_: capo_kinesis_video_webrtc_storage.types.join_storage_session_as_viewer_input.JoinStorageSessionAsViewerInput = {
        "channel_arn": channel_arn,
        "client_id": client_id,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output