Skip to content

type inconsistency in payloads #94

@kekkokk

Description

@kekkokk

When the payload is only one, a number is returned. when there are multiple payloads a string is returned.
I think we should have a consistency to be able to safely parse those fields

See the following example:

media: [
  {
    rtp: [Array],
    fmtp: [],
    type: 'audio',
    port: 1,
    protocol: 'UDP/TLS/RTP/SAVPF',
    payloads: 111, <----------------------------------------------------
    connection: [Object],
    rtcp: [Object],
    setup: 'actpass',
    mid: 'audio',
    direction: 'sendrecv',
    iceUfrag: '1ayI',
    icePwd: 'qKHZWyBE5t576gA675kDri',
    fingerprint: [Object],
    candidates: [Array],
    endOfCandidates: 'end-of-candidates',
    ssrcs: [Array],
    rtcpMux: 'rtcp-mux'
  },
  {
    rtp: [Array],
    fmtp: [Array],
    type: 'video',
    port: 1,
    protocol: 'UDP/TLS/RTP/SAVPF',
    payloads: '96 100', <----------------------------------------------------
    connection: [Object],
    rtcp: [Object],
    rtcpFb: [Array],
    setup: 'actpass',
    mid: 'video',
    direction: 'sendrecv',
    iceUfrag: '1ayI',
    icePwd: 'qKHZWyBE5t576gA675kDri',
    fingerprint: [Object],
    candidates: [Array],
    endOfCandidates: 'end-of-candidates',
    ssrcs: [Array],
    rtcpMux: 'rtcp-mux'
  }
]

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions