Monday, April 15, 2013

Embed Or Link To A YouTube Video With Annotations Turned Off Or On


When you embed a YouTube video in your website, the annotations are not turned on by default. The viewer has to click the small annotations link to turn on video annotations for the YouTube video. (see example on how to turn on video annotations for a YouTube video).
There can be situations when you may want to embed a YouTube video or link to the video in such a way that annotations are shown by default. Maybe your readers do not know how to turn on YouTube video annotations and you don’t want them to click another button just to see the annotations that you have added to one of your YouTube videos.
There are different URL hacks for YouTube which you can use to show or hide YouTube annotations by default, without requiring the user to explicitly click the annotations button, which he might not be aware of.
Here are some quick tips and tricks with YouTube annotations:
Embed a YouTube Video With Annotations Turned Off
Use the following code (remember to replace XXXXXXXXXXX with the ID of the YouTube video which you want to embed)
<object width=”425″ height=”344″<param name=”movie” value=”http://www.youtube.com/v/XXXXXXXXXXX&fs=1&iv_load_policy=3“></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><<embed src=”http://www.youtube.com/v/XXXXXXXXXXX&fs=1&iv_load_policy=3” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”425″ height=”344″></embed></object>
The trick here is to add iv_load_policy=3 to the video embed code, if you do not want to show video annotations.

Embed a YouTube Video With Annotations Turned On By default

Use the following code (remember to replace XXX with the ID of the YouTube video which you want to embed with annotations turned on by default)
<object width=”425″ height=”344″<param name=”movie” value=”http://www.youtube.com/v/XXXXXXXXXXX&fs=1&iv_load_policy=1“></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><<embed src=”http://www.youtube.com/v/XXXXXXXXXXX&fs=1&iv_load_policy=1” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”425″ height=”344″></embed></object>
You can use the iFrame embed code for a YouTube video and choose not to show annotations. Use this code
<iframe width=”640″height=”360″src=”http://www.youtube.com/embed/XXXXXXXXXXX&iv_load_policy=3“frameborder=”0″allowfullscreen>

Link to a YouTube Video with Annotations Turned off

Similar to the embed code, you can choose to link to a YouTube video in such a way that annotations are not shown by default, when someone clicks the link. Use the following format:
http://www.youtube.com/embed/HNrgK8h2xBc?autoplay=1&iv_load_policy=3
The only catch here is that the video will open in full screen mode and not in a regular small window.

Link to a YouTube Video With Annotations Turned On By Default

If you want to link toa YouTube video and automatically show annotations when it starts playing, use the following format:
http://www.youtube.com/embed/HNrgK8h2xBc?autoplay=1&iv_load_policy=1
Recently, I made a couple of tutorial videos at my workplace, I used video annotations to convey a message to my  audience. However, I was surprised to see that no one from the audeince actually cared to turn on annotations, some of them didn’t even knew that YouTube has a feature called annotations. I had to tell them how to turn on annotations and it was a big turn-off, going to each desk and explaining to everyone that they need to turn on annotations before watching the video.
This trick should be useful if you want more control on how annotations are displayed in YouTube videos. For more information on tweaking YouTube annotations, please read this support page.

0 nhận xét:

Post a Comment