This message was deleted.
# helpdesk
s
This message was deleted.
f
Yeah, it is a hint to encoder. MDN documentation on WebRTC is super useful - https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
c
this documentation is regarding bandwidth restrictions ?? and as an hint means that bandwidth must be aroung 1700kbps near about 1700 kbps
f
Yeah, the constraints specify how the track should be encoded. So, 1700 kbps is a constraint on bit rate. It is a longer term average. Encoder could overshoot/undershoot under some conditions, but longer window rate will be at that specified rate.
c
okk I had set in the following function
Copy code
private async publish(track: LocalTrack, opts: TrackPublishOptions, isStereo: boolean) {
before creating rtp sender in the encodings.
Copy code
// store RTPSender
    encodings[0].maxBitrate=VideoPresets.h720.encoding.maxBitrate
    encodings[0].active=true
    <http://log.info|log.info>("//SHAHDEBUG encoding before creating sender",encodings)
    track.sender = await this.engine.createSender(track, opts, encodings);
    log.debug("//shahdebug: creating rtp sender")
it is then capping it to 1700kbps .. is it a right pl;ace to handle it..??
f
Not sure what you are trying to do. Layers should be set via
TrackPublishOptions
rather than modifying SDK code - https://docs.livekit.io/client-sdk-js/interfaces/TrackPublishOptions.html#videoSimulcastLayers
c
I am trying to capping the video bandwidth with maxBitrate mentioned in
h720: new VideoPreset(1280, 720, 1_700_000, 5),
For this where should I change ?
f
Please read
TrackPublishOptions
documentation and choose settings. You can use preset already available in SDK or make up your own.
c
I am using available preset only h720 .. but my problem is ,the maxbitrate specified in that preset is not getting set .. so I am trying to set that explicitly
f
Please file a bug if what you set via API is not working properly. That needs to be fixed.
c
okk I will do that but first I am trying to figure out myself.. where is the problem . ]
👍🏽 1