Skip to content

Commit

Permalink
sample: ingestion feature default off
Browse files Browse the repository at this point in the history
  • Loading branch information
sirknightj committed Aug 24, 2023
1 parent 66fd1b0 commit 6c57e5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h4>Tracks</h4>
<p><small>List storage channels outputs the ARNs of all signaling channels configured for storage and their associated stream's ARN.</small></p>
</div>
<div class="form-group form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="ingest-media" value="audio" checked>
<input class="form-check-input" type="checkbox" id="ingest-media" value="audio">
<label for="sendAudio" class="form-check-label"><i>Ingestion and storage peer</i> joins automatically</label>
<span data-delay="{ &quot;hide&quot;: 1500 }" data-position="auto" tabindex="0" class="text-info ml-1" data-toggle="tooltip" data-html="true" title="
<p>If WebRTC Ingestion and Storage is configured, after connecting to Kinesis Video Signaling, this sample application will invoke the JoinStorageSession API to have the Kinesis video producing device join the WebRTC session as a viewer.</p>
Expand Down
4 changes: 2 additions & 2 deletions examples/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async function startMaster(localView, remoteView, formValues, onStatsReport, onR

const protocols = ['WSS', 'HTTPS'];

if (formValues.region?.toLowerCase() === 'us-west-2') {
if (formValues.region?.toLowerCase() === 'us-west-2' && formValues.ingestMedia) {
console.log('[MASTER] Attempting to use media ingestion feature.');
const describeMediaStorageConfigurationResponse = await kinesisVideoClient
.describeMediaStorageConfiguration({
Expand Down Expand Up @@ -353,7 +353,7 @@ function onPeerConnectionFailed() {
if (!master.websocketOpened) {
console.log('[MASTER] Websocket is closed. Reopening...');
master.signalingClient.open();
} else if (getFormValues().ingestMedia) {
} else if (master.streamARN) {
connectToMediaServer(++master.runId);
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async function startViewer(localView, remoteView, formValues, onStatsReport, onR
const channelARN = describeSignalingChannelResponse.ChannelInfo.ChannelARN;
console.log('[VIEWER] Channel ARN:', channelARN);

if (formValues.region?.toLowerCase() === 'us-west-2') {
if (formValues.region?.toLowerCase() === 'us-west-2' && formValues.ingestMedia) {
console.log('[VIEWER] Using media ingestion feature');
const mediaStorageConfiguration = await kinesisVideoClient
.describeMediaStorageConfiguration({
Expand Down

0 comments on commit 6c57e5e

Please sign in to comment.