Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed youtube video without youtube link

as you know that when you Embed youtube video in your web page, it works fine , but if you click on any part of screen, youtube website will open in new window.

is there any way to Embed youtube video in our website, but disable that youtube website opening when click on screen to pause the video?

or you can play you tube video in other player..?

i am looking for way around it.

any way possibility in j query, ajax, java script or PHP, mootools etc. Thanks

like image 487
air Avatar asked Jan 04 '10 19:01

air


3 Answers

try this:

it is from youtube API sample, so it should be official supported important is &version=3 or &something=xx;version=3

<object style="height: 390px; width: 640px">
<param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?version=3">
<param name="allowFullScreen" value="true">
<param name="allowScriptAccess" value="always">
<embed src="http://www.youtube.com/v/u1zgFlCw8Aw?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object>
like image 125
Ondrej Galbavý Avatar answered Oct 19 '22 08:10

Ondrej Galbavý


You shouldn't do that. If you need a video-host who keeps their branding off of your screen, I suggest http://blip.tv. You can transfer your videos there via a FTP (they make it available to all users), and even customize your own player with your own branding.

like image 7
Sampson Avatar answered Oct 19 '22 07:10

Sampson


there are a few ways to do this like (depending on your programmer skills):

REQUIRE JS knowledge: - use the JS api from google and disable the normal buttons and add customs buttons and events (there are a lot of examples in their documentation)

NO PROGRAMMER skills:

  • use another player
  • and the way i did: i put a DIV ontop of the player (except the part where the seek/controls are). This prevents the user to click on a desired part of the embedded player but allows you to still use the controls (play/pause/seek/view in youtube)

USAGE for above solutions: - if you want to click on the player and trigger an action without starting to play the Youtube video - disable: youtube click / open youtube in another window

HOPE THIS WILL HELP YOU

like image 2
George Oslobanu Avatar answered Oct 19 '22 09:10

George Oslobanu