|Video Cloud||Legacy Studio||Express III, Professional, Enterprise|
This document outlines best practices for embedding Video Cloud media such as images, videos, and specific renditions in web or mobile apps.
There may be cases where you want to access media files in your Video Cloud account directly, rather than through data-binding in a player. You might be displaying information about your videos in a page of a web app, or accessing specific media files in a mobile app to meet the requirements of an app store.
The Video Cloud Media API provides an easy way to access media data, including metadata and URLs for assets. When you use the Media API to access media assets, it is important to do it in the right way, so that links in your app will not break at some point.
The most important thing to remember is that the URLs for images, video files, and renditions are not fixed. Brightcove reconfigures the storage of media assets from time to time to meet requirements of some change in our internal systems, to improve performance, or for other reasons. When this happens, URLs for specific assets will change, so if your app is relying on hard-coded URLs to theses assets, the links will break at some point.
The Media API is intended to be used as a tool for integrating your CMS or other backend systems with Video Cloud. It is not built for high-volume runtime access.
Access frequency for read requests should be limited to 5 total requests per second from one or more devices, and for long-running requests (returning large datasets), no more than 10 concurrent requests are permitted.
Write requests are single-threaded, so you should wait for a response to a request before submitting another one.
For page performance or other reasons, you may not want to make the Media API calls to retrieve data on each page load. In that case, you can create a caching layer to hold the results locally. Setting up caching can be done in a variety of ways, but the basic logic is: