Video component with byte[] as source

Hi, I’m trying display video from a byte array as follows:

Video mediaView = new Video("", new StreamResource(new StreamSource() {
					public InputStream getStream() {
						return new ByteArrayInputStream(byteArray);
				}, fileName));

When displaying the Video component video does not play, and in the lower part of the Video component message “Invalid source” appears. The problem is in the file, or the fact that I put a video from a byte array? I tried to upload the video in flv and mp4 formats. Tested in Opera and IE, result was the same.


This is my assumption:

1.) The class Video maps to the HTML 5 tag
, which needs a URL as Parameter. So, perhaps only a external resouce is valid.

2.) For our Vaadin project we implemented an own media servlet for video streaming, using following existing source as base:
which covers following problem accessing a video.

  • getting a range of the video - jumping inside the video