wildside96 / bst-player

Automatically exported from code.google.com/p/bst-player
0 stars 0 forks source link

UIMode in WMP #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a WinMediaPlayer instance
2. call setUIMode (either immediately or using DeferredBinding)

What is the expected output? What do you see instead?
the UI Mode should change, it stays full.

What version of the product are you using? On what operating system?
1.0 on windows - chrome

Please provide any additional information below.
I have tried many ways to change the ui mode but never successed.

Also, i think it would be nice to be able to set the uimode in the 
constructor. PlayerScriptUtil.getWMPlayerScript would add the uiMode 
parameter for example.

Original issue reported on code.google.com by lve...@gmail.com on 19 Nov 2009 at 4:29

GoogleCodeExporter commented 9 years ago
I have a workaround: instead of using the setUIMode of the player, use:

private static void setUIMode(final WinMediaPlayer player, final 
WinMediaPlayer.UIMode uimode) {
    Timer t = new Timer() {
        @Override
        public void run() {
            NodeList<com.google.gwt.dom.client.Element> impl = 
player.getElement().getElementsByTagName("object");
            if (impl.getLength() == 0) {
                schedule(500);
            } else {
                Element mode = DOM.createElement("param");
                DOM.setElementProperty(mode, "name", "uiMode");
                DOM.setElementProperty(mode, "value", uimode.name().toLowerCase());
                impl.getItem(0).appendChild(mode);
            }
        }
    };
    t.schedule(500);
}

Original comment by lve...@gmail.com on 19 Nov 2009 at 5:44

GoogleCodeExporter commented 9 years ago

Original comment by sbrah...@gmail.com on 24 Nov 2009 at 11:13

GoogleCodeExporter commented 9 years ago
Appears to be a Chrome related issue specific to Chrome 3 and below. 
setUIMode() 
works with Chrome 4.0 (currently in dev channel)

However, as of SVN rev87 you can call:
 player.setConfigParameter(ConfigParameter.WMPUIMode, WinMediaPlayer.UIMode.MINI);

to set the UIMode.

Drawback:
Cannot be changed once player is attached to the panel.

Original comment by sbrah...@gmail.com on 16 Dec 2009 at 4:46

GoogleCodeExporter commented 9 years ago

Original comment by sbrah...@gmail.com on 17 Jun 2010 at 5:06