webrtcHacks / adapter

Shim to insulate apps from spec changes and prefix differences. Latest adapter.js release:
https://webrtcHacks.github.io/adapter/adapter-latest.js
BSD 3-Clause "New" or "Revised" License
3.63k stars 845 forks source link

unable to set frame rate on safari #1144

Closed saikrishnanamburi closed 12 months ago

saikrishnanamburi commented 12 months ago

frameRate is is not changing on safari even on getdisplaymedia() constraints

this is the code async setFrameRate(frameRate: number){ let senderList =await this.rtcPeerConnection.getSenders(); senderList.forEach((sender: any) => { if(sender.track && sender.track.kind == 'video'){ let ice = sender.transport.iceTransport; let pair = ice.getSelectedCandidatePair(); if(pair.local.address == "xxx.xxx.xx.xx"){ const parameters = sender.getParameters(); console.log('track parameters',JSON.stringify(parameters.encodings)); parameters.encodings[0].maxFramerate = frameRate; sender.setParameters(parameters); console.log('updated track parameters',JSON.stringify(parameters.encodings)); console.log('local and remote ice candiate'); console.log(pair.local); console.log(pair.remote); }else{ console.log('sharing on local Network frame rate is set to default'); } } }); }

Expected behavior: Stream at 8 fps. Observed behavior: No change in fps.

logs

before updating video parameters

"[{\"rid\":\"\",\"active\":true,\"fec\":{\"ssrc\":257},\"maxBitrate\":0,\"maxFramerate\":0,\"networkPriority\":\"low\",\"priority\":\"low\",\"rtx\":{\"ssrc\":0},\"scaleResolutionDownBy\":1,\"ssrc\":838448214}]"

after updating video parameters

"[{\"rid\":\"\",\"active\":true,\"fec\":{\"ssrc\":257},\"maxBitrate\":0,\"maxFramerate\":3,\"networkPriority\":\"low\",\"priority\":\"low\",\"rtx\":{\"ssrc\":0},\"scaleResolutionDownBy\":1,\"ssrc\":838448214}]"

WEBRTC version : 8.2.3

safari version : 17.1

hori205 commented 12 months ago

unsubscribe

bilibvivo commented 12 months ago

unsubscribe

On Mon, 20 Nov 2023 at 22:16, hori205 @.***> wrote:

unsubscribe

— Reply to this email directly, view it on GitHub https://github.com/webrtcHacks/adapter/issues/1144#issuecomment-1819149053, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZI2EE6BRPZFEXUS2ERIGDYFNQ5BAVCNFSM6AAAAAA7S7LFMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJZGE2DSMBVGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

hori205 commented 12 months ago

unsubscribe

fippo commented 12 months ago

As noted in the template that was deleted, this repository is not the place for generic WebRTC issues.

Folks who need to unsubscribe please find the button in the github ui.