"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class RTCRtpCodecParameters {
    constructor(init) {
        this.payloadType = init.payloadType;
        this.clockRate = init.clockRate;
        this.mimeType = init.mimeType;
        this.channels = init.channels ? init.channels : null;
        this.sdpFmtpLine = init.sdpFmtpLine ? init.sdpFmtpLine : null;
        Object.freeze(this);
    }
    toJSON() {
        const obj = {
            payloadType: this.payloadType,
            clockRate: this.clockRate,
            mimeType: this.mimeType
        };
        if (this.channels !== null) {
            obj['channels'] = this.channels;
        }
        if (this.sdpFmtpLine !== null) {
            obj['sdpFmtpLine'] = this.sdpFmtpLine;
        }
        return obj;
    }
}
exports.default = RTCRtpCodecParameters;
//# sourceMappingURL=RTCRtpCodecParameters.js.map