I am developing a mobile webpage and I have to import two youtube videos on it. The video has to expand and start playing when I click on that video. The video has been attained using javascript and html.

My problem here is that I have coded the javascript with 2 different embedded youtube code snippets but it takes the video code of the second section of javascript and applies it to both the videos. So please help me to make each of these videos play their respective video based on the embedded code.

Thank you so much.. It worked like charm.. But how it is working in the JS fiddle sanchit?
–
krishna moorthyFeb 18 '13 at 9:40

i have a small question. can we expand the image size of the video before it is clicked. ?
–
krishna moorthyFeb 18 '13 at 10:14

Sure, just edit your css. img.thumb {width:500px;height:500px;} You'll probably need a higher resolution image though. You are adding the image name in the javascript. 0.jpg is the highest resolution image. your choices are 0,1,2 and 3.jpg. You are currently using 1.jpg.
–
SanchitFeb 18 '13 at 11:06

another request. please let me know how do i change the image for this videos. thanks in advance
–
krishna moorthyFeb 18 '13 at 12:20

Put in a different url for thumbnail_url? :\ Too much copy pasting, I think. Try and understand what you are doing, man!
–
SanchitFeb 18 '13 at 13:02