In Types 1.5 we added support for the Audio, Video and Embedded media shortcodes.

Audio and Video

Audio and Video were introduced in WordPress 3.6 and use the MediaElement.js player to play HTML5 supported filetypes on your site. MediaElement.js is now included part of the WordPress core.

The Types shortcodes for Audio and Video, wrap the functionality provided by the WordPress core: the audio shortcode and the video shortcode.

Supported audio formats

  • mp3
  • m4a
  • ogg
  • wav
  • wma

WordPress Audio Player
WordPress Audio Player

Supported video formats

  • mp4
  • m4v
  • ogv
  • webm
  • wmv
  • flv

WordPress Video Player
WordPress Video Player

Recommended video formats

Vorbis audio, Opus audio, Theora video, and VP8 video are free audio/video compression formats for use without patent restrictions. They can be viewed in common web browsers if they are embedded in the following container formats: Ogg (.ogg, .oga, .ogv, .ogx, .spx, .opus file types) or WebM (.webm file type).

Converting video

There are many free tools available for converting video, such as Handbrake

Video attributes

Note that not all attributes are supported in all browsers. User experience may vary.

Read more about the Types Video shortcode implementation and the Types Audio shortcode implementation.

Embedded media

The embedded media shortcode wrap the embed functionality provided by the WordPress core. This will allow you to embed a wide range of complex content onto your site – you can see a complete list of supported content types in the WordPress documentation.

Read more about the Types Embedded Media shortcode implementation.

When you insert embedded media, you need to insert the URL to the media object you want to appear on your site. WordPress will automatically turn the link into the appropriate embed code when your Custom Post is viewed.
Inserting an iFrame or the Embed HTML from sites such as YouTube, Vimeo, SlideShare is not supported.

Adding Audio, Video or Embedded media post fields

Types Media Shortcodes
Types Media Shortcodes

When you create a Post Field Group, you can simply insert the new field types into your group.

If you cannot see the new fields you are probably running a version of WordPress prior to 3.6. You will need to upgrade WordPress to be able to use the new shortcodes.

Using the new WordPress Audio Playlist with Types

WordPress 4.4 and newer contain an Audio Playlist that works much like image galleries.

Audio Playlist Creation
Audio Playlist Creation

With Types, one can add an Audio Playlist by using a WYSIWYG field with “Add Media” enabled.

Audio Playlist Creation
Audio Playlist Preview

Troubleshooting

Media support across different browsers can be a complicated area with varied levels of support. If one of the new media shortcodes does not seem to be working correctly, then you can test your media by pasting the link directly into a standard Post or Page on your site.

Assuming you are running WordPress V3.6 or above, the link will be converted directly into the correct embed code on your site. If your video, audio or other content will not work on a normal WordPress page, then it will not work when output by your View or Content Template.