serik cupcake
serik cupcake

Reputation: 13

WebRTC/Jitsi Media Track constraints

JitsiMeetJS.createLocalTracks({
  devices: [ 'audio', 'video' ],
  cameraDeviceId: settings.videoInput,
  micDeviceId: settings.audioInput,
  constraints: {
    width: {
    min: 320,
    ideal: 640,
    max: 640     

  },
    height: {
      min: 240,
      ideal: 480,
      max: 480
    },
  },
})

So I have this video conferencing project, I am using jitsi, which sets by default video quality to 720, that is too much for my needs. Therefore I am trying to cut it with media constraints settings. But when I am running the app, I don't see any visible changes.

How to check whether media constraints were succesfully applied?

Upvotes: 1

Views: 836

Answers (1)

Igor Khvostenkov
Igor Khvostenkov

Reputation: 744

In chrome open you conferencing with running video and then in the other tab open chrome://webrtc-internals/, find you active video track, info there is real time data and looks like this:

RTCMediaStreamTrack_sender_5 (track)
Statistics RTCMediaStreamTrack_sender_5
timestamp   17/05/2019, 13:58:28
trackIdentifier 14751ea7-586c-4ac9-a2f4-46e0488dcb42
mediaSourceId   RTCVideoSource_5
remoteSource    false
ended   false
detached    false
kind    video
frameWidth  1920
frameHeight 1200
framesSent  4021
[framesSent/s]  29.954856717750335
hugeFramesSent  3

Another way would be to analyze RTP packets inside your framework. If you need this info just to proof and would be used only once, check WebRTC-internals.

Upvotes: 1

Related Questions