News

6 ways to customise YouTube’s parameters for a bespoke player

Embedding a YouTube player does not require a lot of advanced knowledge. The main problem involves the setting of the correct parameters. But fret not, as we show a few of the most interesting ones to play around with here

YouTube parameters

Embedding a YouTube player does not require a lot of advanced knowledge. The main problem involves the setting of the correct parameters. But fret not, as we show a few of the most interesting ones to play around with here.

YouTube parameters

1) Autoplay for the win

By default, videos will not play until the user clicks the play button. This is not always desirable: some websites want to start the playback straight away. Solve this problem by setting the autoplay property to true. However, be aware that many users open multiple tabs at the same time – if they all start playing, at least one of them will get closed straight away.

2) Use like a keyboard

YouTube enables its player instances to be controlled via keyboard input: the Spacebar key will stop playback, while the arrow keys affect volume and seeker position. Setting the disablekb flag makes the player ignore all non-mouse interactions: this is a feature that is especially useful for developers seeking to spruce up their web-based games with additional multimedia content.

3) API and behaviour

YouTube player instances provide a selection of API functions which let you customise the player’s behaviour. Using them is enabled via the enablejsapi property – if it is not set explicitly, the player will ignore incoming JavaScript commands without notice. This also affects the successor iFrame API: if a player doesn’t do what you want it to, you now know where to look!

4) Get rid of branding

Google brands its video player instances quite aggressively. If this branding is not desired, then you can set the modestbranding property to 1. In that case, the player shows the YouTube logo only when the user’s mouse pointer hovers over the paused player instance – this is a problem that can be addressed by hiding the element dynamically if the video is paused.

5) Going incognito

By default, the YouTube player displays a large amount of data about the video to be shown: your users will get information about the title, the uploader and other such details. By setting the showinfo parameter to 0, you can make all of that information disappear – but note that the users can still find out the title of the video relatively easily if they wanted to.

6) Delayed startup

Many YouTube channels will bother their attendees with a long-winded introductory sequence – it bores the viewers and may make them close the tab entirely. For some topics, such as the arms and test equipment space, detailed explanations of functionality and/or setup tend to come before the action does. When you are embedding YouTube videos for your users, you are the king of the castle. Feel free to use the start parameter to cut out all of the introductory babble – for example if the chatter and hum would waste one minute, then simply set it to 60 to quickly save your users some time.

×