Since builds WCS 5.2.1663 and SFU SDK 2.0.231 player may switch between available ABR qualities automatically when playback channel state is changing. Automatic quality switching is based on the following WebRTC playback statistics data.

If any of these parameters leaps more than 10 points above, the channels is considered to be inappropriate to play a current video quality, and player will try to switch to a lower available quality.

Automatic quality switching parameters are set when calling initRemoteDisplay() function:

code

        // Create remote display item to show remote streams
        const displayOptions = {
            quality:true,
            autoAbr: true
        };
        const abrOptions = {
            thresholds: [
                {parameter: "nackCount", maxLeap: 10},
                {parameter: "freezeCount", maxLeap: 10},
                {parameter: "packetsLost", maxLeap: 10}
            ],
            abrKeepOnGoodQuality: ABR_KEEP_ON_QUALITY,
            abrTryForUpperQuality: ABR_TRY_UPPER_QUALITY,
            interval: ABR_QUALITY_CHECK_PERIOD
        };
        const display = initRemoteDisplay(
            state.room,
            document.getElementById("remoteVideo"),
            displayOptions, abrOptions,
            createDefaultMeetingController,
            createDefaultMeetingModel,
            createDefaultMeetingView,
            oneToOneParticipantFactory(remoteTrackProvider(state.room))
        );
        state.setDisplay(display);
        // Start WebRTC negotiation
        await state.room.join(state.pc, null, null, 1);

Where:

If any quality is manually chosen, it will be playing even if WebRTC statistics values are bad.