genkikuchi / bst-player

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

Flash Video invisible when started inside PopupPanel #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a GWT application with the appropriate bst-player references
2. Create a PopupPanel using the provided code below
3. When the application starts the video window will be a large black square 
with audio heard.
4. If you click the full-screen toggle, the application will move to 
full-screen and video will appear
5. If you click the full-screen toggle again, the application will return to 
normal only this time the video will be visible

What is the expected output? What do you see instead?
Expect to see video but only seeing a black box and hearing audio.

Please use labels and text to provide additional information.

Create a simple GWT application with proper bst-player library and XML 
references.  Use this as the main entry point:

public void onModuleLoad() {
    final String fileUrl = "http://www.selikoffsolutions.com/3590.flv";
    final PopupPanel popup = new PopupPanel();
    AbstractMediaPlayer player;
    Widget mp = null;
    try {
        player = new FlashMediaPlayer(fileUrl, true);
        player.setResizeToVideoSize(true);
        popup.setSize("500px", "500px");
        mp = player;
    } catch (PluginNotFoundException e) {
        mp = PlayerUtil.getMissingPluginNotice(Plugin.FlashPlayer,e.getMessage());
    } catch (PluginVersionException e) {
        mp = PlayerUtil.getMissingPluginNotice(Plugin.FlashPlayer,e.getRequiredVersion());
    } catch (LoadException e) {
        mp = PlayerUtil.getMissingPluginNotice(Plugin.FlashPlayer);
    }
    popup.add(mp);
    popup.show();
}

Original issue reported on code.google.com by sselik...@gmail.com on 30 Nov 2010 at 5:32

GoogleCodeExporter commented 8 years ago
I was able to reproduce the bug.  Actually it has nothing to do with 
PopupPanel, it also occurs if player is added as is to any panel.  

The bug comes up when initial player height is less than 30px, which is the 
case with the constructor in use.  This is a feature intended to hide the 
display area of the player when playing audio files. Obviously their is need to 
find a way around it.

Original comment by sbrah...@gmail.com on 2 Dec 2010 at 4:34

GoogleCodeExporter commented 8 years ago
That was my mistake, I simplified the code and removed the height/width.  The 
issue still occurs in my application although not in the test application.  
I'll see what I can do to reproduce it in a sandbox application.

Original comment by scott@selikoff.net on 2 Dec 2010 at 6:00

GoogleCodeExporter commented 8 years ago
Committed r198 to address the issue. Can you confirm if it works for your use 
case?

Original comment by sbrah...@gmail.com on 3 Dec 2010 at 9:50

GoogleCodeExporter commented 8 years ago
I'm still looking into the issue.  Did you mean to check in:

trunk/bst-flash-player/index.html

It contains a link to one of my websites.  I believe the changes for that file 
need to be reverted.

Original comment by scott@selikoff.net on 7 Dec 2010 at 4:15

GoogleCodeExporter commented 8 years ago
I was able to reproduce the bug with a completely different constructor, one in 
which the size is set.  Please confirm with the code below.

    public void onModuleLoad() {
        final String fileUrl = "http://www.selikoffsolutions.com/3590.flv";
        final PopupPanel popup = new PopupPanel();
        AbstractMediaPlayer player;
        Widget mp = null;
        try {
            player = new FlashMediaPlayer(fileUrl, true,"464px","620px");
            player.setResizeToVideoSize(false);
            popup.setSize("620px","464px");
            mp = player;
        } catch (PluginNotFoundException e) {
            mp = PlayerUtil.getMissingPluginNotice(Plugin.FlashPlayer,e.getMessage());
        } catch (PluginVersionException e) {
            mp = PlayerUtil.getMissingPluginNotice(Plugin.FlashPlayer,e.getRequiredVersion());
        } catch (LoadException e) {
            mp = PlayerUtil.getMissingPluginNotice(Plugin.FlashPlayer);
        }
        popup.add(mp);
        popup.show();
    }

Original comment by scott@selikoff.net on 7 Dec 2010 at 4:46

GoogleCodeExporter commented 8 years ago
The index.html is updated, that was an error!

Committed r199 with some fix.  Though the Player.as/updateVDUSize() still needs 
to be looked into to overcome streaching/cropping issues ...

Original comment by sbrah...@gmail.com on 8 Dec 2010 at 2:55

GoogleCodeExporter commented 8 years ago
Streaching/cropping issue fixed.

Original comment by sbrah...@gmail.com on 10 Feb 2011 at 2:32