Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConsumerOptions.rtpCapabilities field is not optional #403

Closed
wants to merge 1 commit into from

Conversation

nazar-pc
Copy link
Collaborator

It is also not optional according to documentation

@ibc
Copy link
Member

ibc commented May 14, 2020

Not accurate. In fact, if you run npm run typescript:watch it will fail:

src/Router.ts:743:53 - error TS2345: Argument of type '{ producerId: string; }' is not assignable to parameter of type 'ConsumerOptions'.
  Property 'rtpCapabilities' is missing in type '{ producerId: string; }' but required in type 'ConsumerOptions'.

743  			pipeConsumer = await localPipeTransport.consume({ producerId });
     			                                                ~~~~~~~~~~~~~~

  src/Consumer.ts:21:2
    21  rtpCapabilities: RtpCapabilities;
        ~~~~~~~~~~~~~~~
    'rtpCapabilities' is declared here.

[5:13:05 PM] Found 1 error. Watching for file changes.

This is because, in pipeTransport.consume(), field rtpCapabilities is not needed and not given.

@ibc ibc closed this May 14, 2020
@nazar-pc nazar-pc deleted the patch-1 branch May 14, 2020 15:16
@nazar-pc
Copy link
Collaborator Author

Then it is documentation issue?
https://mediasoup.org/documentation/v3/mediasoup/api/#ConsumerOptions

Either way having optional field for WebRTC Transport where it is not optional is confusing.

@ibc
Copy link
Member

ibc commented May 14, 2020

Yep, the API doc should be fixed. I've reported it and will fix eventually:

versatica/mediasoup-website#14

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants