handleSender(sender, kind, participantId) {
        if (sender[kVideoAPIE2EE]) {
            return;
        }
        sender[kVideoAPIE2EE] = true;

        let senderStreams;

        if (sender.createEncodedStreams) {
            senderStreams = sender.createEncodedStreams();
        } else {
            senderStreams = kind === 'video' ? sender.createEncodedVideoStreams()
                : sender.createEncodedAudioStreams();
        }

        this._worker.postMessage({
            operation: 'encode',
            readableStream: senderStreams.readable || senderStreams.readableStream,
            writableStream: senderStreams.writable || senderStreams.writableStream,
            participantId
        }, [ senderStreams.readable || senderStreams.readableStream,
            senderStreams.writable || senderStreams.writableStream ]);
    }
/**
     * Handles the given {@code RTCRtpSender} by creating a {@code TransformStream} which will inject
     * a frame encoder.
     *
     * @param {RTCRtpSender} sender - The sender which will get the encoding function injected.
     * @param {string} kind - The kind of track this sender belongs to.
     * @param {string} participantId - The participant id that this sender belongs to.
     */
Handles the given  RTCRtpSender by creating a  TransformStream which will inject
a frame encoder.

@param {RTCRtpSender} sender - The sender which will get the encoding function injected.
@param {string} kind - The kind of track this sender belongs to.
@param {string} participantId - The participant id that this sender belongs to.
Handles the given RTCRtpSender by creating a TransformStream which will inject a frame encoder . @param { RTCRtpSender } sender - The sender which will get the encoding function injected . @param { string } kind - The kind of track this sender belongs to . @param { string } participantId - The participant id that this sender belongs to .
handleSender(sender, kind, participantId) {
        if (sender[kVideoAPIE2EE]) {
            return;
        }
        sender[kVideoAPIE2EE] = true;
        let senderStreams;
        if (sender.createEncodedStreams) {
            senderStreams = sender.createEncodedStreams();
        } else {
            senderStreams = kind === 'video' ? sender.createEncodedVideoStreams()
                : sender.createEncodedAudioStreams();
        }
        this._worker.postMessage({
            operation: 'encode',
            readableStream: senderStreams.readable || senderStreams.readableStream,
            writableStream: senderStreams.writable || senderStreams.writableStream,
            participantId
        }, [ senderStreams.readable || senderStreams.readableStream,
            senderStreams.writable || senderStreams.writableStream ]);
    }
handleSender ( sender , kind , participantId ) { if ( sender [ kVideoAPIE2EE ] ) { return ; } sender [ kVideoAPIE2EE ] = true ; let senderStreams ; if ( sender . createEncodedStreams ) { senderStreams = sender . createEncodedStreams ( ) ; } else { senderStreams = kind === 'video' ? sender . createEncodedVideoStreams ( ) : sender . createEncodedAudioStreams ( ) ; } this . _worker . postMessage ( { operation : 'encode' , readableStream : senderStreams . readable || senderStreams . readableStream , writableStream : senderStreams . writable || senderStreams . writableStream , participantId } , [ senderStreams . readable || senderStreams . readableStream , senderStreams . writable || senderStreams . writableStream ] ) ; }
Handles the given {@code RTCRtpSender} by creating a {@code TransformStream} which will inject
 a frame encoder.
Handles the given { @code RTCRtpSender } by creating a { @code TransformStream } which will inject a frame encoder .