Click here to Skip to main content
12,511,553 members (47,743 online)
Click here to Skip to main content
Add your own
alternative version

Stats

71.8K views
26 bookmarked
Posted

YouTube® playback customization options

, 14 Feb 2015 CPOL
Rate this:
Please Sign up or sign in to vote.
Customize YouTube® video playback by adding web query parameters

Following examples demonstrate YouTube playback customization technique by adding web query parameters to the video URL (i.e. the links to YouTube video items).

Setting the video playback starting point

Setting the video playback starting point by specifying the offset-time in minutes and seconds from the beginning of video clip (in this example, it is set to 1min:10 sec, which will force the player to start the sample car video at "German Cars" fragment):
 
http://www.youtube.com/watch?v=NGRgHj9hsqw&t=1m10s[^],
 
where parameter "NGRgHj9hsqw" represents the actual video item ID in YouTube classification system; this is the mandatory part of YouTube URL string. Parameter &t=1m10s specifies the video playback starting point. Alternatively, it could be coded in the following format: #t=1m10s

Shortening video URL

Entire URL with added web query could be shortened by using, for example, Bit.ly service and look like: http://bit.ly/CarGer[^]); all customization options will be preserved in the short URL.

Full Screen Mode

Playback in a Full Screen mode: http://www.youtube.com/v/NGRgHj9hsqw[^], where NGRgHj9hsqw represents the video id.

Autoplay

Playback Autoplay option in a full-screen mode is set to "OFF" by default. In order to turn it "ON", add the parameter "&autoplay=1" to the end of the URL web query.

Loop

Playback Loop (number of video re-plays) could be specified by adding the following parameter: “&loop=2” to the end of the query to play the video twice or “&loop=3” to replay it three times and so on.

Related Videos option On/Off

Turn “OFF” the "Related Video" option to filter-off "extras" from the video port by adding “&rel=0” to the end of the web query.

 

Embedded YouTube Player (click on image to open DEMO)

Sample screen shot of embedded YouTube Player

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

DrABELL
President Infosoft International Inc
United States United States
Dr. A. Bell is a full-stack software developer (Win/Web/Mobile). He holds PhD in EE/IT, published 300+ articles, authored 37 inventions and is credited for 10+ Enterprise level projects; currently focused on HTML5/CSS3, Javascript/jQuery, .NET/WPF/C#, Android/Angular.js, 'Big Data', AI, IoT. Alex participated in App Innovation Contests (AIC 2102/2013) with multiple winning submissions. Sample projects/pubs:
  1. Real-time NY Bus monitoring app (IoT)
  2. Semaphon™ semantic phone num-to-text converter
  3. Educational Web Portal
  4. Free Online NY Payroll Tax Calculator
  5. WebTV powered by Embedded YouTube Player (Goog #1 YouTube API for ASP.NET)
  6. Top-50 Digital Cameras (powered by iMark-DCAM rating engine)
  7. Pure CSS3 Slide Show
  8. Inflation Calculator
  9. CSS3 Modal Pop-up Dialog
  10. Multilingual Geocoder with Interactive Map
  11. Online Semantic Analyzer (Concordance Calculator)
  12. NY City Job Market and Agency Ratings
  13. Advanced CSS3 Table Formatting

You may also be interested in...

Pro
Pro

Comments and Discussions

 
GeneralRe: To the member "brutuscat"- 1. I am giving you a second warni... Pin
DrABELL29-Mar-11 8:29
memberDrABELL29-Mar-11 8:29 
GeneralRe: To the member "brutuscat"- 1. You are wrong on your assumpti... Pin
DrABELL29-Mar-11 5:20
memberDrABELL29-Mar-11 5:20 
GeneralRe: The reason and the point are that you are not adding any val... Pin
brutuscat29-Mar-11 3:39
memberbrutuscat29-Mar-11 3:39 
GeneralReason for my Vote of 5 Very good share and nice highlightin... Pin
RaviRanjankr3-Nov-11 22:17
mvpRaviRanjankr3-Nov-11 22:17 
GeneralReason for my vote of 5 This probably exists in some documen... Pin
JH6420-Jun-11 13:40
memberJH6420-Jun-11 13:40 
GeneralRe: Thanks a bunch! Pin
DrABELL20-Jun-11 15:00
memberDrABELL20-Jun-11 15:00 
GeneralReason for my vote of 5 Good tip! Very good share, I never k... Pin
EdMan1965-Jun-11 23:30
memberEdMan1965-Jun-11 23:30 
GeneralRe: Thanks a bunch, Ed! I am totally agree with you. And, btw, a... Pin
DrABELL6-Jun-11 5:23
memberDrABELL6-Jun-11 5:23 
GeneralReason for my vote of 1 There is a thing called Documentatio... Pin
brutuscat28-Mar-11 23:50
memberbrutuscat28-Mar-11 23:50 
GeneralRe: What is the point of your message and the reason for such un... Pin
DrABELL29-Mar-11 3:25
memberDrABELL29-Mar-11 3:25 
Generalnice ,my 5+ Pin
Monjurul Habib5-Mar-11 7:27
memberMonjurul Habib5-Mar-11 7:27 
GeneralRe: Thanks a lot! Pin
DrABELL8-Mar-11 17:18
memberDrABELL8-Mar-11 17:18 
GeneralReason for my vote of 5 nice,my5 Pin
Monjurul Habib5-Mar-11 7:26
memberMonjurul Habib5-Mar-11 7:26 
GeneralReason for my vote of 5 Good one dude Pin
thatraja5-Mar-11 3:01
mvpthatraja5-Mar-11 3:01 
GeneralRe: Many thanks! :) Pin
DrABELL5-Mar-11 4:13
memberDrABELL5-Mar-11 4:13 
GeneralThanks! Pin
DrABELL21-Feb-11 17:01
memberDrABELL21-Feb-11 17:01 
GeneralThis is awesome! Pin
LopeZ10121-Feb-11 11:41
memberLopeZ10121-Feb-11 11:41 
General<i>More on this topic, covering the embedded YouTube player:... Pin
DrABELL3-Feb-11 6:23
memberDrABELL3-Feb-11 6:23 
GeneralReason for my vote of 5 you really hacked it! By the way nic... Pin
GPUToaster2-Feb-11 18:30
memberGPUToaster2-Feb-11 18:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160929.1 | Last Updated 14 Feb 2015
Article Copyright 2011 by DrABELL
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid