src/js/rtc_session.js
/**
     * Attach remote media stream to web element.
     */
Attach remote media stream to web element.
Attach remote media stream to web element .
_ontrack(evt) {
        if (evt.streams.length > 1) {
            this._logger.warn('Found more than 1 streams for ' + evt.track.kind + ' track ' + evt.track.id + ' : ' +
                evt.streams.map(stream => stream.id).join(','));
        }
        if (evt.track.kind === 'video' && this._remoteVideoElement) {
            this._remoteVideoElement.srcObject = evt.streams[0];
            this._remoteVideoStream = evt.streams[0];
        } else if (evt.track.kind === 'audio' && this._remoteAudioElement) {
            this._remoteAudioElement.srcObject = evt.streams[0];
            this._remoteAudioStream = evt.streams[0];
        }
        this._onRemoteStreamAdded(this, evt.streams[0]);
    }
_ontrack ( evt ) { if ( evt . streams . length > 1 ) { this . _logger . warn ( 'Found more than 1 streams for ' + evt . track . kind + ' track ' + evt . track . id + ' : ' + evt . streams . map ( stream => stream . id ) . join ( ',' ) ) ; } if ( evt . track . kind === 'video' && this . _remoteVideoElement ) { this . _remoteVideoElement . srcObject = evt . streams [ 0 ] ; this . _remoteVideoStream = evt . streams [ 0 ] ; } else if ( evt . track . kind === 'audio' && this . _remoteAudioElement ) { this . _remoteAudioElement . srcObject = evt . streams [ 0 ] ; this . _remoteAudioStream = evt . streams [ 0 ] ; } this . _onRemoteStreamAdded ( this , evt . streams [ 0 ] ) ; }
Attach remote media stream to web element.
Attach remote media stream to web element .