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
' b'Content-Type: image/jpeg
' +
bytearray(self.frame) + b'
')
The response is generating, but how can I post this generated result in an HTML template ?
question from:
https://stackoverflow.com/questions/65916675/djangohow-to-show-streaminghttprespomse-as-a-video 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…