When an Amazon Interactive Video participant leaves the stage, stage remaining participants calls DELETE.

0

I has a code that handles the following stage events:

        const stage = new Stage(token, strategyRef.current);
        stage.on(StageEvents.STAGE_CONNECTION_STATE_CHANGED, handleConnectionStateChange);
        stage.on(StageEvents.STAGE_PARTICIPANT_JOINED, handleParticipantJoin);
        stage.on(StageEvents.STAGE_PARTICIPANT_LEFT, handleParticipantLeave);
        stage.on(StageEvents.STAGE_PARTICIPANT_STREAMS_ADDED, handleMediaAdded);
        stage.on(StageEvents.STAGE_PARTICIPANT_STREAMS_REMOVED, handleMediaRemoved);
        stage.on(StageEvents.STAGE_STREAM_MUTE_CHANGED, handleParticipantMuteChange);

In handleMediaRemoved function:

const handleMediaRemoved = (participantInfo, streams) => {

    const { id } = participantInfo;
    // remove media from the broadcast
    
    if (!isLocalParticipant(participantInfo)) {
        let participant = participants.get(id);
        const newStreams = participant.streams.filter(
            (existingStream) => !streams.find((removedStream) => existingStream.id === removedStream.id)
        );
        participant = { ...participant, streams: newStreams };
        console.log('handleMediaRemoved', participantInfo, streams);
    }
};

However, the library under neath calls DELETE REST function and failure every time the handleMediaRemoved is called. Is it a bug?

The js console displays

DELETE: https://video-rtx-5b5372.jfk04.rtx.live-video.net/sKPIj_O9pTIqkgZj/session/ga2DRCfyevVL/737d6033-9d8f-40eb-babc-55bc519d8489 404 (Not Found)

asked 7 months ago257 views
3 Answers
0
Accepted Answer

It's OK to safely ignore the 404 in this case. There is no impact on the stage functionality. The client is attempting to clean up a remote session that no longer exists because has already been cleaned up.

profile picture
answered 7 months ago
0

recursivecodes,

Thank you for your comment.

I shall ignore that all active IVS stage users' AWS libraries call DELETE IVS REST and get returned 404 when one stage user leaves.

( However, this calls could be cost-ful if there are large number of users on the stage. )

Best regards,

answered 7 months ago
0

recursivecodes,

Thank you for your comment.

Best regards,

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions