Svrf API Docs

Media

MediaModel

Namespace: Svrf.Models.Media

MediaModel class contains the metadata and files for Media from the Svrf API.

MediaMetadata

Namespace: Svrf.Models.Media

MediaMetadata class contains metadata about media.

NameTypeDescription
IdstringThe unique ID of this Media.
TitlestringThe title of the Media, suitable for displaying.
DescriptionstringA description of the Media.
AuthorsIEnumerable<string>The Media's authors. This should be displayed when possible.
SitestringThe site that this Media came from. This should be displayed when possible.
CanonicalstringThe canonical page this Media can be found at via Svrf.
UrlstringThe original page this Media is located at.
EmbedUrlstringA player that can be embedded using an <iframe> tag to play the Media.
EmbedHtmlstringAn <iframe> tag that embeds a player that plays the Media.
TypeMediaTypeThe type of the Media. This should influence the media controls displayed to the user.
AdultboolWhether the Media is adult content.
Widthint?The width, in pixels, of the Media's source.
Heightint?The height, in pixels, of the Media's source.
Durationfloat?The duration of the Media in seconds.
MetadataMediaMetadataMetadata about the Media.
FilesMediaFilesVarious sizes of images and resolutions for the Media. They will never be larger than the Media source's original resolution.

MediaMetadata

Namespace: Svrf.Models.Media

MediaMetadata class contains metadata about media.

NameTypeDescription
IsFaceFilterboolFor 3D Media, denotes that this model can be applied as a face filter overlay on a video of a face.
HasBlendShapesboolFor 3D Media, denotes that this model contains blend shapes, but having to calculate and apply weights to them is not required. These are models like glasses, hats, and billboards that do not react to face movement.
RequiresBlendShapesboolFor 3D Media, denotes that calculating and applying blend shape weights to this model is required for the correct experience. If your platform cannot detect and calculate blend shape weights you MUST NOT present these models to your users.

MediaFiles

Namespace: Svrf.Models.Media

MediaFiles contains various sizes of images and resolutions for the Media. They will never be larger than the Media source's original resolution.

NameTypeDescription
ImagesMediaImagesResized jpeg stills of the Media. For video, these will be stills from 1/3 of the video's duration. Resolutions larger than the original size will not be included (the original is included as max). For stereoscopic content, this will be a monoscopic version of the top or left channel.
VideosMediaVideosResized mp4 (H.264) videos of the Media. Only included if the Media is video. Resolutions larger than the original size will not be included (the original is included as max). For stereoscopic content, this will be a monoscopic version of the top or left channel.
StereoMediaStereoResized versions of the Media, matching the Media's type, in stereo. Only included if the Media is stereoscopic. Resolutions larger than the original size will not be included (the original is included as max).
GltfDictionary<string, string>A map of file names to urls where those files are hosted. The file names are relative and their name hierarchy should be respected when saving them locally.
GltfMainstringUrl for the main GLTF file (that has .gltf extension).
GlbstringThis is the binary glTF format that should be used by clients if the Media is a 3D object. This is the preferred format to use on end-user devices.
GlbDracostringThis is the binary glTF format, with additional DRACO compression, that should be used by clients if the Media is a 3D object. Your renderer must support the KHR_draco_mesh_compression extension to use this model.

MediaImages

Namespace: Svrf.Models.Media

Resized jpeg stills of the Media. For videos, these will be stills from 1/3 of the video's duration. For stereoscopic content, this will be a monoscopic version of the top or left channel.

Resolutions larger than the original size will not be included.

NameTypeDescription
MaxstringThe image in its largest available size (the original size). This image should be used in third-party applications for the best experience, except on mobile devices (see 4096).
Width8192stringThe image at a reasonably large resolution that can be used for a better desktop experience.
Width4096string4096px wide image. This image should be used on mobile devices, as larger images may cause some devices to crash.
Width1080string1080px wide image. This image should be used for previews or other uses requiring clear resolution at low bandwidth.
Width1080Watermarkedstring1080px wide watermarked image. This image should be used for sharing on social media.
Width720string720px wide image. This image may be used for thumbnailing.
Size720x720stringA 1:1 image. This image may be used for thumbnailing.
Size720x540stringA 4:3 image. This image may be used for thumbnailing.
Size720x405stringA 16:9 image. This image may be used for thumbnailing.
Width540string540px wide image. This image may be used for thumbnailing.
Width136string136px wide image. This image may be used for thumbnailing.

MediaVideos

Namespace: Svrf.Models.Media

Resized mp4 (H.264) videos of the Media. Only included if the Media is video. Resolutions larger than the original size will not be included (the original is included as max). For stereoscopic content, this will be a monoscopic version of the top or left channel.

NameTypeDescription
MaxstringMaximum resolution video (original source video), width pixels wide at unspecified video and audio rates.
HlsstringURL for an HLS master playlist containing streams in all of the above resolutions which are no wider than the original Media. This should be used for streaming unless the platform does not support HLS.
ClipstringA 6-second, 1440px wide clip, with a 2MBps video rate, no audio.
Width4096string4096px wide video with a 20MBps video rate, 256KBps audio rate.
Width2160string2160px wide video with a 10MBps video rate, 192KBps audio rate.
Width1440string1440px wide video with a 4.4MBps video rate, 128KBps audio rate.
Width848string848px wide video with a 1.3MBps video rate, 96KBps audio rate.

MediaStereo

Namespace: Svrf.Models.Media

Resized versions of the Media, matching the Media's type, in stereo. Only included if the Media is stereoscopic.

Resolutions larger than the original size will not be included (the original is included as max).

NameTypeDescription
MaxstringThe Media in its largest available size (the original size).
HlsstringURL for an HLS master playlist containing streams in all of the above resolutions which are no wider than the original Media. Only included if the Media is a video.
Width4096string4096px wide image. This image should be used on mobile devices, as larger images may cause some devices to crash. Only included if the Media is a photo.
Width2160string2160px wide video with a 10MBps video rate, 192KBps audio rate. Only included if the Media is a video.
Width1440string1440px wide video with a 4.4MBps video rate, 128KBps audio rate. Only included if the Media is a video.
Width848string848px wide video with a 1.3MBps video rate, 96KBps audio rate. Only included if the Media is a video.