question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sdp transform error

See original GitHub issue

I am rearranging the order of the codecs so that h264 is first but on android to ios calls im getting an encoding undefined error on one of the callbacks on RCTPeerConnection.

As I have seen in my logs, Is it because android does not have h264? @zxcpoiu @saghul

//check and replace for H264 codec
function preferH264(description) {
  let newDescription = description;
  let sdp = description.sdp;
  let parsedSdp = transform.parse(sdp);

  parsedSdp.media = parsedSdp.media.map(media => {
    if(media.type === 'video') {
      const baseRtp = [media.rtp.find(rtp => rtp.codec.toLowerCase() === 'h264')];
      media.rtp = baseRtp.concat(media.rtp);
    }

    return media;
  });

  newDescription.sdp = transform.write(parsedSdp);

  return newDescription;
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brunsycommented, Nov 8, 2017

@jjdp you are adding an undefined into the rtp list in cases where the codec is not found…

1reaction
zxcpoiucommented, Nov 7, 2017

One of the easiest way to see which codec it supports, is to create offer without any constraints then see the codec list in sdp in different platform.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sdp transform parse webrtc sdp error · Issue #64 · clux/sdp-transform ...
yes, it is sdp string. maybe it is because of i change the bandwidth of the sdp. if i do not change the...
Read more >
sdp-transform - npm
A simple parser/writer for the Session Description Protocol. Latest version: 2.14.1, last published: 2 years ago. Start using sdp-transform ...
Read more >
How to use the sdp-transform.parse function in sdp-transform | Snyk
To help you get started, we've selected a few sdp-transform.parse examples ... res, {localSdp: sdp})) .catch((err) => { logger.error(err, 'Error replying to ...
Read more >
transform package - github.com/gearghost/sdp/transform - Go ...
func Parse(sdp string) (sdpStruct *SdpStruct, err error). type SimulCastItem; type Simulcast03Struct; type SimulcastStruct; type SsrcGroupStruct ...
Read more >
WebRTC SDP Parsing error with GeckoFX - Stack Overflow
Why does this occur? When invoking pc.setRemoteDescription(sessionDescription, successCallback, errorCallback); your stack is parsing the sessionDescription ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found