init method

dynamic init(
  1. BaseSession<dynamic, PeerConnection> callSession
)

Implementation

init(BaseSession callSession) {
  this.callSession = callSession;

  callSession.statsReports.listen((statsReport) {
    statsReport.stats.removeWhere((stat) =>
        stat.type != 'inbound-rtp' &&
        stat.type != 'ssrc' &&
        stat.type != 'media-source' &&
        stat.type != 'track');

    calculateMicLevel(statsReport);
    calculateVideoBitrate(statsReport);
  });
}