|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 8 | +import { |
| 9 | + KinesisVideoWebRTCStorageClientResolvedConfig, |
| 10 | + ServiceInputTypes, |
| 11 | + ServiceOutputTypes, |
| 12 | +} from "../KinesisVideoWebRTCStorageClient"; |
| 13 | +import { JoinStorageSessionAsViewerInput } from "../models/models_0"; |
| 14 | +import { de_JoinStorageSessionAsViewerCommand, se_JoinStorageSessionAsViewerCommand } from "../protocols/Aws_restJson1"; |
| 15 | + |
| 16 | +/** |
| 17 | + * @public |
| 18 | + */ |
| 19 | +export type { __MetadataBearer }; |
| 20 | +export { $Command }; |
| 21 | +/** |
| 22 | + * @public |
| 23 | + * |
| 24 | + * The input for {@link JoinStorageSessionAsViewerCommand}. |
| 25 | + */ |
| 26 | +export interface JoinStorageSessionAsViewerCommandInput extends JoinStorageSessionAsViewerInput {} |
| 27 | +/** |
| 28 | + * @public |
| 29 | + * |
| 30 | + * The output of {@link JoinStorageSessionAsViewerCommand}. |
| 31 | + */ |
| 32 | +export interface JoinStorageSessionAsViewerCommandOutput extends __MetadataBearer {} |
| 33 | + |
| 34 | +/** |
| 35 | + * <p> |
| 36 | + * Join the ongoing one way-video and/or multi-way audio WebRTC session as |
| 37 | + * a viewer for an input channel. If there’s |
| 38 | + * no existing session for the channel, create a new streaming session and provide |
| 39 | + * the Amazon Resource Name (ARN) of the signaling channel (<code>channelArn</code>) |
| 40 | + * and client id (<code>clientId</code>). |
| 41 | + * </p> |
| 42 | + * <p>Currently for <code>SINGLE_MASTER</code> type, a video producing device |
| 43 | + * is able to ingest both audio and video media into a stream, while viewers |
| 44 | + * can only ingest audio. Both a video producing device and viewers can join |
| 45 | + * a session first and wait for other participants. While participants are having peer to peer conversations through WebRTC, |
| 46 | + * the ingested media session will be stored into the Kinesis Video Stream. |
| 47 | + * Multiple viewers are able to playback real-time media. |
| 48 | + * </p> |
| 49 | + * <p>Customers can also use existing Kinesis Video Streams features like |
| 50 | + * <code>HLS</code> or <code>DASH</code> playback, Image generation, and more |
| 51 | + * with ingested WebRTC media. If there’s an existing session with the same |
| 52 | + * <code>clientId</code> that's found in the join session request, the new request takes precedence.</p> |
| 53 | + * @example |
| 54 | + * Use a bare-bones client and the command you need to make an API call. |
| 55 | + * ```javascript |
| 56 | + * import { KinesisVideoWebRTCStorageClient, JoinStorageSessionAsViewerCommand } from "@aws-sdk/client-kinesis-video-webrtc-storage"; // ES Modules import |
| 57 | + * // const { KinesisVideoWebRTCStorageClient, JoinStorageSessionAsViewerCommand } = require("@aws-sdk/client-kinesis-video-webrtc-storage"); // CommonJS import |
| 58 | + * const client = new KinesisVideoWebRTCStorageClient(config); |
| 59 | + * const input = { // JoinStorageSessionAsViewerInput |
| 60 | + * channelArn: "STRING_VALUE", // required |
| 61 | + * clientId: "STRING_VALUE", // required |
| 62 | + * }; |
| 63 | + * const command = new JoinStorageSessionAsViewerCommand(input); |
| 64 | + * const response = await client.send(command); |
| 65 | + * // {}; |
| 66 | + * |
| 67 | + * ``` |
| 68 | + * |
| 69 | + * @param JoinStorageSessionAsViewerCommandInput - {@link JoinStorageSessionAsViewerCommandInput} |
| 70 | + * @returns {@link JoinStorageSessionAsViewerCommandOutput} |
| 71 | + * @see {@link JoinStorageSessionAsViewerCommandInput} for command's `input` shape. |
| 72 | + * @see {@link JoinStorageSessionAsViewerCommandOutput} for command's `response` shape. |
| 73 | + * @see {@link KinesisVideoWebRTCStorageClientResolvedConfig | config} for KinesisVideoWebRTCStorageClient's `config` shape. |
| 74 | + * |
| 75 | + * @throws {@link AccessDeniedException} (client fault) |
| 76 | + * <p>You do not have required permissions to perform this operation.</p> |
| 77 | + * |
| 78 | + * @throws {@link ClientLimitExceededException} (client fault) |
| 79 | + * <p> |
| 80 | + * Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later. |
| 81 | + * </p> |
| 82 | + * |
| 83 | + * @throws {@link InvalidArgumentException} (client fault) |
| 84 | + * <p>The value for this input parameter is invalid.</p> |
| 85 | + * |
| 86 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 87 | + * <p>The specified resource is not found.</p> |
| 88 | + * |
| 89 | + * @throws {@link KinesisVideoWebRTCStorageServiceException} |
| 90 | + * <p>Base exception class for all service exceptions from KinesisVideoWebRTCStorage service.</p> |
| 91 | + * |
| 92 | + * @public |
| 93 | + */ |
| 94 | +export class JoinStorageSessionAsViewerCommand extends $Command |
| 95 | + .classBuilder< |
| 96 | + JoinStorageSessionAsViewerCommandInput, |
| 97 | + JoinStorageSessionAsViewerCommandOutput, |
| 98 | + KinesisVideoWebRTCStorageClientResolvedConfig, |
| 99 | + ServiceInputTypes, |
| 100 | + ServiceOutputTypes |
| 101 | + >() |
| 102 | + .ep({ |
| 103 | + ...commonParams, |
| 104 | + }) |
| 105 | + .m(function (this: any, Command: any, cs: any, config: KinesisVideoWebRTCStorageClientResolvedConfig, o: any) { |
| 106 | + return [ |
| 107 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 108 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 109 | + ]; |
| 110 | + }) |
| 111 | + .s("AWSAcuityRoutingServiceLambda", "JoinStorageSessionAsViewer", {}) |
| 112 | + .n("KinesisVideoWebRTCStorageClient", "JoinStorageSessionAsViewerCommand") |
| 113 | + .f(void 0, void 0) |
| 114 | + .ser(se_JoinStorageSessionAsViewerCommand) |
| 115 | + .de(de_JoinStorageSessionAsViewerCommand) |
| 116 | + .build() {} |
0 commit comments