Youtube embedded player - show no recommendations (videos) at the end? - youtube

I have an am bedded youtube video in my site, but at the end of it, Youtube displays a set of recommendations (other videos) which I'd like to remove since they have nothing to do with my video.
Is that possible? Can't seem to find anything gin the Youtube embedded API :(

Just add ?rel=0 at the end of your video, &rel=0 no longer works
Example:
<iframe src="https://www.youtube.com/embed/hy9Cbp_yV5Y?rel=0"
width="100%" height="100%" frameborder="0"></iframe>

The trick is to attach to the player URL (http://www.youtube.com/v/Yc_J_kXaFSw) the rel=0 parameter.
The player URL will became http://www.youtube.com/v/Yc_J_kXaFSw&rel=0
The source of this information:
http://www.varesano.net/blog/fabio/disable%20related%20videos%20embedded%20youtube%20player
Just add &rel=0 at the end of your video url, this should remove the recommendations.

Related

how to loop two videos using youtube iframe code

I use the following code in my web page to successfully autoplay and loop one video. Now, I'd like to add another video, essentially looping two videos. So, after one video is finished playing, the second video will start to play, and then the first video, and so on, and so froth. How should the code be modified to do that?
<iframe width="560" height="315" src=
"https://www.youtube.com/embed/51xS4yXbryc?
rel=0&version=3&playlist=51xS4yXbryc&loop=1
&autoplay=1" frameborder="0" allowfullscreen=""></iframe>
That is a one-line code. I break it into four lines so it's easier to read.
For add more than one video in your iframe, you can use the following code:
https://www.youtube.com/embed/<VIDEO_ID_1>?rel=0&version=3&playlist=<VIDEO_ID_2>,<VIDEO_ID_3>,<VIDEO_ID_N>&loop=1&autoplay=1
Where:
VIDEO_ID_1: is the first videoId to reproduce.
VIDEO_ID_2, VIDEO_ID_3, VIDEO_ID_N and so on will be the videoIds you want include.
In this way, you can include a max of 196 or 200 videos in the same iframe1 that will autoplay and loop once the final videoId is reached.
This is a small sample with 4 videos on it.
This is another sample with 93 videos on it.
If you check this playlist, you'll see that it has more than 1000 videos on it - (1653 videos to be exact), but, the iframe resets the threshold to 196 or 200 videos approximately.
1 I discover this threshold when I tried to answer this question in Stack Overflow and you can check it by yourself if you enter to the Youtube website - this playlist and check that it will show only the first 200 videos on it.
This might be a threshold set (and undocumented) by YouTube.
A similar question was asked before about iframe and looping. I found this from another question on stackoverflow, a youtube link has a special ? parameter: autoplay. For example in this link
src="https://www.youtube.com/embed/M7lc1UVf-VE ?&autoplay=1& loop=1&rel=0&showinfo=0&color=white&iv_load_policy=3&playlist=M7lc1UVf-VE"
Try adding ?&autoplay=1& considering that worked for someone else.
I found it from
here
Update
If you wanna play multiple videos you can do it simply and embed a
playlist. You can find how to do so in this article at the
Embed a playlist section. Hope this helps.

Play music on background , Ruby on rails

What is SIMPLE and good practice to play background music in Rails App.
It's a really simple rails website. It has several static pages.
How do I playing music on background?
thanks!
I am not looking for detailed answer or code.
I just want somebody kindly point me some links, or some keywords I can search.
I googled around and did not find what I want/ Or I didnt realize that was I need.
with HTML 5, you can now use the tag like this. You can place this on any page that you want your music to play on. (layouts/application.html.erb if you want site-wide)
<audio src="public/my_audio_file.mp3" autoplay controls loop>
<p>Your browser does not support HTML5 audio playback</p>
</audio>
This link provides further details and options
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video
Add this to the pages on which you want the sound
<embed src="path/to/background.mp3" autostart="true" loop="true" hidden="true"><embed>
Add it to the layout if you want it in all the pages

Can someone explain the difference between these two Youtube URLs?

Im building a site which opens Youtube videos onsite using Shadowbox.
I have found out that linking to a video this way ...
http://www.youtube.com/watch?v=wDZFf0pm0SE
..doesn't work (Shadowbox opens, video doesnt play). But linking this way...
http://www.youtube.com/v/wDZFf0pm0SE
.. does.
Can someone explain to me what is going on here?
The /v/ link is a direct link to the video, which is used for embedding it. You use it like this:
<embed src="http://www.youtube.com/v/wDZFf0pm0SE&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="800" height="600"></embed>
However, due to licensing restrictions some videos will fail to play in the /v/ format.
The &autoplay=1 part just tells it to start the video on page-load. (Remove it to not do that).
The normal link is used to watch the video from Youtube itself.
Hope this helps.

how embedd youtube video in my webpage give me the steps to do that

hi hello i'm new in this forum and new in youtube
i also created a sample
let me tell the steps
copied a sample youtube html script from http://groboclown.net/yt_playlist/howto-embed-long.html
and on clicking the sampl.html it just show the youtube player black color that all
what is the problem i put an alert in the onYouTubePlayerReady() {
but its not printing any thing WHY? how can i do the youtube embeddig please help me any body how can i do it
is a webserver as (tomcat or jboss etc)is always needed for it then how can do this please help me any body can
The simplest way to embed a youtube on a webpage is to use the embed code provided on the youtube page the video is on. It normally looks like this:
<object width="640" height="385"><param name="movie" value="http://www.youtube.com
/v/ZZZZZZZZZZZ&hl=en_US&fs=1"></param><param name="allowFullScreen" value="true">
</param><param name="allowscriptaccess" value="always"></param><embed
src="http://www.youtube.com/v/ZZZZZZZZZZZ&hl=en_US&fs=1" type="application/x-
shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385">
</embed></object>
Where ZZZZZZZZZZZ is the video id.
The script you are using is for creating youtube playlists. It is possible they are not playing because either embedding is disabled for the video you are trying to play, or the actual URL is invalid. Youtube video IDs have a specific length, and most frequently, people mistake the ID field as the whole URI. It is not, and a Gdata resource of http://www.yout makes a very poor youtubeID.
I would suggest getting the firebug plugin for firefox to check for errors and monitor the javascript calls to make sure they are actually being called when clicked.
If you are using the youtube API, check your server log to see if the incorrect Gdata resource is being cUrled, otherwise this will = FAIL.
Normally, youtube videos are in an .flv file format, so re-embedding the video in a separate flash player might cause it to not work properly if the direct URL to that file is not accessible. Normally the raw .FLV is never accessable because this in turn is separate sub-FLV embedded within the youtube player flash object.

youtube: use youtube player in website

I am not sure , But is there any way to use YouTube video player for playing .flv file , which are stored in my own server.
any idea ?
I don't think so, you can only use it to play content hosted on their site, but there are plenty of other flash players around. Flowplayer is a common one, and there are loads more if you Google.
No.
You would have to upload the files to Youtube to use their player (which you can embed)
How ever there are many Youtube-like players (which will play .flv files on your own server), for example:
flvplayer
FPlayer
BitGravity
JW FLV Player
Flowplayer
Not that I'm aware of, but there are other options available that are very very similar.
Check out the JW Player here
I don't think so.
If you don't mind targetting just cutting-edge browsers though, you could make use of the HTML5 <video> tags:
<video src="path/to/your/video">Your browser doesn't support this.</video>
I know the beta versions of FF3.5 support this, but it is a new feature that's not widely supported yet.
Otherwise, use something like FlowPlayer as suggested in other responses.
Why not just upload the video to YouTube and embed the player?

Resources