How to play video in vaadin?

帅比萌擦擦* 提交于 2020-01-23 10:01:28

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!