How to play videos in vaadin?
I used as a video component
Video video = new Video();
and built
Embedded embed = new Embedded("my video", new ExternalResource("yyy/xxx.mp4"));
embed.setMimeType("application/x-shockwave-flash");
This works well on the iphone which uses the Safari browser, but on my computer I use the Mozilla Firefox browser which it does not play.
It shows a similar error on the mime type.
+3
source to share
1 answer
You can test this code with the vaadin sampler:
Embedded e = new Embedded(null, new ExternalResource(
"http://www.youtube.com/v/meXvxkn1Y_8&hl=en_US&fs=1&"));
e.setAlternateText("Vaadin Eclipse Quickstart video");
e.setMimeType("application/x-shockwave-flash");
e.setParameter("allowFullScreen", "true");
e.setWidth("320px");
e.setHeight("265px");
addComponent(e);
It works for me in both chrome and firefox. I think your firefox add-ons might be causing this problem.
+1
source to share