Sending Video Stream from Front-end(angularjs) to Backend(Django)

736 views Asked by At

I want to pass video frame from Front-end(angularjs) to Back-end(Django) for video sreaming. for that I had followed below link. https://github.com/aiortc/aiortc/tree/master/examples/server

For Django, I had used Django-celery Tasks for asynchronuos function. I tried to pass RtcPeerConnection object(as arguement) into celery task that time I got below error

TypeError: Object of type RTCPeerConnection is not JSON serializable

Traceback (most recent call last): File "/home/loksun/.local/lib/python3.6/site-packages/kombu/serialization.py", line 50, in _reraise_errors yield File "/home/loksun/.local/lib/python3.6/site-packages/kombu/serialization.py", line 221, in dumps payload = encoder(data) File "/home/loksun/.local/lib/python3.6/site-packages/kombu/utils/json.py", line 70, in dumps **dict(default_kwargs, **kwargs)) File "/usr/lib/python3/dist-packages/simplejson/init.py", line 399, in dumps **kw).encode(obj) File "/usr/lib/python3/dist-packages/simplejson/encoder.py", line 291, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/lib/python3/dist-packages/simplejson/encoder.py", line 373, in iterencode return _iterencode(o, 0) File "/home/loksun/.local/lib/python3.6/site-packages/kombu/utils/json.py", line 59, in default return super(JSONEncoder, self).default(o) File "/usr/lib/python3/dist-packages/simplejson/encoder.py", line 268, in default o.class.name) TypeError: Object of type RTCPeerConnection is not JSON serializable

Any hint will be appreciated. Thank you!

0

There are 0 answers