3 Replies - 2032 Views - Last Post: 30 September 2011 - 08:16 PM Rate Topic: -----

#1 itdoell  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 239
  • Joined: 13-January 11

Put a play button over a YouTube thumbnail on upload?

Posted 30 September 2011 - 05:13 PM

So I have it so if a user links a video it grabs the thumbnail from YouTube, but what I want to do is overlay a play button on the video on upload (then a second version for when you hover over it). Right now I have it so it's just a separate play button over the other image, but the jquery/javascript I use for hovering purposes causes problems on iPhone/iPad applications. So I would like to just attach the play button directly to it.

Is this possible to do in PHP? Can I center one image over another (while keeping transparency etc)? Any help is appreciated, thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: Put a play button over a YouTube thumbnail on upload?

#2 supercorey  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 119
  • View blog
  • Posts: 207
  • Joined: 15-February 09

Re: Put a play button over a YouTube thumbnail on upload?

Posted 30 September 2011 - 07:51 PM

Well, yes and no. PHP does have graphics manipulations capabilities: PHP GD, but this won't help much in this scenario because there is a larger over-arching problem: you have to use some sort of client-side language for this application. PHP, being of a sever-side nature, can't do anything about hovering or mouse events, all it can do is generate the page. I don't really deal with mobile browsers much so I can't offer you any suggestions on how to make the Javascript with jQuery work, but there's my two cents on your problem.
Was This Post Helpful? 1
  • +
  • -

#3 itdoell  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 239
  • Joined: 13-January 11

Re: Put a play button over a YouTube thumbnail on upload?

Posted 30 September 2011 - 08:14 PM

View Postsupercorey, on 30 September 2011 - 07:51 PM, said:

Well, yes and no. PHP does have graphics manipulations capabilities: PHP GD, but this won't help much in this scenario because there is a larger over-arching problem: you have to use some sort of client-side language for this application. PHP, being of a sever-side nature, can't do anything about hovering or mouse events, all it can do is generate the page. I don't really deal with mobile browsers much so I can't offer you any suggestions on how to make the Javascript with jQuery work, but there's my two cents on your problem.

Thanks for your help. The hovering I know I have to do client side, and if I can just stick the play button on the image then I can just create two versions of it and have it change using :hover in css, which doesn't interfere with mobile browsers. I can't do that now because I need to set it up so the play button will change when the main image is hovered over, and that can't be done with CSS.
Was This Post Helpful? 0
  • +
  • -

#4 supercorey  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 119
  • View blog
  • Posts: 207
  • Joined: 15-February 09

Re: Put a play button over a YouTube thumbnail on upload?

Posted 30 September 2011 - 08:16 PM

Ah, so if your goal is to create two images, by all means use PHP GD. It's generally compiled with most version of PHP (you can use phpinfo() to find out for sure) and allows image manipulation on the fly. You would have a page on your server (called button.php) or the like which would create the image, and you would reference it client-side with an <img> tag. You could pass the PHP creating the image arguments or anything.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1