Adding embedded audio, video, flip books and other interactive content to the document library
You can use the Document Library Pro plugin to display any type of document, including downloadable or embedded audio and video files, along with other multimedia content such as media playlists or image galleries. For example, you might want to include an MP3 music player or embedded YouTube/Vimeo videos directly on the main document library page, so that people can watch and listen without having to click to another page.
This article will tell you how to add embedded media files to your documents - either to the main document library page, or on the individual page for each document. In addition to this, you can use the Document Link feature to link each document to a downloadable audio/media file, or to third party websites such as YouTube or SoundCloud.
1. Choose where to add your embedded audio/video/multimedia files
First, you need to decide which field to use to store your embedded audio or media players. You can add them to any text-based field in the document library, such as:
- The main content/description
- The document excerpt (not recommended because by default, excerpts can only display plain text)
- A text or WYSIWYG custom field
2. Add your audio or video embeds
Next, you need to add the embedded audio, video or multimedia file for each document. Go to edit the document and add an embedded audio or video file (or other type of multimedia content) to the appropriate place.
- If you wish to host the audio/video in your WordPress Media Library, then you can click the 'Add Media' button and upload it directly. WordPress will automatically embed it as a fully functional media player using the built-in Audio or Video shortcodes, or the Playlist shortcode if you are creating a playlist. This is a good way to display audio files, but we recommend using a third party hosting service (e.g. YouTube or Vimeo) for video due to the larger file sizes and the need for cross-compatibility on all devices.
- If your multimedia files are hosted externally then you can use any of the embeds that are supported in WordPress.
- You might also be able to use multimedia shortcodes provided by another plugin, although you will need to check the Document Library Pro compatibility list to see if it will work correctly in the document library.
- You can also embed other types of content, such as a Google Doc or a page turning flipbook. For example, you can do this using a plugin such as Google Drive Embedder or a flip book service that offers embed codes.
3. Enable the 'Shortcodes' option
Go to the Document Library Pro plugin settings page and tick the 'Shortcodes' option. This tells the plugin to display the embedded multimedia content correctly, instead of as plain text.
4. Create and view the document library
View the document library and make sure the embedded media players are working correctly.