VIDEO VIDEO
autoplay The “autoplay” function allows for a video to immediately start when a page loads. (the value “1” enables this). To insert this into the embed code, you would simply use the “?” character and then “autoplay=1” VIDEO
controls The “controls” function allows you to hide or show the video controls. To hide the controls, I insert the character “&” and then “controls=0” immediately after the last code entered.
VIDEOVIDEOVIDEOVIDEOVIDEOVIDEOVIDEOVIDEOVIDEO
fs The fs (fullscreen) parameter is another embed parameter that doesn’t work with HTML5. It allows you to hide the fullscreen button. It is set to “1” (display) by default, but can be set to “0.” iv_load_policy The parameter “iv_load_policy” determines whether or not video annotations will be shown. There are two values: “1” and “3,” where “1” (the default setting) shows video annotations and “3” does not. Fortunately, the Astley video has some annotations so you can see the difference between the two. Here is an example where video annotations aren’t shown: VIDEO
loop This setting allows you to set your video to repeat ad infinitum. The “0” value is the default (stop at the end) value, and the “1” value will create a loop. For giggles, I’ll embed the Astley video with loop enabled (though I hope nobody will need to watch it a bunch to find it helpful 🙂 ). You’ll note in the code that in order to make “loop” work it should be used in conjunction with the “playlist” attribute.
modestbranding The modestbranding setting allows you to show your videos without the YouTube logo showing. You’ll notice that the YouTube logo goes away but it’s not as incognito as you might imagine. In any event, the value to turn on “modest branding” is “1.” VIDEO
origin and playerapiid These two functions are used in conjunction with the Javascript enable. Since I don’t know too much about this aspect of YouTube embeds I’ll skip these for now. playlist The playlist function allows you to play a prescribed list of sequential YouTube videos in your embed. It’s pretty simple to use, after the playlist command you list the IDs of the videos that comprise your list each separated by a comma (note that if you mention the first embedded video in the list it will play twice). This is a video list of Rick Astley videos – if you watch carefully you may come to the same conclusion that I have that he was Robin Thicke before Robin Thicke was Robin Thicke…. but I suppose that’s an ad sequitur to the embed option post: VIDEOVIDEO
The showinfo parameter determines whether the video information is presented before the video is played. The “1” value is default, and “0” value hides the video information as such: VIDEO
start The start parameter determines the spot where the video will begin playing (measured in seconds from the beginning of the video). Recall that this can be used in concert with the “end” function, but both parameters are measured in seconds from the beginning of the video. Here is an embed of the Rock Astley video where a bartender does a backflip (102 seconds in): VIDEO
The theme parameter allows you to choose either a dark or light theme for your embedded video player. The “dark” value is default, and here is an example of the “light” value: VIDEO
Putting it all together So, I thought it might make sense to put some of these parameters together to show how they work in concert. In this example I hid the video information, hid the notes throughout the video and hid the video controls. Note that these parameters don’t work well with the modestbranding parameter so I couldn’t include it. The result is a very clean looking embed and optimal viewing experience for fans of Rick Astley: VIDEO
No comments:
Post a Comment