/    Sign up×
Community /Pin to ProfileBookmark

how to set wmode with tubeplayer plugin

Hi All

I’m using the tubeplayer ([url]http://www.tikku.com/jquery-youtube-tubeplayer-plugin#tubeplayer_tutorial_4[/url] )

However, to put something on top, like a div, on the youtube movie seems impossible (in Chrome).

Below is my test code, I’m trying to put the green square over the movie. It has to do with the wmode, its not set to ‘transparent’ somehow. Any suggestions ?

[CODE]
<html>
<head>
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js”></script>
<script src=”http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js”></script>
<script src=”http://www.tikku.com/scripts/ui/tubeplayer/jQuery.tubeplayer.min.js”></script>

<script>
$(function(){
jQuery(“#youtube-player-container”).tubeplayer({
width: 600, // the width of the player
height: 450, // the height of the player
allowFullScreen: “true”, // true by default, allow user to go full screen
initialVideo: “DkoeNLuMbcI”, // the video that is loaded into the player
preferredQuality: “default”,// preferred quality: default, small, medium, large, hd720
onPlay: function(id){}, // after the play method is called
onPause: function(){}, // after the pause method is called
onStop: function(){}, // after the player is stopped
onSeek: function(time){}, // after the video has been seeked to a defined point
onMute: function(){}, // after the player is muted
onUnMute: function(){} // after the player is unmuted
});
}) ;
</script>
</head>
<body>
<a href=”#” onClick=’jQuery(“#youtube-player-container”).tubeplayer(“play”)’>
Play video in player
</a>
<a href=”#” onClick=’jQuery(“#youtube-player-container”).tubeplayer(“pause”)’>
Pause player
</a>
<a href=”#” onClick=’jQuery(“#youtube-player-container”).tubeplayer(“stop”)’>
Stop player
</a>
<a href=”#” onClick=’jQuery(“#youtube-player-container”).tubeplayer(“mute”)’>
Mute player
</a>
<a href=”#” onClick=’jQuery(“#youtube-player-container”).tubeplayer(“unmute”)’>
Unmute player
</a>

<div id=’youtube-player-container’ style=”position:absolute;”> </div>
<div style=”height:200px;width:200px;position:absolute;top:0px;background-color:green;z-index:1000000″></div>
</body>
</html>
[/CODE]

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@nirvanatikkuJul 11.2011 — So the TubePlayer plugin by default prioritizes the HTML5 implementation, thus uses the new iframe embeddable player. This is the reason that you cannot do what you're trying to do.

If you toggle the 'iframed' option to 'false', and utilize the fallback flash player option, you should be all set.

Hope this helps,

-Nirvana
Copy linkTweet thisAlerts:
@nirvanatikkuAug 04.2011 — Hey jeanluca,

Better late than never - sorry this didn't happen sooner, but I just updated Tubeplayer with the ability to pass an additional option, 'wmode'. By default, 'wmode' is 'transparent'.

https://github.com/nirvanatikku/jQuery-TubePlayer-Plugin

Best,

Nirvana
Copy linkTweet thisAlerts:
@jeanlucaauthorAug 05.2011 — thats great. Thanks for the update!
×

Success!

Help @jeanluca spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...