Problem hide and show FlashMediaPlayer

44 views
Skip to first unread message

devGWT

unread,
Apr 27, 2012, 5:40:20 AM4/27/12
to bst-player
Hi

I'm developing a large project with video Flash.
I'm using the "BST-Player" with the FlashMediaPlayer in some situation
i need to hide and show the player and i also need to resize the
video.

To resize the video i'm using the TransformationMatrix and it works
fine

TransformationMatrix tm = player.getMatrix();
tm.toIdentity();
tm.scale(sW, sH);
player.setMatrix(tm);

I had some problems in hidding the player and then showing:

When i create the player i do:

player = new FlashMediaPlayer(rtmp,true,"100%","100%");
player.setConfigParameter(ConfigParameter.TransparencyMode,
TransparencyMode.OPAQUE);
player.setStylePrimaryName("CSS_Style");
player.setControllerVisible(false);

when i show the player i lost the scale and the controller appears.
What can i do?

Thanks for the help

devGWT

unread,
Apr 27, 2012, 1:59:33 PM4/27/12
to bst-player
to be more precise it returns this error:

Caused by: com.google.gwt.core.client.JavaScriptException:
(TypeError): Object [object HTMLEmbedElement] has no method 'play'
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
248)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
136)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:
289)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:
107)
at
com.bramosystems.oss.player.core.client.impl.FlashMediaPlayerImpl
$.playMedia$(FlashMediaPlayerImpl.java)
at
com.bramosystems.oss.player.core.client.ui.FlashMediaPlayer.playMedia(FlashMediaPlayer.java:
402)

So i have the player in a AbsolutePanel and in some time of my program
i put the absolutePanel,setvisibley(false)
ant for the error it seems that the player does not exists when the
absolute panel visibility is set to true.

Can someone help me to do a workaround for this error?
Reply all
Reply to author
Forward
0 new messages