var determineWebcamStreamType = function (streamUrl) {
    if (!streamUrl) {
        throw "Empty streamUrl. Cannot determine stream type.";
    }

    var parsed = validateWebcamUrl(streamUrl);
    if (!parsed) {
        throw "Invalid streamUrl. Cannot determine stream type.";
    }

    if (parsed.protocol === "webrtc:") {
        return "webrtc";
    }

    var lastDotPosition = parsed.pathname.lastIndexOf(".");
    if (lastDotPosition !== -1) {
        var extension = parsed.pathname.substring(lastDotPosition + 1);
        if (extension.toLowerCase() === "m3u8") {
            return "hls";
        }
    }

    // By default, 'mjpg' is the stream type.
    return "mjpg";
};
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.