问题
I used both video component
Video video = new Video();
and embedded
Embedded embed = new Embedded("my video", new ExternalResource("yyy/xxx.mp4"));
embed.setMimeType("application/x-shockwave-flash");
This plays quite well in iphone which uses safari browser, but in my pc am using mozilla firefox browser its not playing.
It shows an like error in mime type.
回答1:
Can you check this code from 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 both chrome and firefox. I think your firefox addons may cause this problem.
来源:https://stackoverflow.com/questions/14561222/how-to-play-video-in-vaadin