简体   繁体   English

如何将jwplayer嵌入到Google Web Toolkit应用程序中?

[英]How to embed jwplayer into google web toolkit application?

glad to ask my first question in Stack Overflow :) 很高兴在Stack Overflow中问我的第一个问题:)
At work I'm developing a google web toolkit application and I need to embed a jwplayer inside it. 在工作中,我正在开发一个Google Web工具包应用程序,并且需要在其中嵌入一个jwplayer。

Do you have any suggestion about how to achieve this? 您对如何实现这一目标有任何建议吗? I found gwt2swf but so far I couldn't make it work. 我找到了gwt2swf,但是到目前为止我无法使它工作。
I have written this: 我写了这个:

SWFWidget jwplayer = new SWFWidget("player.swf");
panel.add(jwplayer);

however I don't get the player, rather a message claiming that I don't have a proper flash player installed: 但是我没有得到播放器,而是一条消息,声称我没有安装适当的Flash播放器:

Here should be a swf movieclip. 这应该是SWF MovieClip。 You probably don't have FlashPlayer installed or have a PlayerVersion lower than 7.0.14. 您可能没有安装FlashPlayer或PlayerVersion低于7.0.14。

Where should the file player.swf be located? 文件player.swf应该放在哪里?
I tried to place it in the war directory alongside the main html file or on a remote http server but I always get that message... 我试图将其放置在主html文件旁边的war目录中或远程http服务器上,但是我总是收到该消息...

Any suggestions? 有什么建议么? Thanks!! 谢谢!!

Sorry, I found the reason it was not working, I didn't set the size of the jwplayer. 抱歉,我发现它无法正常工作的原因,没有设置jwplayer的大小。 Something like this: 像这样:

SWFWidget jwplayer = new SWFWidget("player.swf", 100, 100);
panel.add(jwplayer);

will work :) 将工作 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM