如何在 vaadin 中播放视频? [英] How to play video in vaadin?

查看:31
本文介绍了如何在 vaadin 中播放视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了两个视频组件

Video video = new Video();

和嵌入

Embedded embed = new Embedded("my video", new ExternalResource("yyy/xxx.mp4")); 
embed.setMimeType("application/x-shockwave-flash");

这在使用 safari 浏览器的 iphone 中播放得很好,但在我的电脑中使用的是 mozilla firefox 浏览器,它无法播放.

This plays quite well in iphone which uses safari browser, but in my pc am using mozilla firefox browser its not playing.

它在 mime 类型中显示类似错误.

It shows an like error in mime type.

推荐答案

你能从 vaadin sampler 中查看这段代码吗:

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);

它对我来说既适用于 chrome 也适用于 Firefox.我认为您的 Firefox 插件可能会导致此问题.

It works for me both chrome and firefox. I think your firefox addons may cause this problem.

这篇关于如何在 vaadin 中播放视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆