My django project returns an HttpStreamingRespons that contains frames of a video:
views.py
@condition(etag_func=None)
def broadcast(request):
global current_user_cam
cc = current_vudeo.update()
print(type(cc))
resp = HttpResponse(cc)
return render(rtsp)
current_video.update()
def update():
while True:
yield(b'--frame\r\n' b'Content-Type: image/jpeg\r\n\r\n' +
bytearray(self.frame) + b'\r\n')
The response is generating, but how can I post this generated result in an HTML template ?
You can directly render html string in response
– Siva Sankar Jan 27 '21 at 09:57").