0

I'm a begginer, and I need your help :) I have a simple landing page, made from one long jpg + image mapping. I've embedded a youtube video in a specific location on the image as an object command but I want to show a different image until it is pressed (an image with a play button, for example).

The page will be shown on a facebook tab as well.

Can any1 help me?

P.S - Sorry if I have grammar mistakes :)

Thanks!

OrenK
  • 3
  • 6

2 Answers2

0

Using JavaScript: You could add a Listener to the image so once it is pressed it loads a video.

var image = new Image(); //Image with playbutton


//Then load your Video in the EventListener
image.onclick("load", function() {
                    alert("loaded");

The function() method will contain the code to run your video

This is a good link about EventListeners http://idratherbewriting.com/javascript/events-and-listeners-javascript/

Lt_Shade
  • 590
  • 1
  • 7
  • 18
  • Thank you, my question wasn't accurate enough so I posted it again with my code and specifications. I appreciate your effort and thank you for your help! the new question is here: http://goo.gl/fXwiWw – OrenK Nov 27 '13 at 13:43
0

Pretty sure a placeholder can be implemented via the Youtube API or you could take a look at this, How to add a splash screen/placeholder image for a YouTube video

Community
  • 1
  • 1
PI.
  • 1,658
  • 4
  • 19
  • 33
  • Thank you, my question wasn't accurate enough so I posted it again with my code and specifications. I appreciate your effort and thank you for your help! the new question is here: goo.gl/fXwiWw – OrenK Nov 27 '13 at 13:50