No doubt another stupid newb question! I have a byte array in the Grails controller that contains the contents of the video file (more precisely, the * .mp4 file). I am familiar with how to display JSON, XML and other basic types from a grails controller, but I cannot find examples showing how to output video. In essence, I want to do the following:
render bytes as MP4
I understand that I probably need a construct like:
render(text:"<xml>some xml</xml>",contentType:"video/mpeg",encoding:"UTF-8")
but I do not understand how I can get an array of bytes. Obviously, I am not a specialist in rendering html-like content. I've been hiding behind library functions for too long! Any pointers to link or example would be highly appreciated.
So, if that helps point out the recommendations in the right direction, the bytes from the video come from the S3 object, which I read in the jets3t library.
source share