NHS Choices videos cover a huge range of health topics. As well as embedding single videos, you can create playlists with multiple topics and videos, and are able to access the Brightcove API directly.
This post quickly summarises how to use the Brightcove API to pull back a video. Please refer to other posts for information about multiple renditions, and other methods. All data is returned in .json.
You’ll first need a token – speak to your relevant syndication manager, who can supply you with one. This token will enable you to access the video library in read format, making calls to pull back content based on criteria.
To retrieve all records, with no filtering or specific criteria, the call would look like:
This will return the entire information associated with our videos. In order to narrow down the content, such as returning a single video, you need to add criteria to filter the list.
To do this for a single video, the call would look like this:
where video_id is the ID of the video you’re trying to find. You could use the initial call to return and parse the IDs from the entire list, and then pull each video based on this ID using the second call.
This will return the entire information based on a single video. From here, you can work with the information, such as accessing the rendition (stored within FLVURL). You can then apply other methods and criteria as required. For further information on how to use these criteria and methods, see http://support.brightcove.com/en/video-cloud/docs/how-to-search-videos-media-api#searchTerms and http://docs.brightcove.com/en/video-cloud/media/reference.html#Video_Read.
When using the Brightcove API to pull down videos, it’s possible to access the various quality formats we hold. To do this, once you’ve used the standard API call to return your video list, append
to the string. This will bring back all available renditions, and the name of the video file, allowing you to access the desired quality video.
For further information about accessing multiple video formats, see http://support.brightcove.com/en/video-cloud/docs/accessing-video-content-media-api#Accessing multi-bitrate streaming renditions
Please note that this product is not owned, updated or hosted by NHS Choices. Whilst we can supply basic information on how the API works, for full information, please see the following areas:
Brightcove Media API Reference: http://docs.brightcove.com/en/media/reference.html, http://support.brightcove.com/en/video-cloud/docs/media-api-reference
The Brightcove Media API allows you to take information regarding the NHS Choices videos hosted on Brightcove, and use this information to retrieve videos and their associated information. You can use this to pull back specific videos based on tagging information, retrieve a full list of titles available, or consume the IDs for videos, passing it across to a predefined player.
API access is via a read access token. If you do not have this, please speak to your syndication manager. This token must be appended to the API call to access the syndication video account. Calls are restricted to 100 videos per page – to return further titles and information, use
Paging starts at 0. Note that the data is returned as .json, which will need consuming in order to display correctly – the raw data output will need manipulation in order to make sense.
This player is enabled for HTML5 video delivery, and is based on the standard player. To use, amend the video ID below
(highlighted) with the relevant code for the video required. Please note that this is a smart player, so will play as flash
on flash-enbaled devices, but as an HTML5 player on non-flash devices.
As well as taking single videos, it is also possible to create a multiplayer, which can embed multiple videos, either as a single playlist, or using multiple playlists. For example, you may wish to create a single multiplayer for all your videos, with different playlists like Healthy Eating, Exercise and Lose Weight. Or you might consider using a single playlist across multiple titles. To set up a mutliplayer, you’ll need to know what videos and categories you want, and also what player styling (see playerPreviews). When you have selected these, speak to your syndication manager to set the player up.
By far the easiest method to take video from NHS Choices is to embed the video file directly from the site. To do so, please refer to Embed videos from NHS Choices. Please note that if a video doesn’t have an embed code, it means it is unavailable for syndication. If you want to use a mutliplayer, with multiple videos and playlists, please see Video multiplayer usage