Media versions
Overview
When working with content in multiple languages it can be cumbersome to fetch different data fragments and combine them together to display your content. The MediaVersions field on Post provides a streamlined way access to access this data for ease of use.
Implementation
MediaVersions aggregates PostDetails and Media
using the language
field. Additionally, a MD5 versionHash
is provided that is representative of the full nested data of the version. This can be used to detect any changes in the versions.
Specifically, for VideoMedia
, all variations available due to captions and dubbing are flattened into a single array, with the URLs pointing to media with any variations baked in.
When not to use
MediaVersions should not be used if you want to directly access the URLs to VideoMedia
variations (captions or dubbing).