What is Media Embedding?
Media embedding is the term used to directly add a video or audio file into a webpage. You can embed mp3 (audio) and mp4 (video) files into your posts and pages. If you’re using Otago Podcasts then your podcast files will be automatically embedded.
How do I get Media Embedding on my site?
You can embed media to a page or post using shortcodes. ‘A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = shortcut (from WordPress.com Support).
Shortcodes for media embedding
There are lots of options for media embedding, but the basic ones are:
[vide o src="http://link_to_your_media_file.mp4"]– this will embed a video file (please note there is no space between the vide and the o when you write this in your own site).
[audi o src="http://link_to_your_media_file.mp4"]– this will embed an audio file (please note there is no space between the audi and the o when you write this in your own site).
- More options are available here: http://wordpress.org/extend/plugins/media-element-html5-video-and-audio-player/
The shortcode is all the code between and including the square brackets ([ ]). All you need to do is write the shortcode you require in your page or post and the system will do the rest for you.
To get the url for your media file you will need to have uploaded it to the Media Library or have it stored somewhere else on the internet and know its URL
What file types can I use?
You can use a variety of file types, but many do not work on all browers. Mp3 and mp4 have been tested to work on all common browsers (and mobile devices), other file types you can try are:
- MP4 (will work on all major browers, iPhone, iPod Touch and iPad)*
- MP3 (will work on iPhone, iPod Touch and iPad)
*h.264 a type of media encoding is no longer supported by Google Chrome so will not play in Chrome. h.264 encoding is the only encoding supported by iOS (iPhone, iPad etc).