-
Notifications
You must be signed in to change notification settings - Fork 634
Description
Pre-Migration Checklist
- I've read the Migration Guide.
- I've reviewed the upgrading notes and major version differences mentioned in
UPGRADING.md
. - I've checked AWS Forums and StackOverflow for similar migration issues.
Which JavaScript Runtime is this issue in?
Browser
AWS Lambda Usage
- Yes, my application is running on AWS Lambda.
- No, my application is not running on AWS Lambda.
Describe the Migration Issue
The documentation on the Kinesis Web Video (especially the WebRTC storage, but also the signaling client changes from v2 to v3) is very difficult to understand and seems incomplete.
The first sentence of the JoinStorageSessionCommand says this:
"Before using this API, you must call the GetSignalingChannelEndpoint API to request the WEBRTC endpoint. You then specify the endpoint and region in your JoinStorageSession API request."
No problem. I've obtained the WEBRTC endpoint easily from the GetSignalingChannelEndpoint. No where in the documentation does it show how to include the endpoint with the request. The JoinStorageSessionCommand only takes "channelArn" as input. I see "endpoint" in the KinesisVideoWebRTCStorageClient, but have been unsuccessful on figuring out how to provide it to the client.
This sample syntax does not give any indication on how to get this to work:
import { KinesisVideoWebRTCStorageClient, JoinStorageSessionCommand } from "@aws-sdk/client-kinesis-video-webrtc-storage"; // ES Modules import
// const { KinesisVideoWebRTCStorageClient, JoinStorageSessionCommand } = require("@aws-sdk/client-kinesis-video-webrtc-storage"); // CommonJS import
const client = new KinesisVideoWebRTCStorageClient(config);
const input = { // JoinStorageSessionInput
channelArn: "STRING_VALUE", // required
};
const command = new JoinStorageSessionCommand(input);
const response = await client.send(command);
I cannot figure out how to proceed. The v2 version would use callbacks on the signalingclient (for example: signalingClient.on('open',...), but that does not appear to work anymore.
Code Comparison
No response
Observed Differences/Errors
The lack of callbacks on the signaling channel in v3 and no mention I can find in the documentaton on how to handle the peerConnection to stream video into Kinesis Video where it is ingested and stored makes it nearly impossible to migrate from v2 to v3. What am I missing?
Additional Context
No response