Removing play button over Youtube player


#1

Hey guys,

is there any way to remove the play button that is displayed over the player once you cue the video?

Thanks,

marpies


#2

You will need to use loadVideo instead of cueVideo if you dont want that button.


#3

I’m aware of that, but I want the video just to be prepared for playing, not playing straight away.


#4

Well you cant remove the button in cueVideo mode.

If by prepared for playing you mean having a preview image, you can load a preview image of your own or you can use youtube API to load a preview image.


#5
Tean said

Well you cant remove the button in cueVideo mode.

If by prepared for playing you mean having a preview image, you can load a preview image of your own or you can use youtube API to load a preview image.

Right, I think loading the image will do the job. Is there an API function to get the path of the preview image? Or should I locate it myself - should be something like this…

http://img.youtube.com/vi/VIDEO-ID/0.jpg

Thanks Tean


#6

#7

will look into it, thanks so much Tean!


#8

Getting rid of the ugly play button has given me lots of headaches :sick:

Here’s how I got around this issue:

player.loadVideoById(_vID);//load the required YouTube video
player.pauseVideo();//pause the video
player.seekTo(0, true);//place the playhead at the very beginning of the video, and allowSeekAhead;
if (_autoPlay)
	player.playVideo();//start playing the loaded video if requested

I’ve tried using the stopVideo() method but it actually failed stopping the video. I’ve also tried lots of different approaches but that’s the only one that worked well. I’m not saying there aren’t other ways of doing so, I just have yet to find them :slight_smile:

Hope this helps :wink:


#9

I thought of that workaround but that would leave just a black rectangle, wouldn’t it? So I rather load the preview image.

Thank you for the effort Dani


#10
marpies said

I thought of that workaround but that would leave just a black rectangle, wouldn’t it?

Yes, unless the video starts with a anything other than a black screen :nerdy: at least that's what I get with my code


marpies said

Thank you for the effort Dani

Don't mention it :)

#11

And here’s the proof :slight_smile:

!http://i56.tinypic.com/b88jlk.png!
!http://i53.tinypic.com/15me4jo.png!
!http://i56.tinypic.com/mm5x6w.png!


#12

Oh yeh, obviously :slight_smile:

Envato should award you with a higher-level Superstar badge :wink:

Thanks again


#13
marpies said

Envato should award you with a higher-level Superstar badge :wink:

Thanks again

Aw :superbashfulcute: I’m blushin’ :smiley:
Nah, there are many other authors that deserve much more appreciation than me


#14

Well, if you think so :slight_smile:

I’m back to work, take care!


#15

The way I got around it was to load the poster image over the chromeless player and then add my own play button. The youtube play button is SOOOO ugly.


#16

@ MP good luck with YT :slight_smile:

@ Marc yeah that would be a good workaround