grantfayvor / hexcord-mediaserver

WebRTC to RTMP media server heavily inspired by https://github.com/pion/webrtc/tree/master/examples/rtp-forwarder
Apache License 2.0
58 stars 12 forks source link

Error while unmarshal offerStr to offer. #4

Closed maddygoround closed 3 years ago

maddygoround commented 3 years ago

I am getting an error at json.Unmarshal([]byte(offerStr), &offer). Any reasons why it does not work?

grantfayvor commented 3 years ago

Hey @maddygoround Sorry for the late response. Notification got lost.

Confirm that offerStr is a valid JSON string of an offer object.

https://github.com/grantfayvor/hexcord-mediaserver/blob/856b3f879b972100023d7c50caf1f540d46c01ba/lib/webrtc.go#L22

maddygoround commented 3 years ago

Thanks. I am able to solve this. I was sending the base64 content of the offer.