spring mvc - Streaming video from controller to html5 video player -


we trying following

  • upload video s3 bucket stream -- done
  • read stream in java controller -- done
  • use stream play video in html5 video player. --pending

note: video size can huge. looking @ best way stream video.

when use below code in controller doesn't work stream. instead tries download entire video , tries play content. note works fine videos less 5 mb fails other. there other approaches acheive ?

final string contenttype =     stringutils.isblank(obj.getcontenttype())                 ? mediatype.application_octet_stream_value                 : obj.getcontenttype(); return responseentity.ok()          .contentlength(obj.getcontentlength())          .header("content-type", contenttype)          .body(new inputstreamresource(obj.getcontent())); 


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -