Using the LUTube Shortcode
This page explains how to add an LUTube video to your page or post using a WordPress shortcode. This will take care of inserting the tags needed to embed the video, and include any scripts which are needed to activate it. If your page or post is going to be on a public website, the settings in LUTube must be set so the video is public, otherwise only users within the University network will be able to watch it.
To embed an LUTube video in your page, you would use the lutube
keyword with a single option to tell the shortcode where your video is stored. LUTube uses hashes to identify videos, and the hash of your video can be found in the code which is given on a video page to embed the video on other sites, which looks like this:
<object width="640" height="360">
<param name="movie" value="http://lutube.leeds.ac.uk/video/9086968d503732a11b00dd78e362285a" />
<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="sameDomain" />
<embed type="application/x-shockwave-flash" width="640" height="360" allowfullscreen="true" allowscriptaccess="always" src="http://lutube.leeds.ac.uk/video/9086968d503732a11b00dd78e362285a"></embed>
</object>
The hash value for the video above is 9086968d503732a11b00dd78e362285a
– this is the text you will need to add to your shortcode to identify the video:
[lutube hash="9086968d503732a11b00dd78e362285a"]
Available options
- hash
- required
The hash of the video on LUTube (see above) - class
- optional (default “lutubevideo”)
An extra CSS class to apply to the video container (‘alignleft’ and ‘alignright’, for example) - width
- optional (default 640)
The width of the video in pixels - height
- optional (default 360)
The height of the video in pixels - preload
- optional (default 0 – false)
Whether the browser should start downloading the video when the page loads - autoplay
- optional (default 0 – false)
Whether the video should start to play as soon as it can (this has precedence over the preload setting if set) - controls
- optional (default 1 – true)
Whether to show controls on the video to enable puasing, volume control and seeking (this is browser dependent) - poster
- optional (default 0 -false)
The URL of an image to be used as the “poster” for the video (the default poster from LUTube is used by default).