haiyangwu / mediasoup-client-android

mediasoup android client side library https://mediasoup.org
MIT License
178 stars 107 forks source link

transport.produce() failed with exception: json.exception.type_error.302 with v3.4.0 #65

Closed grebulon closed 1 year ago

grebulon commented 1 year ago

Whenever calling: Producer producer = transport.produce(this, track, null, null, "{"type":"microphone","paused":0}"); I get an error: [json.exception.type_error.302] type must be string, but is number If I set "paused":"0" I get another json.exception.type_error.302 about an empty array (!?) I'm getting a similar error for video where the codec options are {"videoGoogleStartBitrate":1000} and appData is {"type":"camera","deviceId":"1","paused":0}

With mediasoup-client:3.4.0 implementation 'io.github.haiyangwu:mediasoup-client:3.4.0'

haiyangwu commented 1 year ago

public Producer produce( Producer.Listener listener, MediaStreamTrack track, List encodings, String codecOptions, String codec, String appData)

The fifth parameter is codec which was added in this version.

On Wed, Jan 4, 2023 at 12:10 AM grebulon @.***> wrote:

Whenever calling: Producer producer = transport.produce(this, track, null, null, "{"type":"microphone","paused":0}"); I get an error: [json.exception.type_error.302] type must be string, but is number If I set "paused":"0" I get another json.exception.type_error.302 about an empty array (!?) I'm getting a similar error for video where the codec options are {"videoGoogleStartBitrate":1000} and appData is {"type":"camera","deviceId":"1","paused":0}

With mediasoup-client:3.4.0 implementation 'io.github.haiyangwu:mediasoup-client:3.4.0'

— Reply to this email directly, view it on GitHub https://github.com/haiyangwu/mediasoup-client-android/issues/65, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOBOGWGC55D4SEFGD2IWDDWQRFQ5ANCNFSM6AAAAAATP3B62U . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Haiyang Wu @.***>

grebulon commented 1 year ago

The fifth parameter is codec which was added in this version.

It think that if you change function prototypes, it's better to make it in a way that will break compilation, so that it will be more visible. Thank you for the quick response and for the work that you put into this 🙏

haiyangwu commented 1 year ago

It's a good point, I'll make this change in the next version.

On Wed, Jan 4, 2023 at 6:30 PM grebulon @.***> wrote:

The fifth parameter is codec which was added in this version.

It think that if you change function prototypes, it's better to make it in a way that will break compilation, so that it will be more visible. Thank you for the quick response and for the work that you put into this 🙏

— Reply to this email directly, view it on GitHub https://github.com/haiyangwu/mediasoup-client-android/issues/65#issuecomment-1370748849, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOBOGRBZNJRD3B5HKCMKZTWQVGLTANCNFSM6AAAAAATP3B62U . You are receiving this because you modified the open/close state.Message ID: @.***>

-- Haiyang Wu @.***>