wildside96 / bst-player

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

Setting wmode for YouTube through setConfigParameter() has no effect #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create YouTubePlayer instance and add to some panel,
2. Add wmode parameter: 
youTubePlayer.setConfigParameter(DefaultConfigParameter.TransparencyMode, 
(TransparencyMode) TransparencyMode.OPAQUE);
3. Create and display some popup panel.

What is the expected output? What do you see instead?
In IE9 YouTube flash widget will stay on top of the popup. This is not BST 
player issue, but IE + YouTube issue, but the parameter wmode=opaque should fix 
this problem (as described here: 
http://stackoverflow.com/questions/326196/ff3-windows-css-z-index-problem-with-y
outube-player). But setting it through setConfigParameter() doesn't seem to 
work.

What version of the product are you using? On what operating system? On
what browser/version?
BST Player 1.3, BST Player 2.0 SNAPSHOT,
Windows 7, IE9.

Please provide any additional information below.
I've modified YouTubePlayer.java like this:

### Eclipse Workspace Patch 1.0
#P BSTPlayer
Index: 
youtube-player-provider/src/main/java/com/bramosystems/oss/player/youtube/client
/YouTubePlayer.java
===================================================================
--- 
youtube-player-provider/src/main/java/com/bramosystems/oss/player/youtube/client
/YouTubePlayer.java (wersja 281)
+++ 
youtube-player-provider/src/main/java/com/bramosystems/oss/player/youtube/client
/YouTubePlayer.java (kopia robocza)
@@ -267,6 +267,7 @@
                 getNormalizedVideoAppURL(_vURL, pps), false);
         swf.addParam("allowScriptAccess", "always");
         swf.addParam("bgcolor", "#000000");
+        swf.addParam("wmode", "opaque");
         if (pps.isFullScreenEnabled()) {
             swf.addParam("allowFullScreen", "true");
         }

And after that everything works as expected (YouTube widget stays beneath a 
popup panel).

Anyway, thank you for your work and great library! I've also noticed the Vimeo 
player in the trunk. I've checked it out and it works great - I will use it in 
my project together with YouTube player widget.

- Krzysztof

Original issue reported on code.google.com by Krzyszto...@gmail.com on 12 Jan 2013 at 10:19

GoogleCodeExporter commented 9 years ago
Hi,

You should follow the steps instead:
1. Create YouTubePlayer instance,
2. Add wmode parameter: 
youTubePlayer.setConfigParameter(DefaultConfigParameter.TransparencyMode, 
TransparencyMode.OPAQUE);
3.  add player to some panel
4.  Create and display some popup panel.

Doing 'setConfigParameter' after adding player to panel HAS NO effect.  You 
should do it BEFORE.

HTH.

Original comment by sbrah...@gmail.com on 14 Jan 2013 at 10:34

GoogleCodeExporter commented 9 years ago
Hi,
I had been trying this approach already, but then I'm getting 
NullPointerException in YouTubePlayer.java, line 666:
swf.addParam("wmode", ((TransparencyMode) value).name().toLowerCase());

It's because "swf" variable is instanciated in onLoad() method:
    @Override
    protected void onLoad() {
        swf = new PlayerWidget(YouTubePlayerProvider.PROVIDER_NAME, "YouTube", playerId,
                getNormalizedVideoAppURL(_vURL, pps), false);
(...)

and it's  called after the widget is added to some panel. Before that "swf" is 
null.

Original comment by Krzyszto...@gmail.com on 14 Jan 2013 at 12:11

GoogleCodeExporter commented 9 years ago

Original comment by sbrah...@gmail.com on 15 Jan 2013 at 9:18

GoogleCodeExporter commented 9 years ago

Original comment by sbrah...@gmail.com on 14 May 2013 at 2:36